Skip to main content
Version: Lastest

Check transaction status

Check transaction status

Chat with AI▼

Check transaction status API​

Endpoint: GET /api/v2/orders/transaction

Header Params​

ParamsRequirementData typeDescriptionNote
X-APPOTAPAY-AUTHrequiredStringTo create a JWT_TOKEN
Content-TyperequiredStringValue: application/json
X-Request-IDoptionalStringFormat is UUIDv4. Request ID for troubleshooting purposesmax:40
X-LanguageoptionalStringValue vi or en,The value corresponding to the payment link can be in Vietnamese or English (default: vi)

in:vi,en

X-Account-Ref-IDoptionalString

Iidentifier of the sub account provided by AppotaPay.

Mandatory be passed over when processing payment for transactions of owner-type sub account

{
"X-APPOTAPAY-AUTH": "JWT_TOKEN",
"Content-Type": "application/json",
"X-Request-ID": "Your_Unique_id",
"X-Language": "vi",
"X-Account-Ref-ID": "9723f73b-9295-4acb-884b-ab6310c2e653"
}

HTTP Request:

ParamsRequirementData typeDescriptionNote
referenceIdrequiredStringTransaction reference codealphanumeric
typeoptionalString

Transaction reference type

TRANSACTION_ID Get by transaction code on AppotaPay's side

PARTNER_ORDER_ID Get by transaction code on the Partner's side

Default: TRANSACTION_ID

In the case where type='TRANSACTION_ID', referenceId is the transaction code returned by AppotaPay to the partner

In case type=PARTNER_ORDER_ID, referenceId is the orderId code transmitted by the partner when creating a transaction

HTTP Response:

ParamsRequirementData typeDescription
transactionrequiredObjectTransaction information
transaction.transactionIdrequiredStringThe transaction code on AppotaPay's side
transaction.reconciliationIdoptionalStringhe settlement transaction code when the transaction is successful
transaction.partnerCoderequiredStringPartnercode
transaction.statusrequiredString[Transaction status](#Status code table)
transaction.errorCoderequiredIntegerError code table
transaction.errorMessagerequiredStringError description
transaction.orderAmountrequiredIntegerOrder amount
transaction.amountrequiredIntegerThe payment amount to the provider
transaction.discountAmountrequiredIntegerDiscount amount
transaction.currencyrequiredStringCurrency unit
transaction.bankCodeoptionalStringBankcode Selected by the customern
transaction.paymentMethodrequiredStringPayment method](./payment-code.md#Payment method code tablen)
transaction.actionrequiredStringType of payment
transaction.feeoptionalObjectPayment fee
transaction.fee.customer_feeoptionalStringPayment fee charged to the custome
transaction.createdAtrequiredStringTransaction creation time. (in RFC-3339 standard format)
transaction.updatedAtrequiredStringTTransaction update time. (in RFC-3339 standard format)
partnerReference.order.idrequiredStringPartner's order code
partnerReference.order.inforequiredStringOrder information
partnerReference.order.extraDatarequiredStringOptional additional information
promotionInfooptionalStringPromotion code information
promotionInfo.idrequiredStringPromotion code identifier
promotionInfo.coderequiredStringPromotion code
cardInfooptionalObjectReturned when the transaction is successful and there is card information
cardInfo.cardNumberrequiredStringCard/ Account number
cardInfo.cardNameoptionalStringCard/ Account name
cardInfo.cardMonthrequiredStringThe month recorded on the card in DD format, e.g., 07
cardInfo.cardYearrequiredStringThe year recorded on the card, in YY format, e.g., 23
cardInfo.countryCodeoptionalStringThe country code consists of 2 characters according to ISO 3166-2 standard
cardInfo.typerequiredStringPayment type (card/account)
installmentInfooptionalObjectReturned when the transaction is installment payment and there is installment information
installmentInfo.installmentTransactionIdoptionalStringInstallment transaction code
installmentInfo.statusoptionalStringInstallment transfer status
installmentInfo.statusCanceloptionalStringInstallment cancellation status
installmentInfo.bankCodeoptionalStringInstallment bank
installmentInfo.errorCodeoptionalIntegerError code (returned when status != success)
installmentInfo.errorMessageoptionalStringError description (returned when status != success)
installmentInfo.paymentAmountoptionalStringTotal installment amount
installmentInfo.payPerMonthoptionalStringMonthly installment amount
installmentInfo.gracePeriodoptionalStringInstallment term
installmentInfo.approvalCodeoptionalStringIssue bank transaction code
installmentInfo.createdAtoptionalStringInstallment transaction creation time. (in RFC-3339 standard format)
installmentInfo.updatedAtoptionalStringInstallment transaction update time. (in RFC-3339 standard format)
installmentInfo.completedAtoptionalStringInstallment transaction completion time. (in RFC-3339 standard format)
tokenInfooptionalObjectSaved token information
tokenInfo.tokenoptionalStringToken code
tokenInfo.statusoptionalStringToken status
tokenInfo.typeoptionalStringToken type (CARD / ACCOUNT)
tokenInfo.numberoptionalStringCard/account number
tokenInfo.holder_nameoptionalStringCardholder/account name
tokenInfo.card_monthoptionalStringValidity/expiration month on card
tokenInfo.card_yearoptionalStringValidity/expiration year on the card

Status code table​

StatusDescription
pendingThe transaction is pending processing.
processingThe transaction is currently being processed.
successThe transaction is successful.
errorThe transaction has failed.

Example Response​

{
"transaction": {
"transactionId": "AP231442984535",
"reconciliationId": "AP231442984535",
"partnerCode": "TEST",
"status": "pending",
"errorCode": 35,
"errorMessage": "Transaction is being processed, please check it later",
"orderAmount": 50000,
"amount": 50000,
"discountAmount": 0,
"currency": "VND",
"bankCode": "",
"paymentMethod": "ALL",
"action": "PAY",
"fee": {
"customer_fee": 0
},
"createdAt": "2023-11-27T14:46:20.000",
"updatedAt": "2023-11-27T14:46:20.000"
},
"partnerReference": {
"order": {
"id": "N8kOP8edZ",
"info": "test thanh toan",
"extraData": ""
}
},
"tokenInfo": {
"token": "1814074501511385",
"status": "active",
"type": "CARD",
"number": "400000-1091",
"holder_name": "",
"card_month": "03",
"card_year": "07"
},
"promotionInfo": null,
"cardInfo": null,
"installmentInfo": null
}

Error​

HTTP Status Code != 200 With the returned errorCode, please refer to the error code table here

Error response params​

ParamsRequirementData typeDescription
errorCoderequiredIntegerError code
messagerequiredStringError description
errorsoptionalArray of ObjectDetailed error description of each field if available
errors.fieldrequiredObjectField with error
errors.reasonrequiredObjectDescription of the field with error
{
"errorCode": 1,
"message": "Invalid Params",
"errors": [
{
"field": "transaction.amount",
"reason": "Field amount is required"
},
{
"field": "transaction.currency",
"reason": "Field currency is required"
}
]
}

Error code table​

error codeDescription
1Missing or invalid request information
36The transaction does not exist
500The system encountered an error, please try again later

Code Examples​

curl --location 'https://gateway.dev.appotapay.com/api/v2/orders/transaction?referenceId=AP231442984535&type=TRANSACTION_ID' \
--header 'X-APPOTAPAY-AUTH: JWT_TOKEN' \
--header 'Content-Type: application/json' \
--header 'X-Request-ID: Your_Unique_id' \
--header 'X-Language: vi' \
--header 'X-Account-Ref-ID: 9723f73b-9295-4acb-884b-ab6310c2e653'

Request​

REQUEST

Development server
The value corresponding to the payment link can be in Vietnamese or English (default: vi)