v1

latestOpenAPI 3.1.02026-07-241040774.6 KB

Confirmar cobrança (cash)

Para a confirmação de cobranças com meio de pagamento cash com o status pending.

post/charges/{charge_id}/confirm-payment

Path parameters

charge_idstring required

Código da cobrança.

Request body

amountstring

Valor a ser confirmado. Caso não seja informado, será considerado o valor total da cobrança

codestring

Código da cobrança no sistema da loja. Irá atualizar o valor informado na criação da cobrança. Max: 52 caracteres

descriptionstring

Descrição

Response

200

idstring
codestring
gateway_idstring
amountinteger
statusstring
currencystring
payment_methodstring
due_atstring
paid_atstring
created_atstring
updated_atstring

Example response

{
  "id": "ch_7YBoBPWCVKS3QdyM",
  "code": "WZQS3LHEKW",
  "gateway_id": "42c243c4-0b52-49f3-ba92-e8661ebc7916",
  "amount": 1490,
  "status": "paid",
  "currency": "BRL",
  "payment_method": "credit_card",
  "due_at": "2017-04-04T00:00:00",
  "paid_at": "2017-04-04T20:06:14",
  "created_at": "2017-04-04T20:05:39",
  "updated_at": "2017-04-04T20:06:14",
  "customer": {
    "id": "cus_aEkwKv0SmNHMR931",
    "name": "Luke Skywalker",
    "email": "lskywalker@r2d2.com",
    "created_at": "2017-04-04T19:41:31",
    "updated_at": "2017-04-04T19:41:31"
  },
  "last_transaction": {
    "id": "tran_9KYq34mcDfOnXg1Z",
    "transaction_type": "credit_card",
    "gateway_id": "d8033a7c-2d31-4840-8870-8a71bd16cacc",
    "amount": 1490,
    "status": "captured",
    "success": true,
    "installments": 1,
    "statement_descriptor": "Spotify",
    "acquirer_name": "simulator",
    "acquirer_affiliation_code": "MUNDI",
    "acquirer_tid": "856202",
    "acquirer_nsu": "503081",
    "acquirer_auth_code": "405205",
    "operation_type": "capture",
    "credit_card": {
      "id": "card_2bKzdEGsYYFkymqG",
      "first_six_digits": "542501",
      "last_four_digits": "5322",
      "brand": "Visa",
      "holder_name": "Luke Skywalker",
      "exp_month": 5,
      "exp_year": 2017,
      "status": "active",
      "created_at": "2017-04-04T19:41:31",
      "updated_at": "2017-04-04T19:41:31",
      "billing_address": {
        "zip_code": "90265",
        "city": "Malibu",
        "state": "CA",
        "country": "US",
        "line_1": "10880, Malibu Point, Malibu Central"
      }
    },
    "created_at": "2017-04-04T20:06:14",
    "updated_at": "2017-04-04T20:06:14"
  },
  "metadata": {
    "id": "my_charge_id"
  }
}