- Invoices
- Create an invoice link
Invoices
Create an invoice link
POST
/api/api/invoice/create
client_id*
api_key*
curl --request POST \
--url https://api.senddotssandbox.com/api/api/invoice/create \
--header 'Authorization: Basic AUTH_VALUE' \
--header 'Content-Type: application/json' \
--data '{
"amount": number
}'
{
"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": {}
}
}
Body
items
array
sum of all items must match breakdown.item_total if provided
breakdown
object
sum of entries in breakdown must equal amount
expires_in
integer
Duration in seconds for which invoice will be valid and payable
amountRequired
number
requested_information
string[]
metadata
object
Set of key-value pairs in the format of string. This is attached to the invoice object for storing additional information.
user_id
string
User to bill the invoice to
Response
success
boolean
invoice
{
"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": {}
}
}