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:
Param | Type | Description |
---|---|---|
paymentMethodRefId | String | Unique reference code of partner Partner-provided identifier for the payment method. |
paymentMethodId | String | Payment Method ID |
customerId | String | Customer ID |
country | String | Country code of transaction |
currency | String | Currency unit |
paymentMethod | String | Payment method - CC_SUBS: payment with credit card - EWALLET_SUBS: payment with ewallet |
reusability | String | Describes whether or not the payment method can be reused for subsequent payments. - MULTIPLE_USE: may be reused for subsequent payments |
card | Object | Card information |
card.properties | Object | Properties |
card.properties.skipThreeDSecure | String | 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.successReturnUrl | String | 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.failureReturnUrl | String | 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.cardInfo | Object | Card information |
card.cardInfo.cardNumber | String | Card number |
card.cardInfo.cardMonth | String | Card expiry month, contain the leading zero (E.g. 03) |
card.cardInfo.cardYear | String | Card expiry year (E.g. 2024 |
card.cardInfo.cardHolderName | String | Card holder name |
ewallet | Object | Ewallet information |
ewallet.serviceCode | String | Ewallet code |
ewallet.properties | Object | Properties |
ewallet.properties.successReturnUrl | String | URL where the end-customer is redirected if the linking is successful. |
ewallet.properties.pendingReturnUrl | String | URL where the end-customer is redirected if the linking is pending. |
ewallet.properties.failureReturnUrl | String | URL where the end-customer is redirected if the linking is failed. |
ewallet.account | Object | Wallet account information |
ewallet.account.accountNumber | String | Account number |
ewallet.account.name | String | Account name |
billing | Object | Billing information |
billing.country | String | Country code |
billing.city | String | City |
billing.provinceState | String | Province/ state |
billing.address | String | Address |
billing.zipcode | String | Zip code |
status | String | 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 |
actions | Array | If status is REQUIRES_ACTION, the object has specific information to perform the next action to activate the payment method |
actions.*.url | String | URL to perform action |
actions.*.action | String | 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.*.method | String | HTTP method for calling the url. - GET - POST |
createdAt | String | Creation time (standard format: ISO-8601) |
updatedAt | String | Last 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"
}