Charge

Charge from Sale

POST /v1/broker-charges

Body Parameters

The request has the following parameters in body:

ParameterDescription
sale_idThe ID of the sale to chargeRequired
cardThe card dataOptional
card.brandThe card brand nameRequired
card.expiration_dateThe card expiration date (mm/yyyy)Required
card.holderThe card holder nameRequired
card.numberThe card numberRequired
card.security_codeThe card security codeRequired
{
  "sale_id": "string",
  "card": {
    "brand": "string",
    "expiration_date": "string",
    "holder": "string",
    "number": "string",
    "security_code": "string"
  }
}
Response

The above request returns JSON structured like this:

ParameterDescription
idThe ID of the Invoice from previous Sale
statusThe status of the Invoice related to the last Payment try
payment_tries.idThe ID of the Payment Try
payment_tries.currencyThe currency associated with the Payment try
payment_tries.statusThe status of the Payment Try
payment_tries.typeThe payment type
The payment try status can be:
StatusName
1Card Error
2Card Canceled
3Card Blocked
4Card Expired
5Not Allowed
6Success
7Pending
8Canceled
9Error
10Cancel Requested
11Cancel Error
12Pending Capture
The payment type can be:
One Of
Billet, CreditCard, DebitCard, WireTransfer, AccountDebit, Pix
The invoice status can be:
StatusName
1Pending
2Pending Capture
3Paid
{
  "id": "string",
  "status": 0,
  "payment_tries": [
    {
      "id": "string",
      "currency": "string",
      "type": "string",
      "date": "string",
      "status": 0
    }
  ]
}