Transaction API
The Transaction API allows you to manage payment transaction operations such as retrieving transaction history, viewing transaction details, sending email receipts, voiding transactions, processing refunds and capturing pre-authorizations.
List Transactions
Retrieves a list of transactions with optional filtering parameters.
GET /api/openapi/v1/order
Authorization: Bearer {jwt}
Accept: application/jsonParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Authorization | header | string | true | Bearer Token |
| createdStart | query | string | false | Start of the creation time range. yyyy-MM-dd (UTC), or an ISO 8601 timestamp with time zone (e.g. 2024-07-19T00:00:00+08:00) |
| createdEnd | query | string | false | End of the creation time range. Same formats as createdStart; a date-only value includes the whole day |
| transactionId | query | string | false | Full transaction ID, starting with M or tran. Other values are ignored |
| acquirerRefNo | query | string | false | Acquirer reference number |
| deviceId | query | string | false | Terminal device ID |
| pageSize | query | number | false | Default 20 |
| pageNumber | query | number | false | Default 1 |
| tranStatus | query | string | false | Transaction status filter, comma-separated (see below) |
Transaction Status
tranStatus accepts the codes or the names below, comma-separated (e.g. 2,4 or APPROVED,VOIDED):
| Code | Name |
|---|---|
| 1 | PROCESSING |
| 2 | APPROVED |
| 3 | DECLINED |
| 4 | VOIDED |
| 6 | CANCELLED |
| 7 | REVERSED |
| 8 | ADJUSTED |
| 9 | AUTH_ONLY |
Response
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens in a new tab) | Success | Wrapper: Response<T> |
Example Response (200)
{
"msg": "SUCCESS",
"code": 0,
"data": {
"total": 25,
"size": 20,
"current": 1,
"pages": 2,
"cursorStarting": "tran_01JE8BYF8BYYZFQFJ08E7VCMSK",
"cursorEnding": "tran_01JE8C2M4N6P8Q0R2S4T6V8W0X",
"records": [
{
"tranId": "T20230615123456",
"amount": {
"currency": "USD",
"value": 1000
},
"approvalCode": "123456",
"batchNo": "001",
"cvmPerformed": "NO_CVM",
"appName": "Visa",
"linkedTranId": "",
"merchantName": "Demo Merchant",
"tsi": "E800",
"acqTid": "10001234",
"rrn": "123456789012",
"tc": "ABCD1234EFGH5678",
"tranStatus": "APPROVED",
"tranType": "SALE",
"atc": "001A",
"tvr": "0000000000",
"trace": "000123",
"acqMid": "123456789012345",
"accountMasked": "************1234",
"sdkId": "SDK-123456",
"paymentMethod": "VISA",
"hostMessageFormat": "ISO8583",
"aid": "A0000000031010",
"entryMode": "CONTACTLESS"
}
]
}
}Get Transaction Details
Retrieves detailed information for a specific transaction.
GET /api/openapi/v1/order/{transactionId}
Authorization: Bearer {jwt}
Accept: application/jsonParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Authorization | header | string | true | Bearer Token |
| transactionId | path | string | true | Transaction ID |
Response
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens in a new tab) | Success | Wrapper: Response<T> |
Example Response (200)
{
"msg": "SUCCESS",
"code": 0,
"data": {
"tranId": "T20230615123456",
"approvalCode": "123456",
"cvmPerformed": "NO_CVM",
"tsi": "E800",
"tranStatus": "APPROVED",
"tranType": "SALE",
"atc": "001A",
"trace": "000123",
"acqMid": "123456789012345",
"callbackUrl": "https://merchant.example.com/callback",
"entryMode": "CONTACTLESS",
"amount": {
"currency": "USD",
"value": 1000
},
"batchNo": "001",
"appName": "Visa",
"linkedTranId": "",
"merchantName": "Demo Merchant",
"acqTid": "10001234",
"rrn": "123456789012",
"tc": "ABCD1234EFGH5678",
"tvr": "0000000000",
"accountMasked": "************1234",
"sdkId": "SDK-123456",
"paymentMethod": "VISA",
"hostMessageFormat": "ISO8583",
"actions": [],
"aid": "A0000000031010"
}
}Send Receipt Email
Sends a transaction receipt to the specified email address.
POST /api/openapi/v1/order/email/{transactionId}
Content-Type: application/json
Authorization: Bearer {jwt}Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Authorization | header | string | true | Bearer Token |
| transactionId | path | string | true | Transaction ID |
| body | string | true | Email recipient address |
Request Body Example
{
"email": "[email protected]"
}Response
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens in a new tab) | Success | Wrapper: Response<T> |
Example Response (200)
{
"msg": "SUCCESS",
"code": 0
}Void Transaction
Voids (cancels) a previously approved transaction. The full amount is voided.
POST /api/openapi/v1/order/void/{transactionId}
Authorization: Bearer {jwt}Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Authorization | header | string | true | Bearer Token |
| transactionId | path | string | true | Transaction ID |
No request body is required.
Response
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens in a new tab) | Success | Wrapper: Response<T> |
Example Response (200)
{
"msg": "SUCCESS",
"code": 0,
"data": {
"refundId": "R1781234567890123456",
"transactionId": "M2114546496106315777",
"payAmount": 1000,
"refundAmount": 1000,
"state": 2,
"cardMaskedPan": "************1234",
"acquirerMid": "123456789012345",
"acquirerTid": "10001234",
"acquirerRefNo": "123456789012",
"acquirerAuthCode": "123456",
"acquirerBatchNo": "001",
"acquirerTraceNo": "000124"
}
}payAmount and refundAmount are in the currency's minor unit (e.g. cents). state 2 means approved.
Process Refund
Issues a refund for a previously completed transaction. Supports partial refunds.
POST /api/openapi/v1/order/refund/{transactionId}
Content-Type: application/json
Authorization: Bearer {jwt}Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Authorization | header | string | true | Bearer Token |
| transactionId | path | string | true | Transaction ID |
| refundAmount | body | string | number | false | Amount to refund in the major currency unit (e.g. 5.00 = 5.00 USD). Omit to refund the full amount |
| refundReason | body | string | false | Reason for the refund |
Request Body Example
{
"refundAmount": "5.00",
"refundReason": "Customer request"
}Response
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens in a new tab) | Success | Wrapper: Response<T> |
Example Response (200)
{
"msg": "SUCCESS",
"code": 0,
"data": {
"refundId": "R1781234567890123457",
"transactionId": "M2114546496106315790",
"payAmount": 1000,
"refundAmount": 500,
"state": 2,
"cardMaskedPan": "************1234",
"acquirerMid": "123456789012345",
"acquirerTid": "10001234",
"acquirerRefNo": "123456789013",
"acquirerAuthCode": "123457",
"acquirerBatchNo": "001",
"acquirerTraceNo": "000125"
}
}transactionId is the ID of the new refund transaction. payAmount and refundAmount are in the currency's minor unit (e.g. cents).
Process Capture
Captures a previously authorized transaction. A partial amount is supported if the acquirer supports it.
POST /api/openapi/v1/order/capture/{transactionId}
Content-Type: application/json
Authorization: Bearer {jwt}Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Authorization | header | string | true | Bearer Token |
| transactionId | path | string | true | Transaction ID of the authorization |
| amount | body | string | number | false | Amount to capture in the major currency unit (e.g. 5.00 = 5.00 USD). Omit to capture the full amount |
Request Body Example
{
"amount": "5.00"
}Response
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens in a new tab) | Success | Wrapper: Response<T> |
Example Response (200)
data is the captured transaction. srsTranId is the ID of the new capture transaction.
{
"msg": "SUCCESS",
"code": 0,
"data": {
"tranId": "tran_01JE8BYF8BYYZFQFJ08E7VCMSK",
"srsTranId": "M2114546496106315801",
"tranType": "AUTH",
"tranStatus": "APPROVED",
"amount": {
"currency": "USD",
"value": 1000
}
}
}