v1

latestOpenAPI 3.1.02026-07-241040774.6 KB

Obter webhook

get/hooks/{hook_id}

Path parameters

hook_idstring required

Código do webhook.

Response

200

idstring
urlstring
eventstring
statusstring
attemptsstring
last_attemptstring
created_atstring
response_statusinteger
response_rawstring

Example response

{
  "id": "hook_98kmOL1sMfnZqoPL",
  "url": "https://70cfee17.ngrok.io/notifications/payment",
  "account": {
    "id": "acc_jZkdN857et650oNv",
    "name": "Lojinha"
  },
  "event": "order.paid",
  "status": "failed",
  "attempts": "3/3",
  "last_attempt": "2017-03-24T21:32:07Z",
  "created_at": "2017-03-24T21:21:59Z",
  "response_status": 404,
  "response_raw": "Tunnel 70cfee17.ngrok.io not found",
  "data": {
    "id": "or_e36l73IwgF7MlJwx",
    "code": "ER30H4MU4N",
    "amount": 199,
    "currency": "BRL",
    "closed": true,
    "items": [
      {
        "id": "oi_NqW9Rb2LTbsqRa3n",
        "description": "FLIP Payment",
        "amount": 199,
        "quantity": 1,
        "status": "active",
        "created_at": "2017-03-24T21:21:58Z",
        "updated_at": "2017-03-24T21:21:58Z"
      }
    ],
    "customer": {
      "id": "cus_le6ZqXjiBSEOWdoA",
      "name": "Matheus Moreira",
      "email": "mmoreira@mundipagg.com",
      "created_at": "2016-11-25T23:45:04Z",
      "updated_at": "2016-12-26T21:34:45Z"
    },
    "status": "paid",
    "created_at": "2017-03-24T21:21:58Z",
    "updated_at": "2017-03-24T21:21:59Z",
    "closed_at": "2017-03-24T21:21:59Z",
    "charge": {
      "id": "ch_56YNm9akt4i6mKQ8",
      "code": "ER30H4MU4N",
      "gateway_id": "b21c20f8-21e1-4f56-ac1c-34425c9e9dc9",
      "amount": 199,
      "status": "paid",
      "currency": "BRL",
      "payment_method": "credit_card",
      "due_at": "2017-03-24T00:00:00Z",
      "paid_at": "2017-03-24T21:21:59Z",
      "created_at": "2017-03-24T21:21:58Z",
      "updated_at": "2017-03-24T21:21:58Z",
      "customer": {
        "id": "cus_le6ZqXjiBSEOWdoA",
        "name": "Matheus Moreira",
        "email": "mmoreira@mundipagg.com",
        "created_at": "2016-11-25T23:45:04Z",
        "updated_at": "2016-12-26T21:34:45Z"
      },
      "last_transaction": {
        "id": "tran_MpnYkMXhOBTb7Ze8",
        "transaction_type": "credit_card",
        "funding_source": "prepaid",
        "gateway_id": "9ac7ee2c-02a1-4b19-9f7e-168739a0427b",
        "amount": 199,
        "status": "captured",
        "success": true,
        "installments": 1,
        "acquirer_name": "simulator",
        "acquirer_affiliation_code": "MUNDI",
        "acquirer_tid": "266699",
        "acquirer_nsu": "848780",
        "acquirer_auth_code": "MUNDI",
        "acquirer_message": "Simulator|Transação de simulação autorizada com sucesso",
        "acquirer_return_code": "0",
        "operation_type": "auth_and_capture",
        "credit_card": {
          "id": "card_yB3ma9rS8HW7mnA9",
          "first_six_digits": "342793",
          "last_four_digits": "8229",
          "brand": "Amex",
          "holder_name": "Tony Stark",
          "exp_month": 1,
          "exp_year": 2018,
          "status": "active",
          "created_at": "2016-11-29T21:14:07Z",
          "updated_at": "2016-11-29T21:14:07Z",
          "billing_address": {
            "zip_code": "90265",
            "city": "Malibu",
            "state": "CA",
            "country": "US",
            "line_1": "10880, Malibu Point, Malibu Central"
          }
        },
        "created_at": "2017-03-24T21:21:58Z",
        "updated_at": "2017-03-24T21:21:58Z"
      }
    },
    "charges": [
      {
        "id": "ch_56YNm9akt4i6mKQ8",
        "code": "ER30H4MU4N",
        "gateway_id": "b21c20f8-21e1-4f56-ac1c-34425c9e9dc9",
        "amount": 199,
        "status": "paid",
        "currency": "BRL",
        "payment_method": "credit_card",
        "due_at": "2017-03-24T00:00:00Z",
        "paid_at": "2017-03-24T21:21:59Z",
        "created_at": "2017-03-24T21:21:58Z",
        "updated_at": "2017-03-24T21:21:58Z",
        "customer": {
          "id": "cus_le6ZqXjiBSEOWdoA",
          "name": "Matheus Moreira",
          "email": "mmoreira@mundipagg.com",
          "created_at": "2016-11-25T23:45:04Z",
          "updated_at": "2016-12-26T21:34:45Z"
        },
        "last_transaction": {
          "id": "tran_MpnYkMXhOBTb7Ze8",
          "transaction_type": "credit_card",
          "funding_source": "prepaid",
          "gateway_id": "9ac7ee2c-02a1-4b19-9f7e-168739a0427b",
          "amount": 199,
          "status": "captured",
          "success": true,
          "installments": 1,
          "acquirer_name": "simulator",
          "acquirer_affiliation_code": "MUNDI",
          "acquirer_tid": "266699",
          "acquirer_nsu": "848780",
          "acquirer_auth_code": "MUNDI",
          "acquirer_message": "Simulator|Transação de simulação autorizada com sucesso",
          "acquirer_return_code": "0",
          "operation_type": "auth_and_capture",
          "credit_card": {
            "id": "card_yB3ma9rS8HW7mnA9",
            "last_four_digits": "8229",
            "brand": "Amex",
            "holder_name": "Tony Stark",
            "exp_month": 1,
            "exp_year": 2018,
            "status": "active",
            "created_at": "2016-11-29T21:14:07Z",
            "updated_at": "2016-11-29T21:14:07Z",
            "billing_address": {
              "zip_code": "90265",
              "city": "Malibu",
              "state": "CA",
              "country": "US",
              "line_1": "10880, Malibu Point, Malibu Central"
            }
          },
          "created_at": "2017-03-24T21:21:58Z",
          "updated_at": "2017-03-24T21:21:58Z"
        }
      }
    ]
  }
}