Документация/Платежи/Прямой платёж (H2H)

Прямой платёж (H2H)

POST/api/v1/payments/direct

Приём карточных данных на стороне мерчанта. Доступен только при собственной сертификации PCI DSS.

HMACIdempotency-Key requiredcreateDirectPayment

Параметры тела

ПолеТипОписание
order_idreqstring
amount_minorreqint64
currencyreqstring
descriptionstring
customerobjectCard-holder data. For a Mastercard PAN email is required. For a Visa PAN first_name, last_name, email, billing_address.country and billing_address.line1 are required. country is accepted as a current ISO 3166-1 alpha-2 code and converted to PSP numeric-3 by the backend.
first_namestring
last_namestring
emailemail
phonestring
billing_addressobject
countrystringCurrent assigned ISO 3166-1 alpha-2 country code.
postal_codestring
regionstring
citystring
line1string
line2string | null
line3string | nullThird address line, forwarded to the PSP as address_line_3. Optional everywhere; no card scheme requires it.
customer_referencestringOpaque, stable identifier of the payer in the merchant's own system. It is the account a stored card is bound to: the same reference on a later payment offers that customer their saved cards on the hosted page, and scopes GET /cabinet/v1/payment-method-tokens.
return_urluri
locale"ru" | "en" | "ua"Forwarded to the provider as the envelope `lang`, which chooses the language of the pages the provider renders itself - its hosted checkout and the issuer's 3DS step. Defaults to `ru`. It does not translate the platform's own hosted payment page, which is English-only. If your payers need the platform page in another language, that is a separate piece of work and this field will not produce it.
expires_in_secondsinteger
save_payment_methodbooleanStore the card for later payments by this customer. Requires customer_reference; without one there would be no account to bind the card to and it could never be listed, reused or deleted, so the request is rejected with customer_reference_required.
subscriptionobject
interval_unitreq"day" | "week" | "month" | "year"
interval_countreqinteger
first_charge_atreqdate-time
disclosure_versionreqstring
consentbooleanCheckout collects the payer's separate consent again.
metadataobject
operation_mode"charge" | "authorize"
payment_methodreqobject
typereq"card" | "apple_pay" | "google_pay" | "samsung_pay" | "mobile"
cardobject
numberstring
expire_monthinteger
expire_yearinteger
cvvstring
cardholderstring
walletobject
payload_mode"token" | "direct"Selects the documented token or direct PSP wallet method. Wallet authorize is supported when the channel capability allows it.
mobileobjectRequired when type is mobile: the mobile account the operator debits. Rejected with 422 capability_not_supported together with operation_mode=authorize - the operator settles immediately and offers no hold to capture later.
phonereqstringE.164, leading plus required. Spaces, dashes and brackets are stripped before validation. The plus is not assumed: a national number carries no country code, and reading its first digits as one would debit a different subscriber.
deviceobjectNeutral browser snapshot. The backend derives authoritative accept_header and user_agent values from HTTP request headers and merges payer IP only into the provider DTO. Forwarded IP headers are accepted only from socket peers in the configured trusted-proxy CIDRs.
accept_headerstring
color_depthnumber
screen_widthnumber
screen_heightnumber
viewport_widthnumber
viewport_heightnumber
device_pixel_rationumber
languagestring
languagesstring[]
timezonestring
utc_offsetnumber
user_agentstring
platformstring
javascript_enabledboolean
touch_enabledboolean
max_touch_pointsnumber
cookie_enabledboolean
onlineboolean
referrer_originstring
session_started_atstring
client_timestampstring

Пример

Запрос

POST /api/v1/payments/direct
Idempotency-Key: order-20260817-001

{
  "order_id": "order-20260817-001",
  "amount_minor": 1001,
  "currency": "EUR",
  "description": "Заказ №014",
  "return_url": "https://merchant.example.com/payments/return",
  "payment_method": {
    "type": "card"
  }
}

Ответ 201

{
  "payment_id": "0198c5f2-7b3e-7a41-9c2d-3f8a1b6e4d02",
  "status": "created",
  "final": false,
  "created_at": "2026-08-17T12:45:22Z",
  "updated_at": "2026-08-17T12:45:22Z"
}

Собрать запрос

Собрать запрос
curl -X POST \
  https://api.calibripay.com/api/v1/payments/direct \
  -H "X-Access-Key: $CALIBRIPAY_ACCESS_KEY" \
  -H "X-Timestamp: $TS" \
  -H "X-Nonce: $NONCE" \
  -H "X-Signature: $SIGNATURE" \
  -H "Idempotency-Key: order-20260817-001" \
  -d '{ "order_id": "order-20260817-001", "amount_minor": 1001, "currency": "EUR", "description": "Заказ №014", "return_url": "https://merchant.example.com/payments/return", "payment_method": { "type": "card" } }'

$TS, $NONCE и $SIGNATURE вычисляются на вашем backend по канонической строке. secret_key никогда не должен попадать в браузер, в командную строку из истории и в тикеты.

Была ли страница полезной?