---
title: "Pay"
source_url: https://docs.rapyd.net/en/pay.html
lang: en
---

# Pay

Make a payment from a wallet.

This method authenticates the Point-of-Sale and the customer with the Rapyd platform.

This method requires a one-time password.

> **Note:**
>
> The base URL for the POS production environment is **https://pos.rapyd.net**. It requires its own access key, which is different from the access key for the Payment API. To obtain an access key for the POS production environment and to set up a sandbox environment for the POS API, contact **[Rapyd Client Support](https://support.rapyd.net)**.

### Parameters

### Request Path Parameters

- - amount
  - Amount of the payment. Decimal.
- - currency
  - Three-letter ISO 4217 code for the currency used in the `amount` field. Uppercase.
- - otp_code
  - User one-time password code.
- - pos
  - Point-of-sale external ID.
- - phone_number
  - Phone number of the wallet in E.164 format.

### Request Header Parameters

- - access_key
  - Unique access key provided by Rapyd for each authorized user.

    See [Developers](https://docs.rapyd.net/en/developers.md "Developers").
- - Content-Type
  - Indicates that the data appears in JSON format. Set to **application/json**.

### Request Body Parameters

- - metadata
  - A JSON object defined by the client. See [Metadata](https://docs.rapyd.net/en/metadata.md "Metadata").

### Response Parameters

- - metadata
  - A JSON object defined by the client. See [Metadata](https://docs.rapyd.net/en/metadata.md "Metadata").
- - transaction_id
  - ID of the withdrawal transaction. UUID.

- /v1/pos/{pos}/{phone_number}/{otp_code}/pay/{amount}/{currency}

- Pay
- ```curl
  curl -X post
  https://sandboxpos.rapyd.net/v1/pos/ac3dbdfe-0e14-11e7-8115-0ef1982c1e4a/+14085554369/cb989044-c3bc-11e7-9273-0ef1982c1e4a/pay/29.99/USD
  -H 'access_key: your-access-key-here'
  -H 'Content-Type: application/json'
  -H 'idempotency: your-idempotency-parameter-here'
  -H 'salt: your-random-string-here'
  -H 'signature: your-calculated-signature-here'
  -H 'timestamp: your-unix-timestamp-here'
  ```
- ```json
  {
      "status": {
          "error_code": "0",
          "status": "SUCCESS",
          "message": "",
          "operation_id": "a331798d-2444-43c3-80fc-c522bb91ada6"
      },
      "data": {
          "transaction_id": "3709e88d-ad8d-11e7-9273-0ef1982c1e4a",
          "metadata": {}
      }
  }
  ```
