# Callback ⚠️(Deprecated)

Unlike the previous methods which are called by the Online Shop, Callback is called by an Online Payment System, while the information should be received and processed on an Online Shop side. This method gives a possibility to receive real-time information about the status change.
A Callback URL is assigned to each Online Shop when the latter is registered as a Merchant in a Bank system [(see the introduction)](./introduction.md).  Two kinds of Callback URLs can be assigned in a Payment System to a Merchant:
- [After the Payment Status Change](#payment-status-change-callback)
- [After the Payment Amount Return](#payment-amount-return-callback)

After that each time when the Payment Status is changed, the Payment Details are sent via POST method on a Callback URL
To confirm the successful receiving of a Callback method request, a Merchant should return an `HTTP CODE 200`.
In case of the unsuccessful result of sending via POST method of the Callback, the method is called again with 15-second intervals until the number of attempts reaches 5 or Merchant returns an `HTTP CODE 200` status. In case the Callback could not be successfully called, the payment status is still successful. It is advised to use a [Payment Details method](get-payment-details.md) to verify the payment details.

:::note
A Callback is not related to the redirection to the Online Shop Webpage from the Merchant’s payment system. A redirection happens according to a value passed by Merchant in a redirect_url parameter of an Order request method.
:::

### Payment Status Change callback

**BOG**

```properties
  Content-Type: application/x-www-form-urlencoded
  Request Method: POST
```
```properties
  status: success | error
  order_id: string
  payment_hash: string
  ipay_payment_id: string
  status_description: string
  shop_order_id: string
  payment_method: GC_CARD | BOG_CARD | BOG_LOYALTY | BOG_LOAN | UNKNOWN
  card_type: MC | VISA | AMEX | UNKNOWN
```

**GC**

```properties
  Content-Type: application/x-www-form-urlencoded
  Request Method: POST
```
```properties
  status: success | error
  order_id: string
  payment_hash: string
  ipay_payment_id: string
  status_description: string
  shop_order_id: string
  payment_method: GC_CARD | BOG_CARD | BOG_LOYALTY | BOG_LOAN | UNKNOWN
  card_type: MC | VISA | AMEX | UNKNOWN
  pan: XXXX********XXXX
  transaction_id: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  ```

**Pre-auth payment**

```properties
  Content-Type: application/x-www-form-urlencoded
  Request Method: POST
```
```properties
  status: success | error
  order_id: string
  pre_auth_status: success | in_progress | success_unblocked
  payment_hash: string
  ipay_payment_id: string
  status_description: string
  shop_order_id: string
  payment_method: GC_CARD | BOG_CARD | BOG_LOYALTY | BOG_LOAN | UNKNOWN
  card_type: MC | VISA | AMEX | UNKNOWN
  pan: XXXX********XXXX
  transaction_id: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

### Payment Amount Return callback

**json**

```properties
  order_id: string
  payment_hash: string
  ipay_payment_id: string
  status_description: string
  shop_order_id: string
  payment_method: GC_CARD | BOG_CARD | BOG_LOYALTY
  card_type: MC | VISA | AMEX
```
