Invoices
An invoice
represents a payment on the Dots platform. Creating an invoice
generates a link that the payer can be redirected to complete the payment and collect any information, such as a shipping address.
Invoice Object
Example
{
"id": "8f246ca0-4ade-4296-bab4-5a6d37d9af10",
"payer": {
"first_name": "Steve",
"last_name": "Pearseed",
"username": "steve",
"wallet": {
"amount": 2500.0
}
},
"api_app": {
"id": "b7a00ae2-e638-4d66-9d46-adf38d810cde",
"name": "Zappy",
"user_id": 2
},
"amount": 800,
"expiry": "2020-12-09T00:40:51.107Z",
"status": "created",
"link": "https://www.senddots.com/invoice/8f246ca0-4ade-4296-bab4-5a6d37d9af10",
"items": [
{
"name": "Pikachu Digital Pet",
"unit_amount": 250,
"quantity": 1,
"description": "A little Pikachu for your desktop"
},
{
"name": "Charmander Digital Pet",
"unit_amount": 225,
"quantity": 2,
"description": "A ferocius Charmander for your desktop"
}
],
"breakdown": {
"items_total": 700,
"tax": 100,
"shipping": 0
},
"requested_information": {
"shipping_address": null
},
"metadata": {}
}
Attributes
Name | Type | Description |
---|---|---|
id | string (uuid) | UUID id of the invoice |
payer.first_name | string | First name of the payer |
payer.last_name | string | Last name of the payer |
payer.username | string | Username of the payer |
payer.wallet | object | The wallet of payer |
payer.wallet.amount | float | The amount of balance in cents |
expiry | string (date-time) | Datetime when the invoice will expire |
status | string | Status of the invoive (created, completed, expired) |
link | string (uri) | Link to redirect the customer to pay |
items | list[object] | List of item objects |
item.name | string | Name of the item |
item.unit_amount | integer | Cost of 1 unit of the item |
item.quantity | integer | Quantity of this item |
item.description | string | Description of the item |
breakdown | object | Breakdown of the total amount |
breakdown.items_total | integer | Total of the items (unit_amount * quantity) |
breakdown.shipping | integer | Cost of shipping |
breakdown.tax | integer | Tax |
amount | float | Total amount to charge the customer (sum of all breakdown fields) |
requested_information | list[string] | Information requested from the user that will populate on completion of transaction, (shipping_address) |