Transaction Object
A JSON object that encapsulates essential transaction data that can be used for purposes such as displaying order information, payment processing, and database record storage.
JSON Example
{
"id": 0,
"external_id": "string",
"creation_date": "2019-08-24T14:15:22Z",
"confirmation_expiration_date": "2019-08-24T14:15:22Z",
"confirmation_date": "2019-08-24T14:15:22Z",
"status": {
"id": 0,
"message": "string",
"class": {
"id": 0,
"message": "string"
}
},
"operator_reference": "string",
"pin": {
"code": "string",
"serial": "string"
},
"product": {
"id": 0,
"name": "string",
"description": "string",
"tags": [
"string"
],
"service": {
"id": 1,
"name": "string",
"subservice": {
"id": 1,
"name": "string"
}
},
"operator": {
"id": 1,
"name": "string",
"country": {
"name": "string",
"iso_code": "string",
"regions": [
{
"name": "string",
"code": "string"
}
]
},
"regions": [
{
"name": "string",
"code": "string"
}
]
},
"regions": [
{
"name": "string",
"code": "string"
}
],
"pin": {
"usage_info": [
"string"
],
"validity": {
"unit": "HOUR",
"quantity": 0
},
"terms": "string"
}
},
"prices": {
"wholesale": {
"unit_type": "CURRENCY",
"unit": "string",
"amount": 0,
"fee": 0
},
"retail": {
"unit_type": "CURRENCY",
"unit": "string",
"amount": 0,
"fee": 0
}
},
"rates": {
"base": 0,
"wholesale": 0,
"retail": 0
},
"benefits": [
{
"type": "TALKTIME",
"unit_type": "TIME",
"unit": "string",
"amount": {
"base": 0,
"promotion_bonus": 0,
"total_excluding_tax": 0,
"total_including_tax": 0
},
"additional_information": "string"
}
],
"promotions": [
{
"id": 0,
"title": "string",
"description": "string",
"terms": "string",
"start_date": "2019-08-24T14:15:22Z",
"end_date": "2019-08-24T14:15:22Z"
}
],
"requested_values": {
"source": {
"unit_type": "CURRENCY",
"unit": "string",
"amount": 0
},
"destination": {
"unit_type": "CURRENCY",
"unit": "string",
"amount": 0
}
},
"adjusted_values": {
"source": {
"unit_type": "CURRENCY",
"unit": "string",
"amount": 0
},
"destination": {
"unit_type": "CURRENCY",
"unit": "string",
"amount": 0
}
},
"sender": {
"last_name": "string",
"first_name": "string",
"middle_name": "string",
"nationality_country_iso_code": "string",
"mobile_number": "string",
"email": "string",
"address_text": "string",
"address_city": "string",
"address_country_iso_code": "string",
"address_postal_code": "string"
},
"beneficiary": {
"last_name": "string",
"first_name": "string",
"middle_name": "string",
"nationality_country_iso_code": "string",
"mobile_number": "string",
"email": "string",
"address_text": "string",
"address_city": "string",
"address_country_iso_code": "string",
"address_postal_code": "string"
},
"debit_party_identifier": {
"mobile_number": "string",
"account_number": "string",
"account_qualifier": "string"
},
"credit_party_identifier": {
"mobile_number": "string",
"account_number": "string",
"account_qualifier": "string"
},
"statement_identifier": {
"reference": "string",
"due_date": "2019-08-24"
},
"additional_identifier": {
"purchaser_id": "string"
},
"callback_url": "[http://example.com](http://example.com)"
}
Example Code (JavaScript)
function onSubmit(transaction, sessionId) {
console.log("Transaction ID:", transaction.id);
console.log("Product Name:", transaction.product.name);
console.log("Retail Price:", transaction.prices.retail.amount);
// ... further actions
}
Updated 2 months ago