API Get payment method list
Endpoint: /api/v1/subs/payment-methods
Method: GET
Header Params
Param | Required | Type | Description | Note |
---|---|---|---|---|
X-APPOTAPAY-AUTH | required | String | How to generate JWT_TOKEN | |
Content-Type | required | String | Value: application/json | |
X-Request-ID | optional | String | UUIDv4 format. Request ID to check when a problem occurs | max:42 |
Language | optional | String | The value vi or en corresponding to the payment link will be Vietnamese or English, (default: vi) | in:vi,en |
X-Account-Ref-ID | optional | String | 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
Param | Required | Type | Description | Note |
---|---|---|---|---|
page | Optional | Integer | Page you need to get information, default: 1 | |
limit | Optional | Integer | Number of items per page, default:20 | |
paymentMethodRefId | Optional | String | Unique reference code of partner | |
customerId | Optional | String | Customer ID | |
paymentMethod | Optional | String | Payment method - CC_SUBS: payment with credit card - EWALLET_SUBS: payment with ewallet | |
reusability | Optional | String | Describes whether or not the payment method can be reused for subsequent payments. - MULTIPLE_USE: may be reused for subsequent payments |
Response data
Param | Required | Type | Description |
---|---|---|---|
data | Required | Array | Returns an array of matching Payment method object. Returns empty array when there is no result. |
meta | Required | Object | Pagination information |
meta.page | Required | Integer | Current page |
meta.limit | Required | Integer | Number of items per page |
meta.total | Required | Integer | Total item |
meta.pages | Required | Integer | Total 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
Param | Required | Type | Description |
---|---|---|---|
errorCode | required | Integer | Error code |
message | required | String | Error message |
errors | optional | Array | Detailed error description |
errors.*.field | optional | String | Field data is corrupted |
errors.*.reason | optional | String | Description 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 code | Description |
---|---|
0 | Success |
1 | Missing or Invalid Params |
11 | Partner is not found |
13 | Partner has been blocked |
14 | API Key is invalid |
15 | API Key is not activated or blocked |
92 | IP is not allowed to access |
99 | Undefined error, please contact AppotaPay for more detailed information |
401 | Unauthorized |
500 | Server error |