# Order Request ⚠️(Deprecated)

By calling this method an Online Shop sends the payments details, technical parameters, and a payment amount to a Payment Server. To proceed further in case of the successful operation, a customer should be redirected to an Online Payment Webpage as per a `REDIRECT URL` returned in a `links` parameter

## Parameters

- `intent` — CAPTURE | AUTHORIZE, required

  Defines which payment method can be used by the customer for payment
  `CAPTURE` - allows a customer to choose either to perform payment via card or via using Bank of Georgia’s internet-banking credentials.
  `AUTHORIZE` - allows a customer to perform a payment only by providing a card information.

- `items` — array, required

  The list of products purchased in the Online Shop within a given purchase

  - `amount` — string, required

    A price of a single purchased item

  - `description` — string, required

    A name of a purchased item (description)

  - `quantity` — number, required

    A number of purchased items

  - `product_id` — string, required

    An ID of a purchased item in the Online Shop system

- `locale` — ka | en-US

  Defines the language of the Online Payment Webpage on which a customer will be redirected.
  Can have one of the following two values:
  - ka – Georgian
  - en-US – US English.

- `shop_order_id` — string

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

- `redirect_url` — string, required

  An address (URL) of a webpage of the Online Shop to which a customer will be redirected from the Online Payment System once the payment transaction is completed successfully or unsuccessfully

- `show_shop_order_id_on_extract` — boolean

  Defines what kind of payment info will be shown to a customer on an Online Payment Webpage.
  Can have one of the following values:
  `false` - Customer will see in the payment statement the first 25 symbols of product description list divided by “,” from items array.
  `true` - the payment statement will be similar to the case of "false", however it will be prefixed with a shop_order_id.

- `capture_method` — AUTOMATIC | MANUAL

  Payment method which can have one of the two following values:
  - AUTOMATIC - Payment will be performed without a pre-authorization, meaning that a Payment Amount will be immediately deducted from a customer’s account balance.
  - MANUAL - A Payment Amount will be blocked on a customer’s account balance and will not be available for a customer. In this case, the pre-authorization method should be used to complete the payment transaction or the return method should be used to unblock/return the Payment Amount. The Payment Amount is automatically unblocked and available for a customer.

  If the operation is not completed in 30 days.

- `purchase_units` — array, required

  Contains information about the Payment Amount and currency.

  - `amount` — object, required

    A Payment Amount object

    - `currency_code` — GEL, required

    A payment currency. Always should have a value "GEL".

    - `value` — number, required

    A Payment Amount value.

**REQUEST**

```api
POST /api/v1/checkout/orders
Content-Type: application/json
Authorization: Bearer <jwt_token>
```

```json
{
  "intent": "CAPTURE",
  "items": [
    {
      "amount": "10.50",
      "description": "test_product",
      "quantity": "1",
      "product_id": "123456"
    }
  ],
  "locale": "ka",
  "shop_order_id": "123456",
  "redirect_url": "https://demo.ipay.ge?shop_order_id=<shop_order_id>",
  "show_shop_order_id_on_extract": true,
  "capture_method": "AUTOMATIC",
  "purchase_units": [
    {
      "amount": {
        "currency_code": "GEL",
        "value": "10.50"
      }
    }
  ]
}
```

### Response

- `status` — string

  A status of an Online Payment.

- `payment_hash` — string

  A unique hashed payment identifier generated by an Online Payment System during requesting an order. On the next step, a hashed identifier will be again passed from the Bank to a Merchant. Verifying the identifier provides additional security.

- `links` — array

  Addresses of the web resources which are used on the next steps of the payment process. There are two kinds of resources which could be returned at the moment:

  - A Payment Details Address which gives the possibility to retrieve information regarding the online payment (rel = self).
  - A webpage Address on which a customer should be redirected to fill in the plastic card details or the online banking details and to finalize a payment process (rel = approve).

  - `href` — string

    A Web resource Address.

  - `rel` — string

    A Web resource unique name.

  - `method` — string

    An HTTP method that should be used to redirect on the web resource (GET, REDIRECT…)

  - `order_id` — string

    An online Payment Identifier.
