# Notification callbacks

Besides webhooks, Getnet provides **callback-based notifications**: the server calls URLs you provide (callbacks) to notify your system about payment events. This mechanism uses **HTTP GET** requests with data in the query string and is configured at accreditation time. It is distinct from the webhooks offered in the Global API, which use HTTP POST, configurable subscriptions, and a different payload format.

To set up GetNet’s notifications via callback, **you must state 4 URLs at the time of your accreditation** on the Digital Platform. Each one will be destined to receive different notifications of the following types:

* Credit transactions,
* Debit transactions,
* Bank payment slip transactions (boleto),
* Recurring transactions (subscription)

Once the callback URLs are set up, GetNet will automatically send the relevant data to each URL when the specified event occurs. In the event of an error, the information will be resent every 15 minutes up to 4 times.

We always recommend keeping an eye on the certificate expiration date for each URL. In case of renewal or if you need to modify any of the originally stated URLs, please contact our GetNet Integration Support Team.

## Notifications structure

In general terms, the HTTP requests have the following structure:
`https://YOUR_HOST_EXAMPLE/YOUR_SERVICE_EXAMPLE?query_param_1=valueExample1&query_param_2=valueExample2`
Where:

* `https://YOUR_HOST/YOUR_SERVICE` refers to one of the 4 callback URLs previously stated.
* `?` indicates the beginning of the query section.
  `query_param_1=valueExample1` is an example of a query parameter.
  `&` is used as a connector between multiple query parameters.

The **HTTP GET notifications** provided by GetNet will include a specific set of query parameters, some of which are shared across different trigger events, while others are unique and specific to a single trigger event.

## Credit notifications

**Shared query param for all events**
Below you’ll find the list of the query params shared across all the events related to credit card transactions: **Approved**, **Authorized**, **Pending**, **Confirmed**, **Canceled**, **Denied** and **Error**.

| Query parameters       | Description                                                                                                                                                                        |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *payment\_type*        | (only possible value:) **credit**                                                                                                                                                  |
| *customer\_id*         | (customer Id code)                                                                                                                                                                 |
| *order\_id*            | (order number)                                                                                                                                                                     |
| *payment\_id*          | (transaction Id in UUIDv4 format)                                                                                                                                                  |
| *amount*               | (transaction amount)                                                                                                                                                               |
| *status*               | (possible values depending on transaction-event type:)<br /> **APPROVED**<br />**AUTHORIZED**<br />**PENDING**<br />**CONFIRMED**<br />**CANCELED**<br />**DENIED**<br />**ERROR** |
| *number\_installments* | (number of installments)                                                                                                                                                           |
| *terminal\_nsu*        | (authorization code generated by the issuer when a transaction is successfully performed)                                                                                          |
| *authorization\_code*  | (authorization code generated by GetNet ecommerce system)                                                                                                                          |

Below you'll find the additional query parameters for each specific event.

Additional parameters for **Approved**, **Authorized**, and **Pending** transaction events

| Query parameters            | Description                          |
| --------------------------- | ------------------------------------ |
| *acquirer\_transaction\_id* | (buyer transaction code)             |
| *authorization\_timestamp*  | (date and time of the authorization) |
| *brand*                     | (card brand)                         |

Additional parameters for **Canceled** transaction events

| Query parameters            | Description              |
| --------------------------- | ------------------------ |
| *acquirer\_transaction\_id* | (buyer transaction code) |

Additional parameters for **Denied** and Error transaction events

| Query parameters            | Description                                                |
| --------------------------- | ---------------------------------------------------------- |
| *acquirer\_transaction\_id* | (buyer transaction code)                                   |
| *description\_detail*       | (description of the error occurred during the transaction) |
| *error\_code*               | (denied or error numeric code)                             |

## Debit notifications

### Shared query param for all events

Below you’ll find the list of the query params shared across all the events related to debit card transactions: **Approved**, **Denied** and **Error**.

| Query parameters | Description                                                                                             |
| ---------------- | ------------------------------------------------------------------------------------------------------- |
| *payment\_type*  | (only possible value:) **debit**                                                                        |
| *customer\_id*   | (customer Id code)                                                                                      |
| *order\_id*      | (order number)                                                                                          |
| *payment\_id*    | (transaction Id in UUIDv4 format)                                                                       |
| *amount*         | (transaction amount)                                                                                    |
| *status*         | (possible values depending on transaction-event type:)<br />**APPROVED**<br />**DENIED**<br />**ERROR** |
| *brand*          | (card brand)                                                                                            |

Below you'll find the additional query parameters for each specific event.

Additional parameters for **Approved** transaction events

| Query parameters            | Description                                                                               |
| --------------------------- | ----------------------------------------------------------------------------------------- |
| *acquirer\_transaction\_id* | (buyer transaction code)                                                                  |
| *authorization\_timestamp*  | (date and time of the authorization)                                                      |
| *terminal\_nsu*             | (authorization code generated by the issuer when a transaction if successfully performed) |
| *authorization\_code*       | (authorization code generated by GetNet ecommerce system)                                 |

Additional parameters for **Denied** and **Error** transaction events

| Query parameters      | Description                                                |
| --------------------- | ---------------------------------------------------------- |
| *description\_detail* | (description of the error occurred during the transaction) |
| *error\_code*         | (denied or error numeric code)                             |

## Bank payment slip (Boleto) notifications

In the case of a bank payment slip notification, it will be sent in two stages. In the first stage, a notification is sent when the bank payment slip registration is finalized, and in the second stage, a notification is sent when the payment slip is downloaded. The service remains the same; however, the response fields will differ between the two stages.

### First Stage

**Shared query param for all events**
Below you’ll find the list of the query params shared across all the events related to first stage actions: **Pending**, **Denied** and **Error**.

| Query parameters   | Description                                                                                            |
| ------------------ | ------------------------------------------------------------------------------------------------------ |
| *payment\_type*    | (only possible value:) **boleto**                                                                      |
| *order\_id*        | (order number)                                                                                         |
| *payment\_id*      | (payment identifier)                                                                                   |
| *amount*           | (bank payment slip amount)                                                                             |
| *status*           | (possible values depending on transaction-event type:)<br />**PENDING**<br />**DENIED**<br />**ERROR** |
| *bank*             | (bank code of the bank payment slip issuer. Only possible value is **Banco Santander**)                |
| *our\_number*      | (our number. If you don’t state it, it will be generated by the issuing bank)                          |
| *typefull\_line*   | (typeful line on the bank payment slip returned by the issuing bank)                                   |
| *issue\_date*      | (Issue date, format: `DDMMYYYY`)                                                                       |
| *expiration\_date* | (Expiration date, format: `DDMMYYYY)`                                                                  |

Below you'll find the additional query parameters for each specific event.

Additional parameters for **Denied** and **Error** transaction events

| Query parameters      | Description                                                                                                             |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| *id*                  | (bank payment slip identifier, format: UUIDv4. Is used to identify the bank payment slip for the download notification) |
| *description\_detail* | (description of the error occurred during the transaction)                                                              |
| *error\_code*         | (denied or error numeric code)                                                                                          |

### Second Stage

**Shared query param for all events**
Below you’ll find the list of the query params shared across all the events related to second stage actions: **Paid** and **Canceled**.

| Query parameters | Description                                                                                                             |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------- |
| *id*             | (bank payment slip identifier, format: UUIDv4. Is used to identify the bank payment slip for the download notification) |
| *amount*         | (bank payment slip amount)                                                                                              |
| *status*         | (possible values depending on transaction-event type:)<br />**PAID**<br />**CANCELED**                                  |
| *payment\_date*  | (Date that your customer pays the bank payment slip, format: `DDMMYYYY`)                                                |

## Recurring transactions (subscription) notifications

**Shared query param for all events**
Below you’ll find the list of the query params shared across all the events related to recurring transactions: **Authorized**, **Approved**, **Confirmed**, **Canceled**, **Denied** and **Error**.

| Query parameters            | Description                                                                                                                                                      |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *payment\_type*             | (only possible value:) **credit**                                                                                                                                |
| *customer\_id*              | (customer Id code)                                                                                                                                               |
| *order\_id*                 | (order number)                                                                                                                                                   |
| *payment\_id*               | (transaction Id in UUIDv4 format)                                                                                                                                |
| *amount*                    | (transaction amount)                                                                                                                                             |
| *status*                    | (possible values depending on transaction-event type:)<br />**AUTHORIZED**<br />**APPROVED**<br />**CONFIRMED**<br />**CANCELED**<br />**DENIED**<br />**ERROR** |
| *authorization\_timestamp*  | (date and time of the authorization)                                                                                                                             |
| *acquirer\_transaction\_id* | (buyer transaction code)                                                                                                                                         |
| *subscription\_id*          | (subscription identifier, format: UUIDv4)                                                                                                                        |
| *plan\_id*                  | (identifier of the plan used in the subscription, format: UUIDv4)                                                                                                |
| *charge\_id*                | (charge identifier, format: UUIDv4)                                                                                                                              |
| *number\_installments*      | (number of installments)                                                                                                                                         |
| *billing\_number*           | (number of processed installment)                                                                                                                                |
| *brand*                     | (card brand)                                                                                                                                                     |
| *terminal\_nsu*             | (authorization code generated by the issuer when a transaction is successfully performed)                                                                        |
| *authorization\_code*       | (authorization code generated by GetNet ecommerce system)                                                                                                        |
| *retry\_number*             | (number of retried)                                                                                                                                              |

Below you'll find the additional query parameters for each specific event.

Additional parameters for **Denied** and **Error** transaction events

| Query parameters      | Description                                                |
| --------------------- | ---------------------------------------------------------- |
| *description\_detail* | (description of the error occurred during the transaction) |
| *error\_code*         | (denied or error numeric code)                             |

## Alternative payment method (PIX) notifications

**Shared query param for all events**

Below you’ll find the list of the query params shared across all the events related to PIX transactions: **Approved**, **Denied** and **Error**.

| Query parameters         | Description                                                                                             |
| ------------------------ | ------------------------------------------------------------------------------------------------------- |
| *payment\_type*          | (only possible value:) **pix**                                                                          |
| *customer\_id*           | (customer Id code)                                                                                      |
| *order\_id*              | (order number)                                                                                          |
| *payment\_id*            | (transaction Id in UUIDv4 format)                                                                       |
| *amount*                 | (transaction amount)                                                                                    |
| *status*                 | (possible values depending on transaction-event type:)<br />**APPROVED**<br />**DENIED**<br />**ERROR** |
| *transaction\_id*        | (transaction identifier at the PSP institution after generating the QR Code)                            |
| *transaction\_timestamp* | (PIX transaction date and time, format: ISO)                                                            |
| *terminal\_nsu*          | (authorization code generated by the issuer when a transaction is successfully performed)               |

Below you'll find the additional query parameters for each specific event.

Additional parameters for **Approved** transaction events

| Query parameters      | Description                              |
| --------------------- | ---------------------------------------- |
| *payer\_psp\_name*    | Payer PSP institution name               |
| *payer\_psp\_code*    | Payer PSP institution code               |
| *payer\_name*         | Payer name                               |
| *payer\_cnpj*         | CNPJ number of payer for legal entity    |
| *payer\_cpf*          | Payer CPF number for individuals         |
| *receiver\_psp\_name* | Receiver PSP institution name            |
| *receiver\_psp\_code* | Receiver PSP institution code            |
| *receiver\_name*      | Receiver name                            |
| *receiver\_cnpj*      | CNPJ number of receiver for legal entity |
| *receiver\_cpf*       | Receiver CPF number for individuals      |

Additional parameters for **Denied** and **Error** transaction events

| Query parameters      | Description                                                |
| --------------------- | ---------------------------------------------------------- |
| *description\_detail* | (description of the error occurred during the transaction) |