Skip to main content
Version: Lastest

Charge: Capture

Charge: Capture

Chat with AI▼

This API will allow captures up to 7 days after an authorization

EndPoint​

POST /credit-card/:authorizationId/capture

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​

Query Parameters​

ParametersRequirementData typeDescription
authorizationIdrequiredStringID of authorization request result

Body​

ParametersRequirementData typeDescriptionNote
amountrequiredStringAmount to be captured. Can be up to amount of authorization but not greater than authorized amount.Min: 1000
currencyrequiredStringPayment currency. Should be a 3-letter code following the ISO-4217 standardSupport VND

Example Request​

{
"amount": 1000000,
"currency": "VND"
}

Response Params​

{
"id": "01HQHRS9P9J5YPCJ09D94VW84F",
"authenticationId": "01HQHRPNYW78CQJK7CAW1SJP9F",
"merchantRefId": "hi8xGfznb",
"status": "CAPTURED",
"authorizedAmount": 1000000,
"capturedAmount": 1000000,
"currency": "VND",
"approvalCode": "831000",
"eci": "02",
"reconciliationId": "AP241446381046",
"bankReconciliationId": "7089196646896845103954",
"tokenId": "01hqhrp3yhff7z7bvtq6whwz8t",
"card": {
"number": "520000XXXXXX2151",
"expirationMonth": "12",
"expirationYear": "29",
"cardBrand": "MASTERCARD",
"cardType": "CREDIT",
"countryCode": "VI"
},
"chargeType": "BY_MULTIPLE_TOKEN",
"createdAt": "2024-02-26T10:54:22+07:00",
"updatedAt": "2024-02-26T10:56:04+07:00"
}

Success​

Http Status Code 200 - OK

The response is the same with Charge: Create API

Error​

HTTP Status Code != 200

Code Examples​

curl --location 'https://gateway.dev.appotapay.com/credit-card/01HQHRPNYW78CQJK7CAW1SJP9F/capture' \
--header 'X-APPOTAPAY-AUTH: JWT_TOKEN' \
--header 'Content-Type: application/json' \
--header 'X-Request-ID: Your_Unique_id' \
--header 'Language: vi' \
--header 'X-Account-Ref-ID: 9723f73b-9295-4acb-884b-ab6310c2e653' \
-d '{
"amount": 1000000,
"currency": "VND"
}'

Request​

REQUEST

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