Download OpenAPI specification:Download
Main type of authorization is BasicAuth which is always required. To perform payment requests on behalf of another login, you have to provide it in onBehalfOf header. If you would like to receive customer's information with RID auth token - add customerAuth to your request.
Basic Auth consists of login and password combined into a header field in the following form:
Authorization: Basic <credentials>
where <credentials>
is the Base64 encoding of login and password joined by a single colon :
.
You should be provided with login and password by our support team.
Otherwise, if you have already been using other RozetkaPay online payments API,
you can reuse previously provided API_KEY
and API_SECRET
for X-API-AUTH
header
as login and password respectively to authorize into API Gateway.
If you wish to provide your customers a better experience, we support online payments with Apple Pay & Google Pay. You have two options to integrate those payment methods:
To add the Apple Pay entitlement to your website or mobile application, you need to have:
To integrate Apple Pay to your mobile application, follow the instruction.
To integrate Apple Pay to your website, follow the instruction.
After you completed the integration with Apple Pay for any of your environment (mobile or web), you should receive the following kind of JSON object as a result of Apple Pay call:
{
"version": "EC_v1",
"data": "zTMZDPumdE7h8oY/+31VMZd60dMaxB...",
"signature": "MIAGCSqGSIb3DQEHA...",
"header": {
"ephemeralPublicKey": "MFkwEwYHKoZIzj0C...",
"publicKeyHash": "3AKqH/wPWdQIBpGIv1PC4uDTbGouPgWbmUlFGiHopig=",
"transactionId": "d6e63976191fdf051f7cb95e0e5da70a19c99a5576ececbfc0fd65ad2a7f2f74"
}
}
This payload should be encoded to Base64 and passed
in customer.payment_method.apple_pay.token
field on Create payment operation.
Firstly please review the following documentation in order to get familiar with the integration process:
The gateway
parameter in the script should have the constant value of evopay
.
The value of the gatewayMerchantId
parameter should be a unique identifier which can be provided via our Support team.
In response, Google shall return the PaymentData
item, and the field paymentMethodData.tokenizationData.token
shall contain a safely encrypted Google Pay Token (a string of characters).
This string should be encoded to Base64 and passed
in customer.payment_method.google_pay.token
field on Create payment operation.
RozetkaPay applies rate limit for its APIs.
API client should handle rate limiting gracefully. It is recommended to watch for 429 status codes and build in a retry mechanism with an exponential backoff schedule. Some randomness could be added into the backoff to avoid a thundering herd effect. X-RATELIMIT-RESET header (time in seconds, after which requests are allowed again) could be used as a basis for retry mechanism.
Example of headers for 1000 requests/second rate limit (after first request):
Header field name | Description | Example |
---|---|---|
X-RATELIMIT-LIMIT |
Allowed requests per second |
X-RATELIMIT-LIMIT: 1000 |
X-RATELIMIT-RESET |
Time to reset in seconds |
X-RATELIMIT-RESET: 0 |
X-RATELIMIT-REMAINING |
Number of left requests |
X-RATELIMIT-REMAINING: 999 |
In order to smoothly collect customer's card details, you have to use our Widget Checkout. It might be embedded into your web page and should provide smooth and secure credit card tokenization flow.
Include script
tag into your website: <script src="https://cdn.rozetkapay.com/widget.js" async></script>
The script is loaded asynchronously.
init()
method receive parameters:let initParams = {
/* Widget token issued by RozetkaPay */
key: 'hQ8aqcm/RG1RF7MaImmzZUsThYhAVDG6R7kazf9+r7zuoWo6',
/* Optional amount */
amount: 350.5,
/* Currently, only 'inline' mode is supported */
mode: 'inline',
/* Optional user language */
lang: 'uk',
/* Optional predefined custom style */
style: 'evo',
/* Optional widget type */
type: 'full_card',
/* Optional customer ip */
customer_ip: '127.0.0.1',
/* Optional customer id */
customer_id: '123',
/* Optional customer email */
customer_email: '[email protected]',
/* Optional customer country */
customer_country: 'UA',
/* Optional customer city */
customer_city: 'Kyiv',
/* Identifier of HTML element (for 'inline' mode only) */
selector: 'widget-checkout',
/* Handler for receiving token data */
onToken: function(tokenData) {
/*
It is guaranteed that`tokenData` will have the following fields:
{
"token": "String(<=128)",
"expires_at": "ISO-8601 DateTime",
"card_mask": "String(13-19)"
}
*/
}
};
let widget = RPayCardWidget.init(initParams)
RPayCardWidget#init
parameters:Parameter | Type | Required | Description |
---|---|---|---|
key |
String | ✅ | API token issued by RozetkaPay. |
mode |
String | ✅ | Should be equal to inline . |
selector |
String | ✅ | Identifier of HTML element (e.g. div id={payform-holder} ) where the widget will be mounted (for inline mode). |
onToken |
Function | ✅ | Callback to invoke when the checkout process is complete. |
amount |
Number | Optional amount to be shown in widget for UX purposes. | |
locale |
Object | Locale customization | |
lang |
String | Preferred widget localization. Currently supported languages: en , uk , pl . |
|
style |
String | Optional predefined custom style | |
type |
String | Optional widget type. Available options: full_card (default) - collect all card credentials (payments), pan_only - tokenize only card number (payouts). |
|
template |
String | Optional custom template. Currently supported templates: line |
|
customer_ip |
String | Optional customer IP address. | |
customer_id |
String | Optional customer identifier in merchant's system (required in case of External tokenization). | |
customer_email |
String | Optional customer email (required in case of External tokenization). | |
customer_country |
String | Optional customer country. | |
customer_city |
String | Optional customer city. | |
locale |
Object | Optional object to set text for widget elements. |
locale
object example{
"uk": {
"cardNumber": "Номер карти",
"expiryDate": "Строк дії",
"cvv": "CVV",
"submit": "Сплатити",
"yy": "ГГ",
"mm": "ММ",
"hints": {
"cvvHint": "Код міститься на зворотній стороні карти"
},
"errors": {
"cardnumber": "Неправильний номер карти",
"expiryDate": "Строк дії карти закінчився",
"cvv": "Некорректний CVV/CVC2 код"
}
}
}
#onToken
parameters:Parameter | Type | Required | Description |
---|---|---|---|
token |
String(≤128) | ✅ | Token issued by RozetkaPay. Acceptable for payments via direct mode. |
expires_at |
String(26) | ✅ | ISO-8601 timestamp (yyyy-mm-ddThh:mm:ss ). End of token life. Example: 2099-12-31T00:00:00 . |
card_mask |
String(13-19) | ✅ | Mask of tokenized card. Example: 424242******4242 . |
RPayCardWidget#init
return special control object with the following API methods:
Method | Parameter | Description |
---|---|---|
widget.open() |
none | Render widget |
widget.close() |
none | Force close widget |
// Eagerly initialize widget
function __onWidgetReady() {
let widget = RPayCardWidget.init({
key: 'hQ8aqcm/RG1RF7MaImmzZUsThYhAVDG6R7kazf9+r7zuoWo6',
amount: 350.5,
mode: 'inline',
lang: 'uk',
selector: 'widget-checkout',
/* Handler for receiving token data */
onToken: function(tokenData) {
/* Handle token data. For example, create direct payment or add card to wallet */
backend.submitPayment(orderId, tokenData);
}
});
}
const payButton = document.getElementById('btn-pay');
// Open widget on action
payButton.addEventListener('click', function(e) {
e.preventDefault();
widget.open();
});
After internal form submission, RozetkaPay token token will be sent in response to onToken
function.
If script was loaded asynchronously, you should wrap init()
method in function wrapper: __onWidgetReady
// Create widget entity on button click (for example, radio button option)
function __onWidgetReady() {
document
.getElementById('btn-pay')
.addEventListener('click', function(e) {
e.preventDefault();
RPayCardWidget
.init({
key: 'hQ8aqcm/RG1RF7MaImmzZUsThYhAVDG6R7kazf9+r7zuoWo6',
amount: 350.5,
mode: 'inline',
lang: 'uk',
selector: 'widget-checkout',
/* Handler for receiving token data */
onToken: function(tokenData) {
// Handle token data. For example, create direct payment or add card to wallet.
backend.submitToken(orderId, tokenData);
}
})
.open();
}
);
}
function __onWidgetReady() {
RPayCardWidget.init({ ... }).open();
}
document.addEventListener('widget-init-ready', () => {
widget.open();
})
document.addEventListener('widget-init-error', (e) => {
console.error('error', e.detail.id, e.detail.message)
});
After widget is successfully initiated, widget-init-ready
event is dispatched. Otherwise, in case of error, widget will dispatch widget-init-error
error.
You can add event listener to this events.
Creates payment and performs desired operation.
When mode
is set to direct
- customer
field becomes required.
amount required | number |
callback_url | string <url> |
result_url | string <url> |
confirm | boolean Default: true If |
currency required | string |
object (CustomerRequestUserDetails) | |
description | string |
external_id required | string You can use |
payload | string |
Array of objects (Product) | |
object | |
object (RecipientRequestUserDetails) | |
mode required | string (PaymentMode) Enum: "direct" "hosted" Describes the way of the integration:
|
{- "amount": 0,
- "callback_url": "string",
- "result_url": "string",
- "confirm": true,
- "currency": "string",
- "customer": {
- "color_mode": "white",
- "locale": "UK",
- "account_number": "string",
- "ip_address": "192.168.0.1",
- "address": "string",
- "city": "string",
- "country": "string",
- "external_id": "string",
- "first_name": "string",
- "last_name": "string",
- "patronym": "string",
- "phone": "string",
- "postal_code": "string",
- "payment_method": {
- "apple_pay": {
- "browser_fingerprint": {
- "browser_accept_header": "string",
- "browser_color_depth": "string",
- "browser_ip_address": "string",
- "browser_java_enabled": "string",
- "browser_language": "string",
- "browser_screen_height": "string",
- "browser_time_zone": "string",
- "browser_time_zone_offset": "string",
- "browser_user_agent": "string"
}, - "token": "string",
- "use_3ds_flow": true
}, - "cc_token": {
- "browser_fingerprint": {
- "browser_accept_header": "string",
- "browser_color_depth": "string",
- "browser_ip_address": "string",
- "browser_java_enabled": "string",
- "browser_language": "string",
- "browser_screen_height": "string",
- "browser_time_zone": "string",
- "browser_time_zone_offset": "string",
- "browser_user_agent": "string"
}, - "token": "string",
- "use_3ds_flow": true
}, - "google_pay": {
- "browser_fingerprint": {
- "browser_accept_header": "string",
- "browser_color_depth": "string",
- "browser_ip_address": "string",
- "browser_java_enabled": "string",
- "browser_language": "string",
- "browser_screen_height": "string",
- "browser_time_zone": "string",
- "browser_time_zone_offset": "string",
- "browser_user_agent": "string"
}, - "token": "string",
- "use_3ds_flow": true
}, - "type": "cc_token",
- "wallet": {
- "browser_fingerprint": {
- "browser_accept_header": "string",
- "browser_color_depth": "string",
- "browser_ip_address": "string",
- "browser_java_enabled": "string",
- "browser_language": "string",
- "browser_screen_height": "string",
- "browser_time_zone": "string",
- "browser_time_zone_offset": "string",
- "browser_user_agent": "string"
}, - "option_id": "string",
- "use_3ds_flow": true
}
}
}, - "description": "string",
- "external_id": "string",
- "payload": "string",
- "products": [
- {
- "category": "string",
- "currency": "string",
- "description": "string",
- "id": "string",
- "image": "string",
- "name": "string",
- "net_amount": 0,
- "quantity": "string",
- "url": "string",
- "vat_amount": 0
}
], - "properties": {
- "property1": "string",
- "property2": "string"
}, - "recipient": {
- "address": "string",
- "city": "string",
- "country": "string",
- "external_id": "string",
- "first_name": "string",
- "last_name": "string",
- "patronym": "string",
- "phone": "string",
- "postal_code": "string",
- "payment_method": {
- "type": "cc_token",
- "cc_token": {
- "token": "string"
}, - "wallet": {
- "option_id": "string"
}
}
}, - "mode": "direct"
}
{- "action": {
- "type": "url",
- "value": "string"
}, - "action_required": true,
- "details": {
- "amount": 0,
- "billing_order_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "currency": "string",
- "description": "string",
- "gateway_order_id": "string",
- "payload": "string",
- "payment_id": "string",
- "processed_at": "2019-08-24T14:15:22Z",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "rrn": "string",
- "status": "init",
- "status_code": "authorization_failed",
- "status_description": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "fee": {
- "amount": 0,
- "currency": "string"
}, - "terminal_name": "string",
- "method": "string"
}, - "external_id": "string",
- "id": "0",
- "is_success": true,
- "receipt_url": "string",
- "payment_method": {
- "cc_token": {
- "bank_short_name": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "mask": "string",
- "payment_system": "string",
- "token": "string"
}, - "type": "cc_token"
}, - "customer": {
- "browser_user_agent": "string",
- "external_id": "string",
- "first_name": "string",
- "ip_address": "string",
- "last_name": "string",
- "patronym": "string",
- "phone": "string"
}, - "operation": "create"
}
{- "action": {
- "type": "url",
- "value": "string"
}, - "action_required": true,
- "details": {
- "amount": 0,
- "billing_order_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "currency": "string",
- "description": "string",
- "gateway_order_id": "string",
- "payload": "string",
- "payment_id": "string",
- "processed_at": "2019-08-24T14:15:22Z",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "rrn": "string",
- "status": "init",
- "status_code": "authorization_failed",
- "status_description": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "fee": {
- "amount": 0,
- "currency": "string"
}, - "terminal_name": "string",
- "method": "string"
}, - "external_id": "string",
- "id": "0",
- "is_success": true,
- "receipt_url": "string",
- "payment_method": {
- "cc_token": {
- "bank_short_name": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "mask": "string",
- "payment_system": "string",
- "token": "string"
}, - "type": "cc_token"
}, - "customer": {
- "browser_user_agent": "string",
- "external_id": "string",
- "first_name": "string",
- "ip_address": "string",
- "last_name": "string",
- "patronym": "string",
- "phone": "string"
}, - "operation": "create"
}
Confirm two-step payment.
external_id required | string External ID of a payment, passed from your side on create. |
amount | number |
callback_url | string <url> |
currency | string |
payload | string |
{- "external_id": "string",
- "amount": 0,
- "callback_url": "string",
- "currency": "string",
- "payload": "string"
}
{- "action": {
- "type": "url",
- "value": "string"
}, - "action_required": true,
- "details": {
- "amount": 0,
- "billing_order_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "currency": "string",
- "description": "string",
- "gateway_order_id": "string",
- "payload": "string",
- "payment_id": "string",
- "processed_at": "2019-08-24T14:15:22Z",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "rrn": "string",
- "status": "init",
- "status_code": "authorization_failed",
- "status_description": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "fee": {
- "amount": 0,
- "currency": "string"
}, - "terminal_name": "string",
- "method": "string"
}, - "external_id": "string",
- "id": "0",
- "is_success": true,
- "receipt_url": "string",
- "payment_method": {
- "cc_token": {
- "bank_short_name": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "mask": "string",
- "payment_system": "string",
- "token": "string"
}, - "type": "cc_token"
}, - "customer": {
- "browser_user_agent": "string",
- "external_id": "string",
- "first_name": "string",
- "ip_address": "string",
- "last_name": "string",
- "patronym": "string",
- "phone": "string"
}, - "operation": "create"
}
{- "action": {
- "type": "url",
- "value": "string"
}, - "action_required": true,
- "details": {
- "amount": 0,
- "billing_order_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "currency": "string",
- "description": "string",
- "gateway_order_id": "string",
- "payload": "string",
- "payment_id": "string",
- "processed_at": "2019-08-24T14:15:22Z",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "rrn": "string",
- "status": "init",
- "status_code": "authorization_failed",
- "status_description": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "fee": {
- "amount": 0,
- "currency": "string"
}, - "terminal_name": "string",
- "method": "string"
}, - "external_id": "string",
- "id": "0",
- "is_success": true,
- "receipt_url": "string",
- "payment_method": {
- "cc_token": {
- "bank_short_name": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "mask": "string",
- "payment_system": "string",
- "token": "string"
}, - "type": "cc_token"
}, - "customer": {
- "browser_user_agent": "string",
- "external_id": "string",
- "first_name": "string",
- "ip_address": "string",
- "last_name": "string",
- "patronym": "string",
- "phone": "string"
}, - "operation": "create"
}
Cancel two-step payment
external_id required | string External ID of a payment, passed from your side on create. |
amount | number |
callback_url | string <url> |
currency | string |
payload | string |
{- "external_id": "string",
- "amount": 0,
- "callback_url": "string",
- "currency": "string",
- "payload": "string"
}
{- "action": {
- "type": "url",
- "value": "string"
}, - "action_required": true,
- "details": {
- "amount": 0,
- "billing_order_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "currency": "string",
- "description": "string",
- "gateway_order_id": "string",
- "payload": "string",
- "payment_id": "string",
- "processed_at": "2019-08-24T14:15:22Z",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "rrn": "string",
- "status": "init",
- "status_code": "authorization_failed",
- "status_description": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "fee": {
- "amount": 0,
- "currency": "string"
}, - "terminal_name": "string",
- "method": "string"
}, - "external_id": "string",
- "id": "0",
- "is_success": true,
- "receipt_url": "string",
- "payment_method": {
- "cc_token": {
- "bank_short_name": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "mask": "string",
- "payment_system": "string",
- "token": "string"
}, - "type": "cc_token"
}, - "customer": {
- "browser_user_agent": "string",
- "external_id": "string",
- "first_name": "string",
- "ip_address": "string",
- "last_name": "string",
- "patronym": "string",
- "phone": "string"
}, - "operation": "create"
}
{- "action": {
- "type": "url",
- "value": "string"
}, - "action_required": true,
- "details": {
- "amount": 0,
- "billing_order_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "currency": "string",
- "description": "string",
- "gateway_order_id": "string",
- "payload": "string",
- "payment_id": "string",
- "processed_at": "2019-08-24T14:15:22Z",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "rrn": "string",
- "status": "init",
- "status_code": "authorization_failed",
- "status_description": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "fee": {
- "amount": 0,
- "currency": "string"
}, - "terminal_name": "string",
- "method": "string"
}, - "external_id": "string",
- "id": "0",
- "is_success": true,
- "receipt_url": "string",
- "payment_method": {
- "cc_token": {
- "bank_short_name": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "mask": "string",
- "payment_system": "string",
- "token": "string"
}, - "type": "cc_token"
}, - "customer": {
- "browser_user_agent": "string",
- "external_id": "string",
- "first_name": "string",
- "ip_address": "string",
- "last_name": "string",
- "patronym": "string",
- "phone": "string"
}, - "operation": "create"
}
Refund one-step payment after withdrawal, or two-step payment after confirmation.
external_id required | string External ID of a payment, passed from your side on create. |
amount | number |
callback_url | string <url> |
currency | string |
payload | string |
{- "external_id": "string",
- "amount": 0,
- "callback_url": "string",
- "currency": "string",
- "payload": "string"
}
{- "action": {
- "type": "url",
- "value": "string"
}, - "action_required": true,
- "details": {
- "amount": 0,
- "billing_order_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "currency": "string",
- "description": "string",
- "gateway_order_id": "string",
- "payload": "string",
- "payment_id": "string",
- "processed_at": "2019-08-24T14:15:22Z",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "rrn": "string",
- "status": "init",
- "status_code": "authorization_failed",
- "status_description": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "fee": {
- "amount": 0,
- "currency": "string"
}, - "terminal_name": "string",
- "method": "string"
}, - "external_id": "string",
- "id": "0",
- "is_success": true,
- "receipt_url": "string",
- "payment_method": {
- "cc_token": {
- "bank_short_name": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "mask": "string",
- "payment_system": "string",
- "token": "string"
}, - "type": "cc_token"
}, - "customer": {
- "browser_user_agent": "string",
- "external_id": "string",
- "first_name": "string",
- "ip_address": "string",
- "last_name": "string",
- "patronym": "string",
- "phone": "string"
}, - "operation": "create"
}
{- "action": {
- "type": "url",
- "value": "string"
}, - "action_required": true,
- "details": {
- "amount": 0,
- "billing_order_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "currency": "string",
- "description": "string",
- "gateway_order_id": "string",
- "payload": "string",
- "payment_id": "string",
- "processed_at": "2019-08-24T14:15:22Z",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "rrn": "string",
- "status": "init",
- "status_code": "authorization_failed",
- "status_description": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "fee": {
- "amount": 0,
- "currency": "string"
}, - "terminal_name": "string",
- "method": "string"
}, - "external_id": "string",
- "id": "0",
- "is_success": true,
- "receipt_url": "string",
- "payment_method": {
- "cc_token": {
- "bank_short_name": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "mask": "string",
- "payment_system": "string",
- "token": "string"
}, - "type": "cc_token"
}, - "customer": {
- "browser_user_agent": "string",
- "external_id": "string",
- "first_name": "string",
- "ip_address": "string",
- "last_name": "string",
- "patronym": "string",
- "phone": "string"
}, - "operation": "create"
}
Get payment info by id
external_id required | any External ID (unique identifier) |
{- "action": {
- "type": "url",
- "value": "string"
}, - "action_required": true,
- "amount": 0,
- "amount_canceled": 0,
- "amount_confirmed": 0,
- "amount_refunded": 0,
- "canceled": true,
- "cancellation_details": [
- {
- "amount": 0,
- "billing_order_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "currency": "string",
- "description": "string",
- "gateway_order_id": "string",
- "payload": "string",
- "payment_id": "string",
- "processed_at": "2019-08-24T14:15:22Z",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "rrn": "string",
- "status": "init",
- "status_code": "authorization_failed",
- "status_description": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "fee": {
- "amount": 0,
- "currency": "string"
}, - "terminal_name": "string",
- "method": "string"
}
], - "confirmation_details": [
- {
- "amount": 0,
- "billing_order_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "currency": "string",
- "description": "string",
- "gateway_order_id": "string",
- "payload": "string",
- "payment_id": "string",
- "processed_at": "2019-08-24T14:15:22Z",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "rrn": "string",
- "status": "init",
- "status_code": "authorization_failed",
- "status_description": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "fee": {
- "amount": 0,
- "currency": "string"
}, - "terminal_name": "string",
- "method": "string"
}
], - "confirmed": true,
- "created_at": "2019-08-24T14:15:22Z",
- "currency": "string",
- "external_id": "string",
- "id": "string",
- "purchase_details": [
- {
- "amount": 0,
- "billing_order_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "currency": "string",
- "description": "string",
- "gateway_order_id": "string",
- "payload": "string",
- "payment_id": "string",
- "processed_at": "2019-08-24T14:15:22Z",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "rrn": "string",
- "status": "init",
- "status_code": "authorization_failed",
- "status_description": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "fee": {
- "amount": 0,
- "currency": "string"
}, - "terminal_name": "string",
- "method": "string"
}
], - "purchased": true,
- "receipt_url": "string",
- "refund_details": [
- {
- "amount": 0,
- "billing_order_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "currency": "string",
- "description": "string",
- "gateway_order_id": "string",
- "payload": "string",
- "payment_id": "string",
- "processed_at": "2019-08-24T14:15:22Z",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "rrn": "string",
- "status": "init",
- "status_code": "authorization_failed",
- "status_description": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "fee": {
- "amount": 0,
- "currency": "string"
}, - "terminal_name": "string",
- "method": "string"
}
], - "refunded": true,
- "customer": {
- "account_number": "string",
- "external_id": "string",
- "first_name": "string",
- "last_name": "string",
- "patronym": "string",
- "payment_method": {
- "cc_token": {
- "bank_short_name": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "mask": "string",
- "payment_system": "string",
- "token": "string"
}, - "type": "cc_token"
}, - "phone": "string"
}, - "partner_details": {
- "transaction_id": "string"
}
}
Prepares the data about the specified payment of transaction and sends it into callback_url
which was provided on the payment step.
If the operation
field is not provided the callback will be sent for the last operation.
external_id required | string |
operation | string (OperationType) Enum: "payment" "confirm" "refund" "cancel" |
{- "external_id": "string",
- "operation": "payment"
}
{- "code": "authorization_failed",
- "message": "string",
- "param": "string",
- "payment_id": "string",
- "type": "invalid_request_error",
- "error_id": "string"
}
{- "action": {
- "type": "url",
- "value": "string"
}, - "action_required": true,
- "details": {
- "amount": 0,
- "billing_order_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "currency": "string",
- "description": "string",
- "gateway_order_id": "string",
- "payload": "string",
- "payment_id": "string",
- "processed_at": "2019-08-24T14:15:22Z",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "rrn": "string",
- "status": "init",
- "status_code": "authorization_failed",
- "status_description": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "fee": {
- "amount": 0,
- "currency": "string"
}, - "terminal_name": "string",
- "method": "string"
}, - "external_id": "string",
- "id": "0",
- "is_success": true,
- "receipt_url": "string",
- "payment_method": {
- "cc_token": {
- "bank_short_name": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "mask": "string",
- "payment_system": "string",
- "token": "string"
}, - "type": "cc_token"
}, - "customer": {
- "browser_user_agent": "string",
- "external_id": "string",
- "first_name": "string",
- "ip_address": "string",
- "last_name": "string",
- "patronym": "string",
- "phone": "string"
}, - "operation": "create"
}
Starts card confirmation process that allows to use this card for future operations.
Result of the confirmation will be sent via callback.
When mode
is set to direct
- customer
field becomes required.
callback_url | string <url> |
result_url | string <url> |
object (CustomerRequestUserDetails) | |
description | string |
payload | string |
object | |
mode required | string (PaymentMode) Enum: "direct" "hosted" Describes the way of the integration:
|
{- "callback_url": "string",
- "result_url": "string",
- "customer": {
- "address": "string",
- "city": "string",
- "country": "string",
- "external_id": "string",
- "first_name": "string",
- "last_name": "string",
- "patronym": "string",
- "phone": "string",
- "postal_code": "string",
- "payment_method": {
- "apple_pay": {
- "browser_fingerprint": {
- "browser_accept_header": "string",
- "browser_color_depth": "string",
- "browser_ip_address": "string",
- "browser_java_enabled": "string",
- "browser_language": "string",
- "browser_screen_height": "string",
- "browser_time_zone": "string",
- "browser_time_zone_offset": "string",
- "browser_user_agent": "string"
}, - "token": "string",
- "use_3ds_flow": true
}, - "cc_token": {
- "browser_fingerprint": {
- "browser_accept_header": "string",
- "browser_color_depth": "string",
- "browser_ip_address": "string",
- "browser_java_enabled": "string",
- "browser_language": "string",
- "browser_screen_height": "string",
- "browser_time_zone": "string",
- "browser_time_zone_offset": "string",
- "browser_user_agent": "string"
}, - "token": "string",
- "use_3ds_flow": true
}, - "google_pay": {
- "browser_fingerprint": {
- "browser_accept_header": "string",
- "browser_color_depth": "string",
- "browser_ip_address": "string",
- "browser_java_enabled": "string",
- "browser_language": "string",
- "browser_screen_height": "string",
- "browser_time_zone": "string",
- "browser_time_zone_offset": "string",
- "browser_user_agent": "string"
}, - "token": "string",
- "use_3ds_flow": true
}, - "type": "cc_token",
- "wallet": {
- "browser_fingerprint": {
- "browser_accept_header": "string",
- "browser_color_depth": "string",
- "browser_ip_address": "string",
- "browser_java_enabled": "string",
- "browser_language": "string",
- "browser_screen_height": "string",
- "browser_time_zone": "string",
- "browser_time_zone_offset": "string",
- "browser_user_agent": "string"
}, - "option_id": "string",
- "use_3ds_flow": true
}
}, - "color_mode": "white",
- "locale": "UK",
- "account_number": "string",
- "ip_address": "192.168.0.1"
}, - "description": "string",
- "payload": "string",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "mode": "direct"
}
{- "action": {
- "type": "url",
- "value": "string"
}, - "action_required": true,
- "details": {
- "amount": 0,
- "billing_order_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "currency": "string",
- "description": "string",
- "gateway_order_id": "string",
- "payload": "string",
- "payment_id": "string",
- "processed_at": "2019-08-24T14:15:22Z",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "rrn": "string",
- "status": "init",
- "status_code": "authorization_failed",
- "status_description": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "fee": {
- "amount": 0,
- "currency": "string"
}, - "terminal_name": "string",
- "method": "string"
}, - "external_id": "string",
- "id": "0",
- "is_success": true,
- "receipt_url": "string",
- "payment_method": {
- "cc_token": {
- "bank_short_name": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "mask": "string",
- "payment_system": "string",
- "token": "string"
}, - "type": "cc_token"
}, - "customer": {
- "browser_user_agent": "string",
- "external_id": "string",
- "first_name": "string",
- "ip_address": "string",
- "last_name": "string",
- "patronym": "string",
- "phone": "string"
}, - "operation": "create"
}
{- "action": {
- "type": "url",
- "value": "string"
}, - "action_required": true,
- "details": {
- "amount": 0,
- "billing_order_id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "currency": "string",
- "description": "string",
- "gateway_order_id": "string",
- "payload": "string",
- "payment_id": "string",
- "processed_at": "2019-08-24T14:15:22Z",
- "properties": {
- "property1": "string",
- "property2": "string"
}, - "rrn": "string",
- "status": "init",
- "status_code": "authorization_failed",
- "status_description": "string",
- "transaction_id": "string",
- "auth_code": "string",
- "fee": {
- "amount": 0,
- "currency": "string"
}, - "terminal_name": "string",
- "method": "string"
}, - "external_id": "string",
- "id": "0",
- "is_success": true,
- "receipt_url": "string",
- "payment_method": {
- "cc_token": {
- "bank_short_name": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "mask": "string",
- "payment_system": "string",
- "token": "string"
}, - "type": "cc_token"
}, - "customer": {
- "browser_user_agent": "string",
- "external_id": "string",
- "first_name": "string",
- "ip_address": "string",
- "last_name": "string",
- "patronym": "string",
- "phone": "string"
}, - "operation": "create"
}
Deletes customer payment method from wallet. Either X-CUSTOMER-AUTH header or external_id param is required.
external_id | any customer id in your platform |
option_id required | string |
type required | string Enum: "cc_token" "wallet" "google_pay" "apple_pay" "card" |
{- "option_id": "string",
- "type": "card"
}
{- "delete": true,
- "option_id": "string",
- "type": "cc_token"
}
Returns customer details including payment methods, if saved. Either X-CUSTOMER-AUTH header or external_id param is required.
external_id | any customer id in your platform |
{- "address": "string",
- "city": "string",
- "country": "string",
- "external_id": "string",
- "first_name": "string",
- "last_name": "string",
- "patronym": "string",
- "phone": "string",
- "postal_code": "string",
- "rid": "06367b17-91f0-49c2-b4f0-ec544c175798",
- "wallet": [
- {
- "card": {
- "expires_at": "2019-08-24T14:15:22Z",
- "mask": "string"
}, - "option_id": "ab22e710-5ce4-4e7e-a3db-bd6fdad8fe36",
- "name": "string",
- "type": "cc_token"
}
]
}
Adds new payment method to wallet. Either X-CUSTOMER-AUTH header or external_id param is required.
external_id | any customer id in your platform |
callback_url | string <url> |
required | object Based on your choice in |
result_url | string <url> |
{- "callback_url": "string",
- "payment_method": {
- "cc_token": {
- "browser_fingerprint": {
- "browser_accept_header": "string",
- "browser_color_depth": "string",
- "browser_ip_address": "string",
- "browser_java_enabled": "string",
- "browser_language": "string",
- "browser_screen_height": "string",
- "browser_time_zone": "string",
- "browser_time_zone_offset": "string",
- "browser_user_agent": "string"
}, - "token": "string",
- "mask": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "use_3ds_flow": true
}, - "encrypted_cc_token": {
- "browser_fingerprint": {
- "browser_accept_header": "string",
- "browser_color_depth": "string",
- "browser_ip_address": "string",
- "browser_java_enabled": "string",
- "browser_language": "string",
- "browser_screen_height": "string",
- "browser_time_zone": "string",
- "browser_time_zone_offset": "string",
- "browser_user_agent": "string"
}, - "data": "string",
- "use_3ds_flow": true
}, - "type": "cc_token"
}, - "result_url": "string"
}
{- "action": {
- "type": "url",
- "value": "string"
}, - "action_required": true,
- "created_at": "2019-08-24T14:15:22Z",
- "payment_method": {
- "card": {
- "expires_at": "2019-08-24T14:15:22Z",
- "mask": "string"
}, - "option_id": "ab22e710-5ce4-4e7e-a3db-bd6fdad8fe36",
- "name": "string",
- "type": "cc_token"
}, - "status": "init",
- "operation": "add_payment_method"
}
{- "action": {
- "type": "url",
- "value": "string"
}, - "action_required": true,
- "created_at": "2019-08-24T14:15:22Z",
- "payment_method": {
- "card": {
- "expires_at": "2019-08-24T14:15:22Z",
- "mask": "string"
}, - "option_id": "ab22e710-5ce4-4e7e-a3db-bd6fdad8fe36",
- "name": "string",
- "type": "cc_token"
}, - "status": "init",
- "operation": "add_payment_method"
}
Receive a report for a desired period with paid-out payments. You can both receive payments only for current login or for all possible sources within single business.
date_from required | string <date> |
date_to required | string <date> |
fields | Array of strings By default, all available fields are returned. See response schema for available field names. |
scope | string Default: "current_login" Enum: "current_login" "all_keys" Regulate how many data you would like to receive. |
{- "date_from": "2019-08-24",
- "date_to": "2019-08-24",
- "fields": [
- "string"
], - "scope": "current_login"
}
{- "payments": [
- {
- "amount": 0,
- "card_pan": "string",
- "currency": "string",
- "description": "string",
- "external_id": "string",
- "internal_commission": 0,
- "payer_external_fee": 0,
- "payment_id": "string",
- "payment_method": "string",
- "payment_pay_parts": 0,
- "payment_system": "string",
- "payment_type": "string",
- "payout_amount": 0,
- "payout_date": "string",
- "processing_date": "string",
- "project_name": "string"
}
]
}