Skip to content

PayIn - P2P - H2H#

This page describes the methods for working with P2P PayIn orders using the H2H flow.

Create Order#

Creates an order and synchronously returns the payment details for the client's payment.

Request#

URL: POST https://<host>/api/v3/merchant/orders/payin/p2p/h2h

Headers:

Request body:

Field Type Required Description
methodID integer yes Order method
amount float64 yes Order amount in fiat, rounded to 2 decimal places
clientID string no Client identifier
merchantOrderID string no Merchant order identifier; unique within the merchant
trafficType string no Traffic type
callbackURL string no URL for sending callbacks
clientMetadata object no Client data, see "General Information"

cURL Example#

curl -X 'POST' \
  'https://<host>/api/v3/merchant/orders/payin/p2p/h2h' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <YOUR-API-KEY>' \
  -d '{
  "methodID": 9,
  "amount": 100.12,
  "clientID": "ID1234",
  "merchantOrderID": "316b6280-d6e2-4627-bacd-fcda062438bc",
  "trafficType": "mixed",
  "callbackURL": "http://example.com/webhook",
  "clientMetadata": {
    "phone": "88005553535",
    "operator": "mts",
    "name": "Ivan Ivanov",
    "email": "ivan@example.com",
    "otp": "123456",
    "documentType": "CI",
    "documentNumber": "12345678",
    "streetAddress": "Av. 18 de Julio 1234",
    "city": "Montevideo",
    "zipCode": "11200"
  }
}'

Response#

HTTP Status Code: 200

The response body is the OrderOut order model (see "General Information") with the paymentDetails block of payment details - what the client needs to pay to:

{
  "id": "9c37e448-84b5-4639-9ffa-29558f8f2567",
  "createdAt": "2026-08-31T16:08:06.310479Z",
  "updatedAt": "2026-08-31T16:08:06.825346Z",
  "type": "PayIn",
  "direction": "PayIn",
  "status": "payment_pending",
  "merchantOrderID": "316b6280-d6e2-4627-bacd-fcda062438bc",
  "clientID": "ID1234",
  "methodID": 9,
  "paymentDetails": {
    "requisiteTypeCode": "card",
    "recipientName": "Ivan Ivanov",
    "recipientNumber": "1111 2222 3333 4444",
    "recipientBank": "SBER"
  },
  "currencyCode": "AZN",
  "amount": 100.12,
  "merchantCommission": 0.5,
  "amountUSDT": 56.179801,
  "merchantCommissionUSDT": 0.280899,
  "exchangeRate": 1.78,
  "trafficType": "mixed"
}

Possible business failures (400/409) - see the errorCode table on the "Request Authorization" page. If no provider of the method issued payment details, the request fails with errorCode = no_payment_details_available.

Callback Conditions#

The webhook is sent when the order transitions to one of the trigger statuses. The full list is on the "Callbacks" page.