v1

latestOpenAPI 3.1.02026-07-241040774.6 KB

Cancelar cobrança com split

Rota para cancelar uma cobrança com split, definindo a regra de split e os recebedor que irão participar da divisão dos pagamentos.

delete/charges/{charge_id}.

Path parameters

charge_idstring required

Código da cobrança.

Request body

amountinteger

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

Response

200

idstring
codestring
gateway_idstring
amountinteger
paid_amountinteger
canceled_amountinteger
statusstring
currencystring
payment_methodstring
paid_atstring
canceled_atstring
created_atstring
updated_atstring

Example response

{
  "id": "ch_bz6VONxuriWqXY0l",
  "code": "Q7KA3GIZDV",
  "gateway_id": "7628472",
  "amount": 200,
  "paid_amount": 200,
  "canceled_amount": 200,
  "status": "canceled",
  "currency": "BRL",
  "payment_method": "credit_card",
  "paid_at": "2020-01-16T15:14:27Z",
  "canceled_at": "2020-01-16T16:03:49Z",
  "created_at": "2020-01-16T15:14:21Z",
  "updated_at": "2020-01-16T16:03:49Z",
  "order": {
    "id": "or_5QXWzjpHRfpw04Dv",
    "code": "Q7KA3GIZDV",
    "amount": 200,
    "closed": true,
    "created_at": "2020-01-16T15:14:21Z",
    "updated_at": "2020-01-16T16:03:49Z",
    "closed_at": "2020-01-16T15:14:21Z",
    "currency": "BRL",
    "status": "canceled",
    "customer_id": "cus_nmEG47zTJu88gd6R"
  },
  "customer": {
    "id": "cus_nmEG47zTJu88gd6R",
    "name": "Tony Stark",
    "email": "1ad6b8d7-28f7-48ee-80c4-71b087aa7d0a@avengers.com",
    "document": "93095135270",
    "type": "individual",
    "address": {
      "id": "addr_w9Nn7z3c3pu8XMQZ",
      "line_1": "375, Av. General Justo, Centro",
      "line_2": "8º andar",
      "street": "Av. General Justo",
      "number": "375",
      "complement": "8º andar",
      "zip_code": "70070300",
      "neighborhood": "Centro",
      "city": "Rio de Janeiro",
      "state": "RJ",
      "country": "BR",
      "status": "active",
      "created_at": "2020-01-02T20:23:10Z",
      "updated_at": "2020-01-02T20:23:10Z"
    },
    "created_at": "2020-01-02T20:23:10Z",
    "updated_at": "2020-01-02T20:23:10Z",
    "phones": {
      "home_phone": {
        "country_code": "55",
        "number": "000000000",
        "area_code": "21"
      },
      "mobile_phone": {
        "country_code": "55",
        "number": "000000000",
        "area_code": "21"
      }
    },
    "metadata": {
      "company": "Avengers"
    }
  },
  "last_transaction": {
    "id": "tran_NMloP9hkEhEDRjem",
    "transaction_type": "credit_card",
    "funding_source": "prepaid",
    "gateway_id": "7628472",
    "amount": 100,
    "status": "refunded",
    "success": true,
    "installments": 1,
    "statement_descriptor": "AVENGERS",
    "acquirer_name": "pagarme",
    "acquirer_tid": "7628472",
    "acquirer_nsu": "7628472",
    "acquirer_return_code": "0000",
    "operation_type": "cancel",
    "card": {
      "id": "card_mYGN6wf9aUao5Vrp",
      "first_six_digits": "400000",
      "last_four_digits": "0010",
      "brand": "Visa",
      "holder_name": "Tony Stark",
      "exp_month": 1,
      "exp_year": 2023,
      "status": "active",
      "type": "credit",
      "created_at": "2020-01-02T20:23:12Z",
      "updated_at": "2020-01-02T20:23:12Z",
      "billing_address": {
        "street": "Malibu Point",
        "number": "10880",
        "zip_code": "90265",
        "neighborhood": "Central Malibu",
        "city": "Malibu",
        "state": "CA",
        "country": "US",
        "line_1": "10880, Malibu Point, Central Malibu"
      }
    },
    "created_at": "2020-01-16T16:03:49Z",
    "updated_at": "2020-01-16T16:03:49Z",
    "gateway_response": {
      "code": "200"
    },
    "split": [
      {
        "id": "sr_bZwklpPh5ASw2k9n",
        "type": "percentage",
        "gateway_id": "sr_ck5gvkaia0061q36dfxqmrh1j",
        "amount": 80,
        "recipient": {
          "id": "rp_5yGwpMGckBHVYmb6",
          "name": "First recipient",
          "email": "first_recipient@mundipagg.com",
          "document": "12728994706",
          "description": "Descrição do recebedor 1",
          "type": "individual",
          "status": "active",
          "created_at": "2020-01-02T20:23:14Z",
          "updated_at": "2020-01-02T20:23:14Z"
        },
        "options": {
          "liable": true,
          "charge_processing_fee": true,
          "charge_remainder_fee": true
        }
      }
    ]
  }
}