Skip to main content
Version: Lastest

Payment Method Object

This object is referred to the source of funds or the payment instrument used for the payment. Each object has the following structure:

ParamTypeDescription
paymentMethodRefIdString

Unique reference code of partner

Partner-provided identifier for the payment method.

paymentMethodIdStringPayment Method ID
customerIdStringCustomer ID
countryStringCountry code of transaction
currencyStringCurrency unit
paymentMethodString

Payment method

- CC_SUBS: payment with credit card

- EWALLET_SUBS: payment with ewallet

reusabilityString

Describes whether or not the payment method can be reused for subsequent payments.

- MULTIPLE_USE: may be reused for subsequent payments

cardObjectCard information
card.propertiesObjectProperties
card.properties.skipThreeDSecureString

This field value is only configurable for reusability = MULTIPLE_USE to indicate whether to perform 3DS during the linking phase.

- YES: skip to perform 3DS

- NO: perform 3DS

card.properties.successReturnUrlString

URL where the end-customer is redirected if the linking is successful.

AppotaPay will send the result via the URL with some parameters like this: LINK

card.properties.failureReturnUrlString

URL where the end-customer is redirected if the linking is failed.

AppotaPay will send the result via the URL with some parameters like this: LINK

card.cardInfoObjectCard information
card.cardInfo.cardNumberStringCard number
card.cardInfo.cardMonthStringCard expiry month, contain the leading zero (E.g. 03)
card.cardInfo.cardYearStringCard expiry year (E.g. 2024
card.cardInfo.cardHolderNameStringCard holder name
ewalletObjectEwallet information
ewallet.serviceCodeStringEwallet code
ewallet.propertiesObjectProperties
ewallet.properties.successReturnUrlStringURL where the end-customer is redirected if the linking is successful.
ewallet.properties.pendingReturnUrlStringURL where the end-customer is redirected if the linking is pending.
ewallet.properties.failureReturnUrlStringURL where the end-customer is redirected if the linking is failed.
ewallet.accountObjectWallet account information
ewallet.account.accountNumberStringAccount number
ewallet.account.nameStringAccount name
billingObjectBilling information
billing.countryStringCountry code
billing.cityStringCity
billing.provinceStateStringProvince/ state
billing.addressStringAddress
billing.zipcodeStringZip code
statusString

Status:

- PENDING: request to initiate payment method has been sent, AppotaPay is processing to activate the payment method, then waiting for callback from AppotaPay to update status

- REQUIRES_ACTION: additional actions need to be performed to activate the payment method, common actions are OTP validation or redirecting the user to the authentication page

- ACTIVE: the payment method has been activated

- INACTIVE: payment method cannot be used to make transactions

- EXPIRED: authorization has expired or been invalid

- FAILED: create payment method unsuccessfully

actionsArrayIf status is REQUIRES_ACTION, the object has specific information to perform the next action to activate the payment method
actions.*.urlStringURL to perform action
actions.*.actionString

The purpose the corresponding action

- AUTH - Trigger this action in order to authorize linking or payment

- RESEND_AUTH - Trigger this action in order to resend the authorization code to the end-customer

actions.*.methodString

HTTP method for calling the url.

- GET

- POST

createdAtStringCreation time (standard format: ISO-8601)
updatedAtStringLast updated time (standard format: ISO-8601)

Example

{
"paymentMethodRefId": "ASKJLKALK16640",
"paymentMethodId": "01HRVJY8ZMZFHRHE3KG2S24KKW",
"customerId": "01HRVM5AA6JCKZJ8ERZ6MKKFJZ",
"country": "VN",
"currency": "VND",
"paymentMethod": "CC_SUBS",
"reusability": "MULTIPLE_USE",
"card": {
"properties": {
"skipThreeDSecure": "NO",
"successReturnUrl": "https://devtool.vn/success",
"failureReturnUrl": "https://devtool.vn/failure"
},
"cardInfo": {
"cardNumber": "520000-1096",
"cardMonth": "07",
"cardYear": "2034",
"cardHolderName": "Mai Minh"
}
},
"billing": {
"country": "VN",
"city": "HN",
"provinceState": "CG",
"address": "CG",
"zipcode": "530000"
},
"status": "REQUIRES_ACTION",
"actions": [
{
"url": "https://acpg.dev.appotapay.com/subscription/authentication/redirect?reference_id=35681250-792f-4ad2-8e53-0ac795fa75ff&signature=5f40d475cd227065135186be8299b94fb70aad49729303e52b59233220c4fcfb",
"action": "AUTH",
"method": "GET"
}
],
"createdAt": "2024-01-29T11:30:31+07:00",
"updatedAt": "2024-01-29T11:30:32+07:00"
}