Invoices
Create an invoice link
POST
/
api
/
invoice
/
create
Authorization
Body
{
"items": [
{
"name": "string",
"unit_amount": 0,
"quantity": 0,
"description": "string"
}
],
"breakdown": {
"items_total": 0,
"tax": 0,
"shipping": 0
},
"expires_in": 10800,
"amount": 0,
"requested_information": ["string"],
"metadata": {},
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
}
{
"success": true,
"invoice": {
"id": 0,
"api_app": {
"id": 0,
"user_id": 0,
"name": "string"
},
"amount": 0,
"expiry": "2019-08-24",
"status": "string",
"items": [
{
"name": "string",
"unit_amount": 0,
"quantity": 0,
"description": "string"
}
],
"breakdown": {
"items_total": 0,
"tax": 0,
"shipping": 0
},
"requested_information": ["shipping_address"],
"metadata": {},
"payer": {}
}
}
Authorizations
Authorization
string
headerrequiredBasic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Body
application/json
amount
number
requiredbreakdown
object
sum of entries in breakdown must equal amount
expires_in
integer
default: 10800Duration in seconds for which invoice will be valid and payable
items
object[]
sum of all items must match breakdown.item_total if provided
metadata
object
Set of key-value pairs in the format of string. This is attached to the invoice object for storing additional information.
requested_information
string[]
user_id
string
User to bill the invoice to
Response
200 - application/json
invoice
object
success
boolean
{
"items": [
{
"name": "string",
"unit_amount": 0,
"quantity": 0,
"description": "string"
}
],
"breakdown": {
"items_total": 0,
"tax": 0,
"shipping": 0
},
"expires_in": 10800,
"amount": 0,
"requested_information": ["string"],
"metadata": {},
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
}
{
"success": true,
"invoice": {
"id": 0,
"api_app": {
"id": 0,
"user_id": 0,
"name": "string"
},
"amount": 0,
"expiry": "2019-08-24",
"status": "string",
"items": [
{
"name": "string",
"unit_amount": 0,
"quantity": 0,
"description": "string"
}
],
"breakdown": {
"items_total": 0,
"tax": 0,
"shipping": 0
},
"requested_information": ["shipping_address"],
"metadata": {},
"payer": {}
}
}