This is an object representing your payments.
Payments
Payments are all transactions that occur on your balances. These can be directly from a payment method or from a tokenized (saved) payment method for automated payments.
You can retrieve all saved payments of yours but you cannot update or delete records.
Payment object fields
Field | Data type | Description | Type |
---|---|---|---|
id | string | unique id of payment | required |
reference | string | client-supplied unique reference to track payment | optional |
source | string | origin of payment (external, balance, token) | required |
save_token | boolean | specifies if the payment method used for the payment should be saved for later use | required |
amount | integer | amount of the payment in non-decimal or smallest possible unit (eg: cent over dollar) | required |
currency | string | currency of the payment | required |
breakdown | json | breakdown of all parts and fees of payment | optional |
country | string | two-letter ISO code representing the country of the payment | required |
type | string | type of payment | required |
status | integer | status of payment | required |
return_url | string | url to redirect after payment success | optional |
balance_updated | boolean | specifies if the balance was updated after the payment | required |
balance_transaction_type | string | type of transaction on balance (credit, debit) | required |
balance | integer | balance's available amount after payment transaction succeeds, fails, is refunded or is canceled | optional |
event_log | json | log of important event timestamps of the payment | optional |
metadata | json | metadata to store extra information | optional |
Payment status
Status | Description |
---|---|
initiated | The payment has been initiated but requires authorization or verification |
pending | Generic "in progress" payment status |
successful | The payment has been verified and successful |
failed | The payment has been verified but failed |
refunded | The payment was refunded |
canceled | The payment was canceled by the processor or user |
Payment sources
Source | Description |
---|---|
external | the payment was made from an external source |
balance | the payment originated from a balance |
token | the payment was made from a saved payment method |