Transaction object 💎

The transaction object contains all the information about a transaction. It will be returned after a successful charge authorization (and also received via webhook).

Anatomy of a transaction object

A transaction object usually looks like this:

{
"type": "transaction",
"transaction": {
"id": "transaction-identifier",
"remark": "medicine",
"amount": 50000,
"currency": "NGN",
"charge": 0,
"type": "peer",
"refund": false,
"channel": "send",
"status": "success",
"user": {
"name": "Tim Cook",
"identifier": "tim",
"identifier_type": "username",
"email": "tim@apple.com",
"reference": "one-more-thing",
"created_at": "2020-05-06T12:00:00.000Z",
"updated_at": "2020-05-06T12:00:00.000Z"
},
"checkout": null,
"mode": "credit",
"reference": "transaction-reference",
"peer": {
"user": {
"name": "John Ternus",
"identifier": "john",
"identifier_type": "username"
},
"business": {
"name": "Apple",
"logo": null,
"logo_colour": "#ffffff"
}
},
"meta": {
"city": "Cupertino",
"state": "California"
},
"created_at": "2021-04-12T19:52:22.000000Z",
"updated_at": "2021-04-12T19:52:22.000000Z"
}
}
AttributeDescription
transaction.idThe transaction's identifier
transaction.amountThe receipt value in the smallest unit of a given currency
transaction.currencyThe currency of the given amount
transaction.channelThe used SDK to process the transaction (send, checkout or direct_charge)
transaction.userThe user object of the user carrying out the transaction
transaction.peerThe receipt peer object contains objects of the user and business the transaction is being carried out with
transaction.remarkTransaction remark
transaction.typeTransaction type
transaction.checkoutThis will hold the checkout object if its a checkout transaction
transaction.statusTransaction status
transaction.modeTransaction mode (debit or credit)
transaction.referenceTransaction reference
transaction.metaThis object should contain additional/optional values passed from the SDK