Developers

Easily connect payment acceptance to your service via the API. Payments, receipts, subscriptions, balances and payouts — in one REST API.

Base URL
https://urlpay.io/api
Authorization
Authorization: Bearer <API-key>
Format
JSON, UTF-8

Quick start

  1. 01Get your keysYour API key and secret key are in the dashboard, under shop settings. The API key goes in the Authorization header.
  2. 02Sign the requestThe sign field is the SHA-1 of currency, amount, shopId and your secret key concatenated.
  3. 03Create a paymentPOST /v2/payments returns paymentUrl — send your customer to that page.
POST /v2/paymentsRequest
curl -X POST https://urlpay.io/api/v2/payments \
  -H "Authorization: Bearer <API-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "currency": "rub",
    "amount": "1000.50",
    "uuid": "invoice_123",
    "shopId": 5,
    "description": "Покупка булочек",
    "items": [{
      "description": "Покупка булочек",
      "quantity": 1,
      "price": 1000.50,
      "vat_code": 0,
      "payment_subject": 1,
      "payment_mode": 4
    }],
    "sign": "<sha1>"
  }'
sign = sha1("rub" + "1000.50" + "5" + "<secret_key>")
201 CreatedResponse
{
  "success": true,
  "paymentUrl": "https://urlpay.io/payment/widget/…",
  "id": 1
}

Payment notification

If a notification URL is set in your shop settings, UrlPay sends it a POST request with the payment status: success — paid, cancel — canceled.

POST callback URL
{
  "id": 12345,
  "amount": 100.50,
  "currency": "RUB",
  "uuid": "external-uuid-123",
  "payment_status": "success"
}

SBP and QR payments through the API

Create the payment on your server

POST /v2/payments returns paymentUrl and a payment ID. Store the ID against your order reference. Check that SBP is enabled for the shop before using it in checkout.

Send the customer to paymentUrl

When SBP is enabled, the customer selects it on the hosted page and opens the bank app via the QR code or payment button. The amount is tied to the payment you created.

Confirm the payment status

Use the payment notification or retrieve the payment with GET /v2/payments/{id}. Match the reference and amount to your order before confirming purchase.

API reference

All methods, parameters and responses — from the OpenAPI specification.

Loading the reference…

Leave a request

Fill out the form — a manager will get in touch, tailor the terms and help with the integration.

Topic