# Create Point of Sale Payment

The Point of Sale payments API is for creating payments from a POS Terminal and displaying the required information to the payee such as payment address and QR Code.

## Create a Point of Sale Payment

<mark style="color:green;">`POST`</mark> `/api/payment-pos/post`

#### Request Body

| Name                                               | Type   | Description                                                                                                                                        |
| -------------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| asset<mark style="color:red;">\*</mark>            | String | The asset you would like to settle in your account                                                                                                 |
| requested\_asset<mark style="color:red;">\*</mark> | String | The asset you would like your customer to pay in                                                                                                   |
| amount<mark style="color:red;">\*</mark>           | String | Amount you like to receive in the settlement asset                                                                                                 |
| cart\_items                                        | Object | item\_name,item\_desc,item\_quantity,unit\_price (DVD1,Movie Name,1,80)                                                                            |
| description<mark style="color:red;">\*</mark>      | String | Description of Payment                                                                                                                             |
| reference<mark style="color:red;">\*</mark>        | String | Your payment reference                                                                                                                             |
| postback\_url                                      | String | <p>After postback please return a response JSON</p><p><strong>{ status: “ok” }.</strong></p><p>We will try 10 attempts until response received</p> |
| pos\_price\_update\_postback\_url                  | Strng  | Price Update URL (posted at quote expiry)                                                                                                          |
| personal\_fname                                    | String | Customer Firstname                                                                                                                                 |
| personal\_lname                                    | String | Customer Lastname                                                                                                                                  |
| personal\_address                                  | String | Street Address & Number                                                                                                                            |
| personal\_city                                     | String | Customer City                                                                                                                                      |
| personal\_state                                    | String | Customer State                                                                                                                                     |
| personal\_country                                  | String | Country, ISO 3166 2 digit code                                                                                                                     |
| personal\_postcode                                 | String | Postcode / ZIP code                                                                                                                                |
| personal\_mobile                                   | String | <p>Customer's Mobile Number (incl. country code)</p><p><strong>e.g. +614123123123</strong></p>                                                     |
| personal\_dob                                      | String | <p>Customers Date of Birth</p><p><strong>YYYY/MM/DD</strong></p>                                                                                   |
| key<mark style="color:red;">\*</mark>              | String | <p>Merchant's</p><p><a href="../../managing-terminals">Terminal API ID</a></p>                                                                     |
| hash<mark style="color:red;">\*</mark>             | String | <p>MD5 Hash</p><p>key+asset+amount+<a href="../../managing-terminals">api\_secret</a></p>                                                          |

{% tabs %}
{% tab title="200: OK POS Payment Failed" %}

```javascript
{
  "status": "nok",
  "error": "The asset not allow for POS create payment"
}
```

{% endtab %}

{% tab title="201: Created Successfully Created" %}

```javascript
{
    "status": "ok",
    "message": "Create POS Payment Successfully",
    "paymentId": "61af3e476cb0b9603d21f3e6",
    "payment_code": "1cJauhjK3n",
    "payment_address": "2MxajxTWeGm3zYvLvD8rDuD3rgjXCsW4wz6",
    "payment_amount": "0.00039304",
    "payment_amount_asset": "BTC",
    "exchange_rate": "50885.41",
    "payment_payreq": "lntb393040n1ps670jgpp5zv26tw8n2jf52nryltlmkwegf746jnf6qfxusnm0trk3m86ryr2sdpvx9355ct4dp4ykvmwyqkjq3r9d4hjqstrvdjhqarfveuscqzpgxqzjhsp5rca29tttet8h52d73uysf68jzxuxty0jc326krett5mjp2fsd3jq9qyyssqydtsrz508f9lcla0c8zvz98prsjpreh6xzvc5rr6zt6zrtt8ffs4j3kwmp9eaau4l2swekpfvqk0ajwmzamafzlpf3cal4mwrz336fgqftxytm",
    "expires_at": 1638875295
}
```

{% endtab %}
{% endtabs %}

### Example

**Create a Payment & Show Customer QR and Address**

An example of how this API can be used is if a merchant would like to ***receive*** $50.00 USD and the customer would like to ***pay*** using their own Bitcoin balance. In this scenario, the merchant can request `asset=USD` and `requested_asset=BTC.`

This will result in a response containing a BTC payment address, amount of BTC required to complete the payment, the time until the price expires, and a price update request will be required or you can use the [postback price update response](https://docs.cliq.com/payments-api-4/api-reference/payments-api/payment-price-update) that is sent to your specified postback\_url at the expiry time.
