POST
/
v1
/
invoices
cURL
curl --request POST \
  --url https://api.paycashless.com/v1/invoices \
  --header 'Content-Type: application/json' \
  --header 'Request-Signature: <request-signature>' \
  --header 'Request-Timestamp: <request-timestamp>' \
  --data '{
  "reference": "<string>",
  "acceptPartialPayments": false,
  "description": "<string>",
  "currency": "NGN",
  "sendEmail": false,
  "autoFinalize": true,
  "callbackUrl": "https://example.com/callback",
  "returnUrl": "https://example.com/return",
  "customer": {
    "email": "[email protected]",
    "name": "<string>",
    "address": "<string>"
  },
  "items": [
    {
      "name": "<string>",
      "quantity": 123,
      "description": "<string>",
      "price": 100000
    }
  ],
  "taxRateIds": [
    "txr_1"
  ],
  "maxInstallments": 3,
  "daysUntilDue": 30,
  "metadata": {
    "customer_id": "123",
    "order_id": "456"
  }
}'
{
  "id": "<string>",
  "status": "draft",
  "customerId": "<string>",
  "description": "<string>",
  "currency": "NGN",
  "reference": "<string>",
  "sendEmail": true,
  "dueDate": "2023-11-07T05:31:56Z",
  "liveMode": true,
  "number": "0001",
  "amountDue": 100000,
  "amountPaid": 100000,
  "totalInclusiveTaxAmount": 10000,
  "totalExclusiveTaxAmount": 10000,
  "taxRateIds": [
    "tax_rate_1"
  ],
  "items": [
    {
      "id": "<string>",
      "name": "<string>",
      "quantity": 123,
      "price": 1000
    }
  ],
  "maxInstallments": 3
}

Headers

Request-Signature
string
required

SHA-512 HMAC signature of the request payload using the API secret

Minimum length: 1
Example:

"5e73d044c44d733fcf819ad3409aaaddca840d421b69cb0b04e2c750fc62ece7526d36296237663ad1f06f62a730c0466516507196b3ce6567493cc52a7cf63d"

Request-Timestamp
string
required

UNIX timestamp when the request was created (in seconds)

Example:

"1712336881"

Body

application/json

Response

201 - application/json

Invoice created successfully

The response is of type object.