Skip to main content

POST /api/v1/p2p/orders

Create a P2P order against an existing advertisement. The seller's USDT is frozen for the duration of the order.

When a buyer creates an order against a sell ad, the ad owner's USDT is frozen. When a seller creates an order against a buy ad, the order creator's USDT is frozen.

Authentication​

Required. Pass a Bearer token in the Authorization header.

Request​

ParameterTypeInDescription
ad_idintegerbodyID of the advertisement to trade against
usdt_amountintegerbodyOrder amount in kopecks (balance units). For RUB this equals fiat amount
payment_methodstringbodySelected payment method from the ad's payment_methods list
payment_detailsobjectbodyPayment details (optional; used when seller accepts a buy-ad order)
formatstringbodyOrder format: "fast_pay" (card) or "p2p" (optional)

Example​

curl -X POST https://example.com/api/v1/p2p/orders \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"ad_id": 42,
"usdt_amount": 500000,
"payment_method": "sber"
}'

Response​

200 OK​

Returns the ID of the created order. If a card order was also created (bank P2P), card_order_id is included.

{
"id": 101,
"card_order_id": 55
}

The card_order_id field is only present when the order goes through the platform bank flow.

Errors​

StatusCodeDescription
400AD_NOT_ACTIVEThe referenced ad is not active
400OWN_ADCannot create an order for your own ad
400MIN_DEPOSIT_REQUIREDMinimum total deposit required for withdrawal
400WAGERING_REQUIREMENT_NOT_METWagering requirement not met
400AMOUNT_TOO_LOWAmount is less than the ad minimum
400AMOUNT_TOO_HIGHAmount is greater than the ad maximum
400AMOUNT_EXCEEDS_AVAILABLEAmount exceeds available amount on this ad
400AMOUNT_TOO_SMALLAmount is too small for the given exchange rate
400INVALID_PAYMENT_METHODSelected payment method is not accepted
400SELLER_INSUFFICIENT_BALANCESeller has insufficient balance
400ACTIVE_DEPOSIT_ORDER_EXISTSAlready have an active deposit order
400ACTIVE_WITHDRAW_ORDER_EXISTSAlready have an active withdrawal order
401—Missing or invalid token
500CREATE_ORDER_FAILEDInternal error