Skip to Content
DevelopersAPI referencePayments

Record payment

POST
/v1/invoices/{invoiceId}/payments

Authorization

apiKey
headerAuthorizationBearer <token>

An API key (blk_…) from Settings → API keys.

Path Parameters

invoiceId*string

Request Body

application/json
  1. body
amount*integer
Range0 < value <= 9007199254740991
paidOn?string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
Formatdate
method?string
Default"bank_transfer"
Value in"bank_transfer""mobile_wallet""card""cash""cheque""online""other"
reference?|
Lengthlength <= 200
notes?|
Lengthlength <= 2000

Response Body

application/json
  1. response
id*string
invoiceId*string
invoiceNumber*string|null
clientId*string
clientName*string
amount*integer
Range-9007199254740991 <= value <= 9007199254740991
currency*string
paidOn*string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
Formatdate
method*string
Value in"bank_transfer""mobile_wallet""card""cash""cheque""online""other"
reference*string|null
notes*string|null
status*string
Value in"completed""refunded"
refundedAt*|
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
Formatdate-time
refundReason*string|null
receiptId*string|null
receiptNumber*string|null
receiptLastSentAt*|
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
Formatdate-time
createdAt*string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
Formatdate-time
Example Request
curl -X POST 'https://your-billleaf-api/v1/invoices/string/payments' \  -H 'Content-Type: application/json' \  -d '{  "amount": 1}'
Example Response201
{  "id": "string",  "invoiceId": "string",  "invoiceNumber": "string",  "clientId": "string",  "clientName": "string",  "amount": -9007199254740991,  "currency": "string",  "paidOn": "2019-08-24",  "method": "bank_transfer",  "reference": "string",  "notes": "string",  "status": "completed",  "refundedAt": "2019-08-24T14:15:22Z",  "refundReason": "string",  "receiptId": "string",  "receiptNumber": "string",  "receiptLastSentAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z"}