View Categories

Transactions API Endpoint

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.

screenshot 2023 12 27 131844

Successful response returns parameters below with status code 200

Body ParameterTypeValidationDescriptionExample
txn_datestring($yyyyMMddHHmmss)Transaction date
midstringMerchant ID number
namestringMerchant name
titlestring
collection_idstringDefault collection id will be used if not providedowbnr7xq
invoice_idstringInvoice ID<any string>
txn_idstringTransaction ID of PayexPX10000011627008035
statusstringEnum:
[ 00, 99 ]
Status: 00 if create successfully
Status: 99 if error occurred
00
customer_namestringName of the customerTest Customer
currencystringThree-letter code of the transaction’s currency. Will be auto-filled as MYR.MYR
base_amountnumber($double)Base amount
amountnumber($double)Amount
txn_typestringUsed to differentiate transaction typesFPX
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_modestringEnum:
[ 01, 02 ]
Whether or not the customer uses a retail or corporate bank account for FPX payment01 – Retail, 02 – Corporate
fpx_buyer_namestringName of FPX buyerTest Customer
fpx_buyer_bank_idstringBank code of FPX buyerTEST0021

Refer to list of FPX buyer bank code
fpx_buyer_bank_namestringBank name of FPX buyerCIMB Bank
card_holder_namestringCardholder nameN@me()/ .-_,&Buyer’`~*;:
card_numberstringCard number************1111
card_expirystringCard expiration date03/27
card_brandstringCan be any of “VISA”, “MASTERCARD”, “UNIONPAY”VISA
external_txn_idstringExternal Transaction ID2009151119230241
auth_codestringPayment response code00
auth_numberstringAuthorization number15733223
emailstringEmail of customertest@email.com
contact_numberstringContact number of customer0123456789
delivery_addressstringDelivery address of customer48 Jalan Gembira Taman Mega
addressstringAddress of customer48 Jalan Gembira Taman Mega
postcodestringPostcode of customer57100
citystringCity of customerPetaling Jaya
statestringState of customerSelangor
countrystringCountry of customerMalaysia
shipping_namestringName of the customer for deliveryJohn Doe
shipping_emailstringEmail of the customer for deliverytest@email.com
shipping_contact_numberstringContact number of the customer for delivery0123456789
shipping_addressstringAddress of the customer for delivery48 Jalan Gembira Taman Mega
shipping_postcodestringPostcode of the customer for delivery57100
shipping_citystringCity of the customer for deliveryPetaling Jaya
shipping_statestringState of the customer for deliverySelangor
shipping_countrystringCountry of the customer for deliveryMalaysia
descriptionstringFree-text field for any additional information regarding the mandate authorization payment methodBeauty Product
reference_numberstringPassed by merchant as optional parameter.<any string>
mandate_reference_numberstringRefers to reference number for mandate generated by PayexMN10000171626860885
collection_numberstringRefers to collection number generated by PayexCL10000023077b6050c4
collection_reference_numberstringPassed by merchant as optional parameter<any string>
payment_intentstringThis refers to Payment Intent endpoint for creating payment forms.b96165b897c746c0a2a42032e8bfafea
split_typestringType of splitplatform
split_descriptionstringDescription of splitplatform commission fees
itemsstring{
}
metadatastring{
}
voidablestring

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.

screenshot 2023 12 28 164953
screenshot 2023 12 28 165045

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 ParameterTypeValidationDescriptionExample
statusstringEnum:
[ 00, 99 ]
result
txn_date

string($yyyyMMddHHmmss)

Transaction date

20210723104035
midstringMerchant ID1000017
namestringMerchant namePayex
titlestring
collection_idstringCollection IDowbnr7xq
invoice_idstringInvoice ID<any string>
txn_idstringTransaction IDPX10000011627008035
statusstringEnum:
[ 00, 99 ]
Status: 00 if create successfully
Status: 99 if error occurred
customer_namestringName of customerJohn Doe
currencystringThree-letter code of the transaction’s currency. Will be auto-filled as MYR.MYR
base_amountnumber($double)Transaction base amount888
amountnumber($double)Transaction amount888
txn_typestringUsed to differentiate transaction typesFPX
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_modestringEnum:
[ 01, 02 ]
Whether or not the customer uses a retail or corporate bank account for FPX payment01 – Retail, 02 – Corporate

fpx_buyer_namestringName of FPX buyerN@me()/ .-_,&Buyer’`~*;:
fpx_buyer_idstringBank code of FPX buyerTEST0021

Refer to list of FPX buyer bank code
fpx_buyer_bank_namestringBank name of FPX buyerCIMB Bank
card_holder_namestringCardholder nameN@me()/ .-_,&Buyer’`~*;:
card_numberstringCard number************1111
card_expirystringCard expiration date03/27
card_brandstringCan be any of “VISA”, “MASTERCARD”, “UNIONPAY”VISA
external_txn_idstringExternal Transaction ID2009151119230241
auth_codestringPayment response code00
auth_numberstringAuthorization Number15733223
emailstringEmail of customertest@email.com
contact_numberstringContact number of customer0123456789
delivery_addressstringDelivery address of customer48 Jalan Gembira Taman Mega
addressstringAddress of customer48 Jalan Gembira Taman Mega
postcodestringPostcode of customer57100
citystringCity of customerPetaling Jaya
statestringState of customerSelangor
countrystringCountry of customerMalaysia
shipping_namestringName of the customer for deliveryJohn Doe
shipping_emailstringEmail of the customer for deliverytest@email.com
shipping_contact_numberstringContact number of the customer for delivery0123456789
shipping_addressstringAddress of the customer for delivery48 Jalam Gembira Taman Desa
shipping_postcodestringPostcode of the customer for delivery57100
shipping_citystringCity of the customer for deliveryPetaling Jaya
shipping_statestringState of the customer for deliverySelangor
shipping_countrystringCountry of the customer for deliveryMalaysia
descriptionstringFree-text field for any additional information regarding the payment method.Annual medical payment
reference_numberstringRefers to reference number generated by Payex. Example for:
– 0% credit card instalment (Ezbeli)
– FPX


79479
OD12497015877a457621
mandate_reference_numberstringRefers to reference number for mandate generated by PayexMN10000174107a3b8050
collection_numberstringRefers to collection number generated by PayexCL10000175f00783ad76
collection_reference_numberstringCollection reference number
payment_intentstringThis refers to Payment Intent endpoint for creating payment forms.b96165b897c746c0a2a42032e8bfafea
split_typestringType of splitplatform
split_descriptionstringDescription of splitplatform commission fees
itemsstring{
}
metadatastring{
}
voidablestring
messagestringSuccess
total_pagesinteger

Get transactions settlements #

Request this endpoint to get transaction settlements by ‘start_date’ and ‘end_date’ as required parameters.

screenshot 2023 12 29 111121

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 ParameterTypeValidationDescriptionExample
statusstringEnum:
[ 00, 99 ]
result
date

string($yyyyMMdd)

Date
midstringMerchant ID1000017
namestringMerchant namePayex
settled_bystringWhich party settles the transactionPayex
settlement_idstringSettlement IDBA100001720231211
txn_idstringTransaction IDPX1000017e8efd441f8b
reference_numberstringRefers to reference number generated by Payex. Example for:
– 0% credit card instalment (Ezbeli)
– FPX


79479
OD12497015877a457621
mandate_reference_numberstringRefers to reference number for mandate generated by PayexMN1000017c69b3e1954a
collection_numberstringCollection NumberCL1000017f7ae4ba18e9
collection_reference_numberstringCollection Reference Number

Passed by merchant as optional parameter
<any string>
base_currencystringBase currencyMYR
base_amountnumber($double)Base amount 888
base_mdrnumber($double)Base MDR44.4
currencystringThree-letter code of the settlement’s currency. Will be auto-filled as MYR.MYR
gross_amountnumber($double)Gross settlement amount888
mdrnumber($double)Payex fees charged to merchant.

Also known as merchant discount rate (MDR)
44.4
commissionnumber($double)Commission amount of referrer0
net_amountnumber($double)Net settlement amount (after deduction of MDR)843.6
net_amount_payexnumber($double)Net settlement amount (after deduction of Payex MDR)0
net_amount_othersnumber($double)Net settlement amount (after deduction of DCR MDR)843.6
messagestring
total_pagesinteger

Void transaction by Transaction ID #

Request this endpoint to cancel pre-authorized transactions with ‘id’ as required parameter.

screenshot 2023 12 29 144520

A successful request returns a HTTP 200 status code with the following response parameters.

Body ParameterTypeValidationDescriptionExample
txn_idstringTransaction IDPX1000017e8efd441f8b
txn_datestringTransaction date20210723104035
external_txn_idstringExternal Transaction ID2009151119230241
auth_codestringPayment response code00
auth_nostringAuthorisation Number
errorstring<Error Description>Invalid Data Format

A bad request returns a HTTP 400 status code with the following response parameters.

Body ParameterTypeValidationDescriptionExample
txn_idstringTransaction IDPX1000017e8efd441f8b
txn_datestringTransaction date20210723104035
external_txn_idstringExternal Transaction ID2009151119230241
auth_codestringPayment response code00
auth_nostringAuthorisation Number
errorstring<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.
screenshot 2024 01 01 163613

A successful request returns a HTTP 200 status code with the following response parameters.

Body ParameterTypeValidationDescriptionExample
txn_idstringTransaction IDPX1000017e8efd441f8b
txn_datestringTransaction date20210723104035
external_txn_idstringExternal Transaction ID2009151119230241
auth_codestringPayment response code00
auth_nostringAuthorisation Number
refund_urlstringWhen 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
errorstring<Error Description>Invalid Data Format

A bad request returns a HTTP 400 status code with the following response parameters.

Body ParameterTypeValidationDescriptionExample
txn_idstringTransaction IDPX1000017e8efd441f8b
txn_datestringTransaction date20210723104035
external_txn_idstringExternal Transaction ID2009151119230241
auth_codestringPayment response code00
auth_nostringAuthorisation Number
refund_urlstringWhen 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
errorstring<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.

screenshot 2024 01 01 164635

A successful request returns a HTTP 200 status code with the following response parameters.

Body ParameterTypeValidationDescriptionExample
amountstring
customer_namestringName of customer
descriptionstringFree-text field for any additional information regarding the payment method.
reference_numberstring
mandate_reference_numberstringRefers to reference number for mandate generated by PayexMN10000011621583965

collection_idstringCollection IDowbnr7xq
invoice_idstringInvoice ID
txn_idstringTransaction IDPX10000011627008035
external_txn_idstringExternal Transaction ID2009151119230241
responsestringDescription of auth_codeApproved
auth_codestringPayment response code00
auth_numberstringAuthorization Number15733223
txn_datestringTransaction Date20210723104035
signaturestringSHA512(secret + | + txn_id)3b0806197e8b948a81b2faff2839b3194b9f52707a336e5039a52204a2591abfbd5d4e5aceec4381b15cf0431e02aa6e2c9d17c255e6e7083e47ccfe
c182cbaa

A bad request returns a HTTP 400 status code with the following response parameters.

Body ParameterTypeValidationDescriptionExample
messagestringBad Request

Get FPX Bank List #

Request this endpoint to get FPX Bank List with ‘type’ as required parameter.

screenshot 2024 01 01 165315

A successful request returns a HTTP 200 status code with the following response parameters.

Body ParameterTypeValidationDescriptionExample
idstring
displayNamestring
statusstring

Splits transaction to other merchant accounts #

Request this endpoint to splits transaction to other merchant accounts with ‘id’ as required parameter.

screenshot 2024 01 01 165737
Body ParameterTypeValidationDescriptionExample
amount
required
integerminimum: 100Values 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 1001000
split_type
required
stringEnum:
[ abs, pct ]
Whether split should be absolute amount or percentage amountabs
destination
required
stringPayex Registered Merchant email for transaction split tocontact@payex.io
type
required
stringType of splitplatform
descriptionstringDescription of splitPlatform commission fees

A successful request returns a HTTP 200 status code with the following response parameters.

Body ParameterTypeValidationDescriptionExample
statusstringEnum:
[ 00, 99 ]
Status: 00 if create successfully
Status: 99 if error occurred
resultstring
messagestringSuccess

A bad request returns a HTTP 400 status code with the following response parameters.

Body ParameterTypeValidationDescriptionExample
statusstringEnum:
[ 00, 99 ]
Status: 00 if create successfully
Status: 99 if error occurred
resultstring
messagestringBad Request
Scroll to Top