# Payment Details ⚠️(Deprecated)

By calling this method an Online Shop can receive detailed information regarding a payment based on the payment identifier. A different response with payment details will be returned depending on which payment option is used (a card or an internet-banking user) and what kind of payment method is used (with or without a pre-authorization)

## Parameters

- `order_id` — string, required

  An online payment ID returned to the Online Shop in response to the payment request method

**request**

```api
GET /api/v1/checkout/payment/{order_id}
Content-Type: application/json
Authorization: Bearer <jwt_token>
```

## Response

- `status` — success | error | in_progress

  Payment Status. Can have one of the three following values.
  - `success` - A payment is successful.
  - `error` - A payment is unsuccessful.
  - `in_progress` - A payment is not completed and if in one hour from an order generation a customer will not complete a payment, it will be automatically canceled and status will change to an `error`. This status is assigned to a payment when a customer is being redirected to the Bank’s Online Payment Webpage. While the change of this status happens once the payment is complete either successfully or unsuccessfully.

- `payment_hash` — string

  `payment_hash` should be stored on a Merchant side. The values received from a Callback method in a `payment_hash` and an `order_id` should be compared to the ones stored on a Merchant side.

- `ipay_payment_id` — string

  A payment ID that is shown on a payment receipt.

- `status_description` — string

- `shop_order_id` — string

  A Payment ID from an Online Shop system (i.e.: An ID of a shopping Basket).

- `payment_method` — string

  Payment Method.
  - `BOG_CARD` A payment is performed with an authorization.
  - `GC_CARD` A payment is performed using a card.
  - `BOG_LOAN` An installment purchase.
  - `BOG_LOYALTY` A payment is performed utilizing PLUS or MR points.
  - `UNKNOWN` In case an order status is `error` or `in_progress`.

- `card_type` — string

  In this parameter, a card type is passed when a payment method is `BOG_CARD` or `GC_CARD`. In all other cases, an `UNKNOWN` should be passed in this parameter
  - `MC` - Mastercard
  - `VISA` - Visa
  - `AMEX` - American Express

- `pan` — string

  A 16-digit card number. Only the first 6 and last 4 digits are displayed. The rest digits are replaced by an  `*` symbol. This parameter is filled only if a payment status is `success` and a payment_method is `GC_CARD`

- `transaction_id` — string

  Transaction ID. Is filled only when the payment status is `success` and payment_method is `GC_CARD`.

- `pre_auth_status` — string

  Pre-authorization status. Is returned only when during an order generation a `capture_method` is `MANUAL` and the order status is `success`
  - `success` - Pre-authorization is verified and the payment amount is transferred to a Merchant.
  - `in_progress` - Pre-authorization is in progress. A payment amount is blocked and it is possible to verify and unblock it.
  - `success_unblocked` - Pre-authorization is unblocked. A payment Amount is returned to a customer account and is available for a customer.

**bog**

```json
{
  "status": "success",
  "order_id": "{order_id}",
  "payment_hash": "{payment_hash}",
  "ipay_payment_id": "{ipay_payment_id}",
  "status_description": "PERFORMED",
  "shop_order_id": "123456789",
  "payment_method": "BOG_CARD",
  "card_type": "MC",
}
```

**gc**

```json
{
  "status": "success",
  "order_id": "{order_id}",
  "payment_hash": "{payment_hash}",
  "ipay_payment_id": "{ipay_payment_id}",
  "status_description": "PERFORMED",
  "shop_order_id": "123456789",
  "payment_method": "GC_CARD",
  "card_type": "MC",
  "pan": "9000XXXXXXXX0000001",
  "transaction_id": "{transaction_id}"
}
```

**preauth**

```json
{
  "status": "success",
  "order_id": "{order_id}",
  "pre_auth_status": "success",
  "payment_hash": "{payment_hash}",
  "ipay_payment_id": "{ipay_payment_id}",
  "status_description": "PERFORMED",
  "shop_order_id": "123456789",
  "payment_method": "GC_CARD",
  "card_type": "MC",
  "pan": "9000XXXXXXXX0000001",
  "transaction_id": "{transaction_id}"
}
```
