# Sends authorization data.

**POST** `/`

Base URL: `https://api-sbx.pre.globalgetnet.com/dpy/web-checkout/v1`

It sends the authorization data, containing the details of the payment intent that originated it, to the endpoint preconfigured by the merchant.

This request will be sent to your address, protected by `Authorization: Basic` authentication.

The webhook must validate the 'Authorization' header to ensure that the credentials received are valid.
The format for assembling the hash sent is as follows: Basic { base64(user:password) }.

The user and password fields contain the values entered in the Web Checkout Webhook configuration.

**For example**, for the user *'testwebhook'* and the password *'testwebhook13579'* the string would look like this: *Basic { base64(testwebhook:testwebhook13579) }*, generating an output in this format: *Basic dGVzdHdlYmhvb2s6dGVzdHdlYmhvb2sxMzU3OQ==*

## Authorization

- basicAuth (http, basic)

## Body

Content type: `application/json`

- `checkout_id` (string<uuidv4>, required)
  Unique checkout ID
- `payment_intent_id` (string<uuidv4>)
  Unique payment intent ID
- `order_id` (string)
  Order ID used for Merchant reconciliation
- `mode` ("instant" | "payment_link" | "recurring", required)
  Checkout mode.

  The possible values are:
  - instant = Instant payments are accepted
  - payment_link = One-time payments from a payment link are accepted 
   - recurring = Recurring payments from recurring transaction ar accepted
- `seller` (object)
  Data structure containing seller details
  - `id` (string<uuidv4>)
    Seller ID
  - `trade_name` (string)
    Trade or brand name of the seller's business
  - `merchant_document` (string)
    Merchant document.
  - `settings` (object)
    Data structure containing seller settings
    - `notification_url_configured` (boolean)
      Whether the seller has configured a payment URL notification.

       #### The possible values are:

       - true = Seller is notified through the backend system when the payment transaction is processed
       - false = Seller is not notified through the backend system when the payment transaction is processed
- `customer` (object)
  Data structure containing customer details
  - `customer_id` (string, required)
    Customer ID.

    We recommend using the customer's document number (the same value provided in `document_number`) as the customer ID, for all countries. Provide only letters and numbers, without any special characters, separators or spaces (for example, a Chilean RUT `12345678-9` should be sent as `123456789`).

    For Brazil (BR), this value must correspond to a valid CPF. Using an invalid document may trigger fraud prevention flows that could block the payment.
  - `first_name` (string, required)
    Customer's first name
  - `last_name` (string, required)
    Customer's last name
  - `name` (string, required)
    Customer's full name
  - `email` (string<email>, required)
    Customer's email address
  - `document_type` (string, required)
    Type of the document used to identify the customer. The accepted value is country-specific:

    - Brazil (BR): `CPF` (individuals) or `CNPJ` (companies)
    - Argentina (AR): `DNI`
    - Chile (CL): `RUT`
    - Mexico (MX): `RFC`
    - Uruguay (UY): `CI`
    - Spain (ES): `DNI`
  - `document_number` (string, required)
    Document number used to identify the customer.

    For Brazil (BR), this field must contain a valid CPF. Using an invalid CPF may trigger fraud prevention flows that could block the payment.
  - `phone_number` (string)
    Customer's phone number
  - `gender` ("Female" | "Male" | "Intersex" | "Trans" | "Non-Conforming" | "Personal" | "Eunuch")
    Customer's gender
  - `checked_email` (boolean)
    Whether the customer's email address was verified by the seller when they registered with the store.

    The possible values are:
    - true = Email address was verified
    - false = Email address was not verified
  - `billing_address` (object, required)
    Data structure containing shipping address details
    - `street` (string, required)
      Name of a street or thoroughfare
    - `number` (string, required)
      Number that identifies the position of a building on a street
    - `complement` (string)
      Additional address information
    - `district` (string)
      Name of a district, for example, a part of a town or region
    - `city` (string)
      Name of a built-up area with defined boundaries and a local government.

      The value is based on the ISO 3166-2, according to the country defined within the address details.
    - `state` (string)
      Name of an organized political community or area forming a part of a federation.

      The value is based on the ISO 3166-2, according to the country defined within the address details.
    - `country` (string, required)
      Country code.

      The value is based on the ISO 3166-1 alpha-2 (https://www.iso.org/obp/ui/#search/code/).
    - `postal_code` (string, required)
      Postal or ZIP code.

      The value consists of a group of letters and/or numbers that is added to a postal address to assist in sorting the mail.
    - `reference` (string)
      Reference point details that can be used to help locate the address
- `shipping` (object)
  Data structure containing shipping details
  - `first_name` (string, required)
    Customer's first name
  - `last_name` (string, required)
    Customer's last name
  - `name` (string)
    Customer's full name
  - `phone_number` (string)
    Customer's phone number
  - `shipping_amount` (number)
    Shipping cost in integer format, where the last 2 digits represent the cents.

    For countries where cents do not apply, fill in the amount with 2 zeros to the right.

    Ex: $150, send `15000`
  - `address` (object, required)
    Data structure containing shipping address details
    - `street` (string, required)
      Name of a street or thoroughfare
    - `number` (string, required)
      Number that identifies the position of a building on a street
    - `complement` (string)
      Additional address information
    - `district` (string)
      Name of a district, for example, a part of a town or region
    - `city` (string)
      Name of a built-up area with defined boundaries and a local government.

      The value is based on the ISO 3166-2, according to the country defined within the address details.
    - `state` (string)
      Name of an organized political community or area forming a part of a federation.

      The value is based on the ISO 3166-2, according to the country defined within the address details.
    - `country` (string, required)
      Country code.

      The value is based on the ISO 3166-1 alpha-2 (https://www.iso.org/obp/ui/#search/code/).
    - `postal_code` (string, required)
      Postal or ZIP code.

      The value consists of a group of letters and/or numbers that is added to a postal address to assist in sorting the mail.
    - `reference` (string)
      Reference point details that can be used to help locate the address
- `payment` (object, required)
  Data structure containing payment details
  - `method` ("credit" | "debit")
    Payment method.
    The possible values are: - credit = Payment by credit card - debit = Payment by debit card
  - `amount` (integer<int32>, required)
    Payment amount from checkout,in integer format, where the last 2 digits represent the cents.

    For countries where cents do not apply, fill in the amount with 2 zeros to the right.

    Ex: $150, send `15000`
  - `currency` (string<ISO-4217>, required)
    Currency code.

     The value is in the alpha-3 format defined in ISO 4217

     (https://www.iso.org/iso-4217-currency-codes.html).
  - `installment` (object)
    Data structure containing installment details.
    - `type` ("no_interest" | "with_interest", required)
      Installment type offered to the customer, defining whether interest is charged for the installments
    - `number` (integer, required)
      Number of installments selected to the customer
    - `schema` (string)
      Installment acquirer schema.
  - `result` (object, required)
    Data structure containing payment result details
    - `payment_id` (string<uuidv4>)
      Unique payment ID
    - `status` ("Authorized" | "Denied", required)
      Payment transaction status
    - `authorization_code` (string)
      Authorized payment transaction code
    - `transaction_datetime` (string)
      Date of payment transaction
    - `return_message` (string)
      Result message for the payment transaction. For a list of possible values, <a href='#'>see</a>.
    - `return_code` (string)
      Result code for the payment transaction. For a list of possible values, see <LINK>.
- `frontend` (object)
  - `link` (string)
    Origin of a request frontend
  - `time_page` (integer)
    Time page in seconds
  - `sales_channel` ("WEB" | "MOBILE" | "ANDROID" | "IOS", required)
    Time page um seconds
  - `application_version` (string, required)
    Version o front end application
  - `card_pasted` (boolean)
    Describes when the card is pasted in frontend or not
  - `ip` (string, required)
    Consumer device ip
  - `timezone` (string)
    Consumer timezone
  - `locale` (string)
    Consumer locale
- `pickup_store` (boolean)
- `shipping_method` (string)
  Type of shipping o products
- `soft_descriptor` (string)
  Payment description that appears on the customer's receipt
- `reference_code` (string)
  Payment reference code
- `product` (object[])
  - `product_type` ("cash_carry" | "digital_content" | "digital_goods" | "digital_physical" | "gift_card" | "physical_goods" | "renew_subs" | "shareware" | "service")
    Product type
  - `title` (string, required)
    Product name
  - `description` (string)
    Product description
  - `value` (integer, required)
    Product value in integer format, where the last 2 digits represent the cents.

    For countries where cents do not apply, fill in the amount with 2 zeros to the right.

    Ex: $150, send `15000`
  - `quantity` (integer, required)
    Quantity of the product
- `device_fingerprint` (string)

Example:

```json
{
  "checkout_id": "ee0b7dd5-92da-4ef4-ad3b-0ba369ad0efe",
  "payment_intent_id": "a4fb9559-09f3-43ac-8ba5-c0d786506ea9",
  "order_id": "ORDER_123",
  "mode": "instant",
  "seller": {
    "id": "06f256c8-1bbf-42bf-93b4-ce2041bfb87e",
    "trade_name": "John Doe Bread Store",
    "merchant_document": "599d037634",
    "settings": {
      "notification_url_configured": false
    }
  },
  "customer": {
    "customer_id": "12345678912",
    "first_name": "John",
    "last_name": "Doe Smith",
    "name": "John Doe Smith",
    "email": "customer@email.com.br",
    "document_type": "CPF",
    "document_number": "12345678912",
    "phone_number": "5551999887766",
    "gender": "Male",
    "checked_email": {
      "type": "boolean",
      "default": false,
      "description": "Whether the customer's email address was verified by the seller when they registered with the store.\n\nThe possible values are:\n- true = Email address was verified\n- false = Email address was not verified",
      "example": false
    },
    "billing_address": {
      "type": "object",
      "description": "Data structure containing shipping address details",
      "required": [
        "street",
        "number",
        "country",
        "postal_code"
      ],
      "properties": {
        "street": {
          "type": "string",
          "description": "Name of a street or thoroughfare",
          "maxLength": 60,
          "example": "Av. Brasil"
        },
        "number": {
          "type": "string",
          "description": "Number that identifies the position of a building on a street",
          "maxLength": 10,
          "example": "1000"
        },
        "complement": {
          "type": "string",
          "description": "Additional address information",
          "maxLength": 60,
          "example": "Sala 1"
        },
        "district": {
          "type": "string",
          "description": "Name of a district, for example, a part of a town or region",
          "maxLength": 40,
          "example": "São Geraldo"
        },
        "city": {
          "type": "string",
          "description": "Name of a built-up area with defined boundaries and a local government.\n\nThe value is based on the ISO 3166-2, according to the country defined within the address details.",
          "maxLength": 40,
          "example": "Porto Alegre"
        },
        "state": {
          "type": "string",
          "description": "Name of an organized political community or area forming a part of a federation.\n\nThe value is based on the ISO 3166-2, according to the country defined within the address details.",
          "maxLength": 20,
          "example": "RS"
        },
        "country": {
          "type": "string",
          "description": "Country code.\n\nThe value is based on the ISO 3166-1 alpha-2 (https://www.iso.org/obp/ui/#search/code/).",
          "maxLength": 2,
          "example": "BR"
        },
        "postal_code": {
          "type": "string",
          "description": "Postal or ZIP code.\n\nThe value consists of a group of letters and/or numbers that is added to a postal address to assist in sorting the mail.",
          "maxLength": 8,
          "example": "90230060"
        },
        "reference": {
          "type": "string",
          "description": "Reference point details that can be used to help locate the address",
          "maxLength": 80,
          "example": "Near the hospital"
        }
      }
    }
  },
  "shipping": {
    "first_name": "John",
    "last_name": "Doe Smith",
    "name": "John Doe Smith",
    "phone_number": "5551999887766",
    "shipping_amount": 3000,
    "address": {
      "street": "Av. Brasil",
      "number": "1000",
      "complement": "Sala 1",
      "district": "São Geraldo",
      "city": "Porto Alegre",
      "state": "RS",
      "country": "BR",
      "postal_code": "90230060",
      "reference": "Near the hospital"
    }
  },
  "payment": {
    "method": "credit",
    "amount": 10000,
    "currency": "USD",
    "installment": {
      "type": "no_interest",
      "number": 3,
      "schema": "string"
    },
    "result": {
      "payment_id": "ee0b7dd5-92da-4ef4-ad3b-0ba369ad0efe",
      "status": "Authorized",
      "authorization_code": 9999,
      "transaction_datetime": "1997-07-16T19:20:30.45+01:00",
      "return_message": "The payment type is not active",
      "return_code": "payment_type_is_not_active"
    }
  },
  "frontend": {
    "link": "www.myhomepage.com/checkout",
    "time_page": 30,
    "sales_channel": "WEB",
    "application_version": "v1.0.0.1",
    "card_pasted": false,
    "ip": "255.255.255.255",
    "timezone": "America/Argentina/Buenos_Aires",
    "locale": "es-AR"
  },
  "pickup_store": true,
  "shipping_method": "PAC",
  "soft_descriptor": "Bread Store",
  "reference_code": "Payment for the service provided by John",
  "product": [
    {
      "product_type": "digital_content",
      "title": "Toy car",
      "description": "Wooden toy car",
      "value": 1200,
      "quantity": 10
    }
  ],
  "device_fingerprint": "7C5C38C6424F6EB7FC6DB1285A84DDAEAD559492A0FD04FCC919CAB6782CB3EF"
}
```

## Responses

### 200

A status of 200 means that the webhook has been successfully received and no further delivery attempts will be made.