Capture a previously authorized credit card charge
POST/charge/:merchantChargeId/capture
Capture a previously authorized credit card charge
Request​
Path Parameters
Possible values: >= 6 characters
and <= 36 characters
, Value must match regular expression ^([a-zA-Z0-9-]+$)$
Unique external identifier for the charge, defined by the merchant's system.
Header Parameters
Include the 'caller-origin' property as a string in the header of REST requests only if the application is an e-commerce platform, otherwise, don't include it.
- application/json
Body
Possible values: >= 1
Payment amount in cents
Responses​
- 200
- 400
- 401
- 415
- 500
OK
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Possible values: [CANCELED
, DENIED
, ERROR
, PAID
, PARTIAL
, PRE_AUTHORIZED
, REFUNDED
, CHARGEBACK
]
transactions
object[]
Possible values: [CREDIT
, WALLET
, PIX
]
Enum [ CREDIT(Credit card), WALLET(QRCode PicPay), PIX(Pix)]
Possible values: [CANCELED
, CHARGEBACK
, DENIED
, ERROR
, EXPIRED
, PAID
, PARTIALLY_REFUNDED
, PENDING
, PRE_AUTHORIZED
, REFUNDED
]
ISO 8601 format. Example: 2022-05-01T16:00:00-03:00 (means it was created on 01/05/2022 at 16:00 in the -03:00 time zone)
ISO 8601 format. Example: 2022-05-01T16:00:00-03:00 (means it was updated on 01/05/2022 at 16:00 in the -03:00 time zone)
credit
object
Possible values: >= 6 characters
and <= 36 characters
Possible values: [VISA
, MASTERCARD
, AMEX
, ELO
, HIPERCARD
, ALELO
]
Possible values: non-empty
, Value must match regular expression ^[\p{L} ]+$
Possible values: Value must match regular expression ^\d{11}$|^\d{14}$|^[A-Z0-9]{8,9}$
Possible values: [NONE
, MERCHANT
]
Default value: NONE
Enum [ NONE(Spot transaction), MERCHANT(Transaction in installments by the merchant, i.e. without interest)]
Error message code when the charge status is DENIED, according to Abecs 021. Look for it in the API Codes and Returns documentation menu.
Error message that accompanies the reasonCode attribute that occurs when the charge status is DENIED, according to Abecs 021. Look for it in the API codes and returns documentation menu.
wallet
object
Wallet response
ISO 8601 format. Example: 2022-05-01T16:00:00-03:00 (means it will expire on 01/05/2022 at 16:00 in the -03:00 time zone)
{
"merchantChargeId": "string",
"id": "string",
"chargeStatus": "PRE_AUTHORIZED",
"amount": 0,
"originalAmount": 0,
"refundedAmount": 0,
"transactions": [
{
"paymentType": "CREDIT",
"amount": 0,
"originalAmount": 0,
"refundedAmount": 0,
"transactionStatus": "PRE_AUTHORIZED",
"createdAt": "2022-05-01T16:00:00-03:00",
"updatedAt": "2022-05-01T16:00:00-03:00",
"transactionId": "string",
"softDescriptor": "string",
"mac": "string",
"credit": {
"nsu": "string",
"cardNumber": "string",
"authorizationCode": "string",
"authorizationResponseCode": "string",
"brand": "VISA",
"cardholderName": "string",
"cardholderDocument": "string",
"expirationMonth": 0,
"expirationYear": 0,
"installmentNumber": 0,
"installmentType": "NONE",
"reasonCode": "string",
"reasonMessage": "string"
},
"wallet": {
"qrCode": "string",
"qrCodeBase64": "string",
"expiresAt": "2022-05-01T16:00:00-03:00"
}
}
]
}
{
"merchantChargeId": "8086bfd7-6241-4f76-81d8-70460533ce74",
"id": "ed50d469-ae7d-4a3d-a946-6e399cb981bb",
"chargeStatus": "PAID",
"amount": 1000,
"originalAmount": 1000,
"refundedAmount": 0,
"transactions": [
{
"paymentType": "CREDIT",
"amount": 1000,
"originalAmount": 1000,
"refundedAmount": 0,
"transactionStatus": "PAID",
"createdAt": "2023-11-08T10:42:36-03:00",
"updatedAt": "2023-11-08T10:42:36-03:00",
"transactionId": "1100000000000000000",
"softDescriptor": "teste softDescriptor",
"errorMessage": null,
"credit": {
"nsu": "000000002",
"cardNumber": null,
"authorizationCode": "000000",
"authorizationResponseCode": "000000",
"brand": "ELO",
"cardholderName": "Pessoa da Silva",
"cardholderDocument": "35213198066",
"expirationMonth": null,
"expirationYear": null,
"installmentNumber": 0,
"installmentType": "NONE"
}
}
]
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
errors
object[]
{
"message": "string",
"success": true,
"businessCode": "string",
"errors": [
{
"message": "must be a well-formed UUID string",
"field": "merchantChargeId"
}
]
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
errors
object[]
{
"message": "string",
"success": true,
"businessCode": "string",
"errors": [
{
"message": "must be a well-formed UUID string",
"field": "merchantChargeId"
}
]
}
{
"message": "Authorization token not found.",
"success": false,
"errors": {
"message": "Authorization token not found",
"field": "Authorization Token"
}
}
Unsupported Media Type
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
errors
object[]
{
"message": "string",
"success": true,
"businessCode": "string",
"errors": [
{
"message": "must be a well-formed UUID string",
"field": "merchantChargeId"
}
]
}
{
"message": "Request object is invalid or incorrectly formatted",
"success": false,
"errors": null
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
errors
object[]
{
"message": "string",
"success": true,
"businessCode": "string",
"errors": [
{
"message": "must be a well-formed UUID string",
"field": "merchantChargeId"
}
]
}
{
"message": "Internal Server Error",
"success": false,
"errors": null
}