Create Invoice

Create an Invoice

Creating a new Invoice

curl --location -g --request POST '{{BASE_URL}}/v2/create-invoice' \
--header 'Authorization: Bearer {{API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "api Invoice test",
    "invoice_number": "1234",
    "subject":   "API test",
    "description": "Rent for Q1",
    "amount": 30,
    "currency_name": "USD",
    "items": {
		"1": {
			"name": "Test Item 1",
            "Quantity":"1",
			"price": 10
		},
		"2": {
			"name": "Test Item 2",
			"price": 20
		}
	}
}'
Field
Description
Example

name

Name of your customer

"API Invoice test"

invoice_number

The number of the invoice (optional). Can accept any character

"1234"

subject

Subject as you'd like it to appear

"API test"

description

Description of items in the invoice

"Rent for Q1"

amount

The amount as a string

"100.05"

currency_name

The ISO-4217 currency

"USD"

items

List of items in JSON format

{ "1": { "name": "Test Item 1", "Quantity":"1", "price": 10 }, "2": { "name": "Test Item 2", "price": 20 } }

Create an invoice.

POST https://merchant.fcfpay.com/api/v2/create-invoice

Creates a new invoice.

Request Body

Name
Type
Description

name*

string

Name of your customer

invoice_number

string

The invoice number

amount*

decimal

The amount

description*

string

Description of items in the invoice

subject

String

Subject as you'd like it to appear

{
    "success": true,
    "data": {
        "checkout_page_url": "https://checkout.fcfpay.com/pay/JDJ5JDEwJG1rVldXaGVtTVZsTHZUbjkxUFJmSE9QQURvQzVjUDlucU9zQVEyUWo5SWNGRWs0Lkx3bFRP",
        "payment_status": "waiting"
    },
    "message": "Invoice successfully created. Waiting for the payment."
}

After order creation, our system will send you a checkout page URL. You should redirect your customers to that URL.

If you send information about items, this will be displayed on the checkout page:

Last updated