Skip to main content
Version: Lastest

API Get payment method list

Endpoint: /api/v1/subs/payment-methods

Method: GET

Header Params

ParamRequiredTypeDescriptionNote
X-APPOTAPAY-AUTHrequiredString How to generate JWT_TOKEN
Content-TyperequiredStringValue: application/json
X-Request-IDoptionalStringUUIDv4 format. Request ID to check when a problem occursmax:42
LanguageoptionalStringThe value vi or en corresponding to the payment link will be 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",
"Language": "vi",
"X-Account-Ref-ID": "9723f73b-9295-4acb-884b-ab6310c2e653"
}

Request params

ParamRequiredTypeDescriptionNote
pageOptionalIntegerPage you need to get information, default: 1
limitOptionalIntegerNumber of items per page, default:20
paymentMethodRefIdOptionalStringUnique reference code of partner
customerIdOptionalStringCustomer ID
paymentMethodOptionalString

Payment method

- CC_SUBS: payment with credit card

- EWALLET_SUBS: payment with ewallet

reusabilityOptionalString

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

- MULTIPLE_USE: may be reused for subsequent payments

Response data

ParamRequiredTypeDescription
dataRequiredArrayReturns an array of matching Payment method object. Returns empty array when there is no result.
metaRequiredObjectPagination information
meta.pageRequiredIntegerCurrent page
meta.limitRequiredIntegerNumber of items per page
meta.totalRequiredIntegerTotal item
meta.pagesRequiredIntegerTotal page

Success

Http Status Code 200 - OK

{
"data": [
{
"paymentMethodRefId": "ASKJLKALK203980",
"paymentMethodId": "6ed0eba4-1e86-4be0-9b00-6beec92953c2",
"customerId": "3e9c3d0e-b0cc-4300-9752-6aaa4c0f0d44",
"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-2151",
"cardMonth": "07",
"cardYear": "2034",
"cardHolderName": "Mai Minh"
}
},
"billing": {
"country": "EC",
"city": "HN",
"provinceState": "CG",
"address": "CG",
"zipcode": "530000"
},
"status": "ACTIVE",
"actions": [
{
"url": "https://acpg.dev.appotapay.com/subscription/authentication/redirect?reference_id=520ccb8f-88f1-4660-a75b-efb8a55f3ab8&signature=21984af4cb91c0f844a6f8762cfc018e74b9d7d32121d3b6da116e2117032416",
"action": "AUTH",
"method": "GET"
}
],
"createdAt": "2024-03-14T10:02:51+07:00",
"updatedAt": "2024-03-14T10:05:54+07:00"
},
{
"partnerRefId": "ASKJLKALK203979",
"paymentMethodId": "01HRVKBXH9W9SZXEMJMRNY2YVD",
"customerId": "01HRVK5K8V0D7ZGNA6PSQGD1DF",
"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-2151",
"cardMonth": "07",
"cardYear": "2034",
"cardHolderName": "Mai Minh"
}
},
"billing": {
"country": "EC",
"city": "HN",
"provinceState": "CG",
"address": "CG",
"zipcode": "530000"
},
"status": "REQUIRES_ACTION",
"actions": [
{
"url": "https://acpg.dev.appotapay.com/subscription/authentication/redirect?reference_id=1bc5458d-fd4e-4bcc-8bd7-093b894e2665&signature=f9c1e781fb5717ac4ca14145291521189773785627d3bd3bd55b537eaaaeb28d",
"action": "AUTH",
"method": "GET"
}
],
"createdAt": "2024-03-13T16:47:47+07:00",
"updatedAt": "2024-03-13T16:47:48+07:00"
}
],
"meta": {
"page": 1,
"limit": 10,
"total": 2,
"pages": 1
}
}

Failure

HTTP Status Code != 200

Error response params

ParamRequiredTypeDescription
errorCoderequiredIntegerError code
messagerequiredStringError message
errorsoptionalArrayDetailed error description
errors.*.fieldoptionalStringField data is corrupted
errors.*.reasonoptionalStringDescription of the data field in error
{
"errorCode": 500,
"message": "Server error"
}

Common error code table

Full error code, please check this error code list

Error codeDescription
0Success
1Missing or Invalid Params
11Partner is not found
13Partner has been blocked
14API Key is invalid
15API Key is not activated or blocked
92IP is not allowed to access
99Undefined error, please contact AppotaPay for more detailed information
401Unauthorized
500Server error