You can use this endpoint to get the status of a transaction or settlement.
- This API allows you to manage, search and view Transactions and Settlement.
- This API is equivalent to the “Transactions” and “Settlements” tab from Payex dashboard. See payex.io/docs on how to use transaction and settlement tabs in Payex dashboard.
Get transaction by Transaction ID #
Request this endpoint to get specific transaction details by ‘id’ as required parameter below.
Successful response returns parameters below with status code 200
Body Parameter | Type | Validation | Description | Example |
---|---|---|---|---|
txn_date |
| Transaction date | ||
mid | string | Merchant ID number | ||
name | string | Merchant name | ||
title | string | |||
collection_id | string | Default collection id will be used if not provided | owbnr7xq | |
invoice_id | string | Invoice ID | <any string> | |
txn_id | string | Transaction ID of Payex | PX10000011627008035 | |
status | string | Enum: [ 00, 99 ] | Status: 00 if create successfully Status: 99 if error occurred | 00 |
customer_name | string | Name of the customer | Test Customer | |
currency | string | Three-letter code of the transaction’s currency. Will be auto-filled as MYR. | MYR | |
base_amount | number($double) | Base amount | ||
amount | number($double) | Amount | ||
txn_type | string | Used to differentiate transaction types | FPX FPX CCA FPX B2B FPX CCA B2B Direct Debit Mandate – Authorization Mandate – Approval Mandate – Maintenance Mandate – Termination Malaysian Debit Card Malaysian Credit Card Foreign Card Card – Foreign Currency Auto Debit – Authorization GrabPay PayLater by Grab Postpaid PayLater by Grab Instalment Touch ‘n Go eWallet ShopeePay Riipay Split Unpaid | |
fpx_mode | string | Enum: [ 01, 02 ] | Whether or not the customer uses a retail or corporate bank account for FPX payment | 01 – Retail, 02 – Corporate |
fpx_buyer_name | string | Name of FPX buyer | Test Customer | |
fpx_buyer_bank_id | string | Bank code of FPX buyer | TEST0021 Refer to list of FPX buyer bank code | |
fpx_buyer_bank_name | string | Bank name of FPX buyer | CIMB Bank | |
card_holder_name | string | Cardholder name | N@me()/ .-_,&Buyer’`~*;: | |
card_number | string | Card number | ************1111 | |
card_expiry | string | Card expiration date | 03/27 | |
card_brand | string | Can be any of “VISA”, “MASTERCARD”, “UNIONPAY” | VISA | |
external_txn_id | string | External Transaction ID | 2009151119230241 | |
auth_code | string | Payment response code | 00 | |
auth_number | string | Authorization number | 15733223 | |
string | Email of customer | test@email.com | ||
contact_number | string | Contact number of customer | 0123456789 | |
delivery_address | string | Delivery address of customer | 48 Jalan Gembira Taman Mega | |
address | string | Address of customer | 48 Jalan Gembira Taman Mega | |
postcode | string | Postcode of customer | 57100 | |
city | string | City of customer | Petaling Jaya | |
state | string | State of customer | Selangor | |
country | string | Country of customer | Malaysia | |
shipping_name | string | Name of the customer for delivery | John Doe | |
shipping_email | string | Email of the customer for delivery | test@email.com | |
shipping_contact_number | string | Contact number of the customer for delivery | 0123456789 | |
shipping_address | string | Address of the customer for delivery | 48 Jalan Gembira Taman Mega | |
shipping_postcode | string | Postcode of the customer for delivery | 57100 | |
shipping_city | string | City of the customer for delivery | Petaling Jaya | |
shipping_state | string | State of the customer for delivery | Selangor | |
shipping_country | string | Country of the customer for delivery | Malaysia | |
description | string | Free-text field for any additional information regarding the mandate authorization payment method | Beauty Product | |
reference_number | string | Passed by merchant as optional parameter. | <any string> | |
mandate_reference_number | string | Refers to reference number for mandate generated by Payex | MN10000171626860885 | |
collection_number | string | Refers to collection number generated by Payex | CL10000023077b6050c4 | |
collection_reference_number | string | Passed by merchant as optional parameter | <any string> | |
payment_intent | string | This refers to Payment Intent endpoint for creating payment forms. | b96165b897c746c0a2a42032e8bfafea | |
split_type | string | Type of split | platform | |
split_description | string | Description of split | platform commission fees | |
items | string | { } | ||
metadata | string | { } | ||
voidable | string |
Get all transactions #
Request this endpoint to get all transactions from a date range using ‘start_date’ and ‘end_date’, or get transactions using specific identifiers like ‘payment_intent’, ‘txn_id’, ‘reference_number’, etc. Use ‘search_text’ if unsure of the actual identifier.
Note: Limit is how many rows to get, for example, 10 limit means will return up to 10 rows, and 10 limit and page 2, means rows 11 to 20 of the results
Body Parameter | Type | Validation | Description | Example |
---|---|---|---|---|
status | string | Enum: [ 00, 99 ] | ||
result txn_date | string($yyyyMMddHHmmss) | Transaction date | 20210723104035 | |
mid | string | Merchant ID | 1000017 | |
name | string | Merchant name | Payex | |
title | string | |||
collection_id | string | Collection ID | owbnr7xq | |
invoice_id | string | Invoice ID | <any string> | |
txn_id | string | Transaction ID | PX10000011627008035 | |
status | string | Enum: [ 00, 99 ] | Status: 00 if create successfully Status: 99 if error occurred | |
customer_name | string | Name of customer | John Doe | |
currency | string | Three-letter code of the transaction’s currency. Will be auto-filled as MYR. | MYR | |
base_amount | number($double) | Transaction base amount | 888 | |
amount | number($double) | Transaction amount | 888 | |
txn_type | string | Used to differentiate transaction types | FPX FPX CCA FPX B2B FPX CCA B2B Direct Debit Mandate – Authorization Mandate – Approval Mandate – Maintenance Mandate – Termination Malaysian Debit Card Malaysian Credit Card Foreign Card Card – Foreign Currency Auto Debit – Authorization GrabPay PayLater by Grab Postpaid PayLater by Grab Instalment Touch ‘n Go eWallet ShopeePay Riipay Split Unpaid | |
fpx_mode | string | Enum: [ 01, 02 ] | Whether or not the customer uses a retail or corporate bank account for FPX payment | 01 – Retail, 02 – Corporate |
fpx_buyer_name | string | Name of FPX buyer | N@me()/ .-_,&Buyer’`~*;: | |
fpx_buyer_id | string | Bank code of FPX buyer | TEST0021 Refer to list of FPX buyer bank code | |
fpx_buyer_bank_name | string | Bank name of FPX buyer | CIMB Bank | |
card_holder_name | string | Cardholder name | N@me()/ .-_,&Buyer’`~*;: | |
card_number | string | Card number | ************1111 | |
card_expiry | string | Card expiration date | 03/27 | |
card_brand | string | Can be any of “VISA”, “MASTERCARD”, “UNIONPAY” | VISA | |
external_txn_id | string | External Transaction ID | 2009151119230241 | |
auth_code | string | Payment response code | 00 | |
auth_number | string | Authorization Number | 15733223 | |
string | Email of customer | test@email.com | ||
contact_number | string | Contact number of customer | 0123456789 | |
delivery_address | string | Delivery address of customer | 48 Jalan Gembira Taman Mega | |
address | string | Address of customer | 48 Jalan Gembira Taman Mega | |
postcode | string | Postcode of customer | 57100 | |
city | string | City of customer | Petaling Jaya | |
state | string | State of customer | Selangor | |
country | string | Country of customer | Malaysia | |
shipping_name | string | Name of the customer for delivery | John Doe | |
shipping_email | string | Email of the customer for delivery | test@email.com | |
shipping_contact_number | string | Contact number of the customer for delivery | 0123456789 | |
shipping_address | string | Address of the customer for delivery | 48 Jalam Gembira Taman Desa | |
shipping_postcode | string | Postcode of the customer for delivery | 57100 | |
shipping_city | string | City of the customer for delivery | Petaling Jaya | |
shipping_state | string | State of the customer for delivery | Selangor | |
shipping_country | string | Country of the customer for delivery | Malaysia | |
description | string | Free-text field for any additional information regarding the payment method. | Annual medical payment | |
reference_number | string | Refers to reference number generated by Payex. Example for: – 0% credit card instalment (Ezbeli) – FPX | 79479 OD12497015877a457621 | |
mandate_reference_number | string | Refers to reference number for mandate generated by Payex | MN10000174107a3b8050 | |
collection_number | string | Refers to collection number generated by Payex | CL10000175f00783ad76 | |
collection_reference_number | string | Collection reference number | ||
payment_intent | string | This refers to Payment Intent endpoint for creating payment forms. | b96165b897c746c0a2a42032e8bfafea | |
split_type | string | Type of split | platform | |
split_description | string | Description of split | platform commission fees | |
items | string | { } | ||
metadata | string | { } | ||
voidable | string | |||
message | string | Success | ||
total_pages | integer |
Get transactions settlements #
Request this endpoint to get transaction settlements by ‘start_date’ and ‘end_date’ as required parameters.
Note: Limit is how many rows to get, for example, 10 limit means will return up to 10 rows, and 10 limit and page 2, means rows 11 to 20 of the results
Body Parameter | Type | Validation | Description | Example |
---|---|---|---|---|
status | string | Enum: [ 00, 99 ] | ||
result date | string($yyyyMMdd) | Date | ||
mid | string | Merchant ID | 1000017 | |
name | string | Merchant name | Payex | |
settled_by | string | Which party settles the transaction | Payex | |
settlement_id | string | Settlement ID | BA100001720231211 | |
txn_id | string | Transaction ID | PX1000017e8efd441f8b | |
reference_number | string | Refers to reference number generated by Payex. Example for: – 0% credit card instalment (Ezbeli) – FPX | 79479 OD12497015877a457621 | |
mandate_reference_number | string | Refers to reference number for mandate generated by Payex | MN1000017c69b3e1954a | |
collection_number | string | Collection Number | CL1000017f7ae4ba18e9 | |
collection_reference_number | string | Collection Reference Number Passed by merchant as optional parameter | <any string> | |
base_currency | string | Base currency | MYR | |
base_amount | number($double) | Base amount | 888 | |
base_mdr | number($double) | Base MDR | 44.4 | |
currency | string | Three-letter code of the settlement’s currency. Will be auto-filled as MYR. | MYR | |
gross_amount | number($double) | Gross settlement amount | 888 | |
mdr | number($double) | Payex fees charged to merchant. Also known as merchant discount rate (MDR) | 44.4 | |
commission | number($double) | Commission amount of referrer | 0 | |
net_amount | number($double) | Net settlement amount (after deduction of MDR) | 843.6 | |
net_amount_payex | number($double) | Net settlement amount (after deduction of Payex MDR) | 0 | |
net_amount_others | number($double) | Net settlement amount (after deduction of DCR MDR) | 843.6 | |
message | string | |||
total_pages | integer |
Void transaction by Transaction ID #
Request this endpoint to cancel pre-authorized transactions with ‘id’ as required parameter.
A successful request returns a HTTP 200
status code with the following response parameters.
Body Parameter | Type | Validation | Description | Example |
---|---|---|---|---|
txn_id | string | Transaction ID | PX1000017e8efd441f8b | |
txn_date | string | Transaction date | 20210723104035 | |
external_txn_id | string | External Transaction ID | 2009151119230241 | |
auth_code | string | Payment response code | 00 | |
auth_no | string | Authorisation Number | ||
error | string | <Error Description> | Invalid Data Format |
A bad request returns a HTTP 400
status code with the following response parameters.
Body Parameter | Type | Validation | Description | Example |
---|---|---|---|---|
txn_id | string | Transaction ID | PX1000017e8efd441f8b | |
txn_date | string | Transaction date | 20210723104035 | |
external_txn_id | string | External Transaction ID | 2009151119230241 | |
auth_code | string | Payment response code | 00 | |
auth_no | string | Authorisation Number | ||
error | string | <Error Description> | Invalid Data Format |
Refund transaction by Transaction ID #
Request this endpoint to refund transactions with ‘id’ and ‘amount’ as required parameters.
- All payment types can be refunded via this endpoint except for Online Banking (FPX).
- Card transactions that have been made on the same day can only be refunded completely.
- Refunded amounts will either be automatically deducted from merchant upcoming settlement, or a payment link will be generated to prompt merchant for manual payment before transaction can be refunded.
A successful request returns a HTTP 200
status code with the following response parameters.
Body Parameter | Type | Validation | Description | Example |
---|---|---|---|---|
txn_id | string | Transaction ID | PX1000017e8efd441f8b | |
txn_date | string | Transaction date | 20210723104035 | |
external_txn_id | string | External Transaction ID | 2009151119230241 | |
auth_code | string | Payment response code | 00 | |
auth_no | string | Authorisation Number | ||
refund_url | string | When there is no upcoming settlement, or refund amount is more than upcoming settlement, a payment link will be generated to prompt merchant for manual payment before transaction can be refunded | ||
error | string | <Error Description> | Invalid Data Format |
A bad request returns a HTTP 400
status code with the following response parameters.
Body Parameter | Type | Validation | Description | Example |
---|---|---|---|---|
txn_id | string | Transaction ID | PX1000017e8efd441f8b | |
txn_date | string | Transaction date | 20210723104035 | |
external_txn_id | string | External Transaction ID | 2009151119230241 | |
auth_code | string | Payment response code | 00 | |
auth_no | string | Authorisation Number | ||
refund_url | string | When there is no upcoming settlement, or refund amount is more than upcoming settlement, a payment link will be generated to prompt merchant for manual payment before transaction can be refunded | ||
error | string | <Error Description> | Invalid Data Format |
Capture pre-authorized transactions by Transaction ID #
Request this endpoint to capture pre-authorized transactions with ‘id’ and ‘amount’ as required parameters.
A successful request returns a HTTP 200
status code with the following response parameters.
Body Parameter | Type | Validation | Description | Example |
---|---|---|---|---|
amount | string | |||
customer_name | string | Name of customer | ||
description | string | Free-text field for any additional information regarding the payment method. | ||
reference_number | string | |||
mandate_reference_number | string | Refers to reference number for mandate generated by Payex | MN10000011621583965 | |
collection_id | string | Collection ID | owbnr7xq | |
invoice_id | string | Invoice ID | ||
txn_id | string | Transaction ID | PX10000011627008035 | |
external_txn_id | string | External Transaction ID | 2009151119230241 | |
response | string | Description of auth_code | Approved | |
auth_code | string | Payment response code | 00 | |
auth_number | string | Authorization Number | 15733223 | |
txn_date | string | Transaction Date | 20210723104035 | |
signature | string | SHA512(secret + | + txn_id) | 3b0806197e8b948a81b2faff2839b3194b9f52707a336e5039a52204a2591abfbd5d4e5aceec4381b15cf0431e02aa6e2c9d17c255e6e7083e47ccfe c182cbaa |
A bad request returns a HTTP 400
status code with the following response parameters.
Body Parameter | Type | Validation | Description | Example |
---|---|---|---|---|
message | string | Bad Request |
Get FPX Bank List #
Request this endpoint to get FPX Bank List with ‘type’ as required parameter.
A successful request returns a HTTP 200
status code with the following response parameters.
Body Parameter | Type | Validation | Description | Example |
---|---|---|---|---|
id | string | |||
displayName | string | |||
status | string |
Splits transaction to other merchant accounts #
Request this endpoint to splits transaction to other merchant accounts with ‘id’ as required parameter.
Body Parameter | Type | Validation | Description | Example |
---|---|---|---|---|
amount required | integer | minimum: 100 | Values should be in cents or multiplied by 100. For example, MYR 10.00 should be inputed as 1000, and 1.00% should be inputed as 100 | 1000 |
split_type required | string | Enum: [ abs, pct ] | Whether split should be absolute amount or percentage amount | abs |
destination required | string | Payex Registered Merchant email for transaction split to | contact@payex.io | |
type required | string | Type of split | platform | |
description | string | Description of split | Platform commission fees |
A successful request returns a HTTP 200
status code with the following response parameters.
Body Parameter | Type | Validation | Description | Example |
---|---|---|---|---|
status | string | Enum: [ 00, 99 ] | Status: 00 if create successfully Status: 99 if error occurred | |
result | string | |||
message | string | Success |
A bad request returns a HTTP 400
status code with the following response parameters.
Body Parameter | Type | Validation | Description | Example |
---|---|---|---|---|
status | string | Enum: [ 00, 99 ] | Status: 00 if create successfully Status: 99 if error occurred | |
result | string | |||
message | string | Bad Request |