Перейти до основного вмісту

API інтеграція

Direct-інтеграція

Такий тип інтеграції дозволить вам збільшувати суму попереднього резервування (Auth) на власній платіжній сторінці.

Формат взаємодії:

Формат взаємодії

Запит на додаткове резервування може застосовуватися тільки до первинних операцій резервування (auth) з успішним статусом (success). Використовуйте HTTP-метод POST.

Параметри запиту:

ParameterTypeRequiredDescription
pos_idUUIDMerchant's project identifier
order_idStringIdentifier of the original order (auth) for which the initial authorization was successfully performed
increment_amountNumberDelta amount by which the current hold should be increased. Passed as a number (e.g., 20.00)
order_currencyCURRENCYTransaction currency (ISO 4217). Must match the currency of the original hold (auth)
commentStringDescription of the reason for the increment. Shown in the merchant portal, helps with dispute/chargeback investigation
server_urlURLWebhook notification will be sent to this URL

Приклад запиту:

$ curl --location 'https://api.finline.io/api/v1/auth-increment' \
-H "Content-Type: application/json" \
-H "X-API-AUTH: CPAY-HMAC-SHA256 ${API_KEY}:${SIGNATURE}" \
-X POST -d '{
"pos_id": "${POS_ID}",
"order_id": "auth-78901",
"increment_amount": 20.00,
"order_currency": "UAH",
"comment": "Збільшення суми холду за додаткову зупинку",
"server_url": "https://api.merchant.com/webhooks/callback"
}'

Параметри відповіді:

ParameterTypeDescription
operation_idUUIDUnique increment identifier
payment_idUUIDpayment identifier of primary operation
order_idStringMerchant's order_id of primary operation
transaction_idUUIDUnique transaction identifier
pos_idUUIDMerchant's identifier (POS_ID)
modeMODEdirect
methodMETHODauth_increment
amountNumberActual increment amount
currencyCURRENCYTransaction currency
statusSTATUSTransaction status
status_codeSTATUS_CODEpayment status code
status_descriptionSTATUS_DESCRIPTIONpayment status code description
feeObjectAmount and currency of commission
commentStringIncrement comment
created_atTIMESTAMPTimestamp when transaction was created
processed_atTIMESTAMPTimestamp when transaction was updated last time

Приклад відповіді:

{
"operation_id": "edf7605c-99a8-43be-a1a5-2e96ebac8512",
"payment_id": "c4939398-1dad-4b92-1c34-7f6802379180",
"order_id": "auth-78901",
"transaction_id": "4f98dc46-ffff-4ba7-a267-286fe7669894",
"pos_id": "6eb070d5-7fbe-1176-9488-c152b60dd346",
"mode": "direct",
"method": "auth_increment",
"amount": 20.00,
"currency": "UAH",
"status": "success",
"status_code": "1000",
"status_description": "Transaction is successful.",
"fee": null,
"comment": "Збільшення суми холду за додаткову зупинку",
"created_at": "2018-10-10T10:10:10.100",
"processed_at": "2018-10-10T10:10:12.000"
}

Наступні кроки

Процедура тестування та виходу в онлайн є аналогічною тій, що передбачена для одностадійної оплати.

Дивіться також: