Partner Balance Payment Methods
How to use PARTNER_BALANCE payment method
Since PARTNER_BALANCE payment method usage involves partner accounts balance and partner-aware calculations, all endpoints on this integration are prefixed with /private and require authentication.
0. Authentication
First of all, you should do API key generation via the Forimex Backoffice: it will bring the private key to you, and will register the key pair in the system.
To pass the authentication you should provide headers such as:
date– request date-time in format described in RFC9110x-sig-alg– signature algorithm, for now, onlyED25519is acceptable;x-sig-key-id– keyid collected from the Backoffice while API key generation;x-sig-hash– resulting base64-encoded signature.
Prepare message bytes
- Prepare the request, that is going to be send: set the endpoint, headers (w/o
x-sig-hash), body; - Take the request method verb in upper case, e.g. POST (
verb); - Take the Keccak256 hash of the body bytes and encode it to string using base64 standard (
content_hash); - Prepare the
Datein appropriate format (RFC9110) (date); - Take the request path with query params in lower case (
path_with_query); - Join all
x-sig-*headers with\nas separator (headers); - Join all prepared above strings with
\nas separator:{verb}\n{content_hash}\n{date}\n{path_with_query}\n{headers}and decode resulting string to bytes (suppose utf8 encoding) (bytes); - Sign the resulting
bytesbyprivate keygenerated in Backoffice usingED25519algorithm, encode resulting bytes to base64-encoded string (standard) (sig-hash). - Attach resuling
sig-hashto the request on header (x-sig-hash)
Test vector
Data:
method: GET
path: /v1/private/accounts
date: Sat, 27 Dec 2025 23:43:25 GMT
key_id: 2c717ce1-841d-4f70-8a05-e35f9c73896b
body: emptyMessage bytes (base64-encoded):
R0VUCnhkSkdBWWIzSXp5U2ZuMnkzTWNEd09VQXRsUEtnaWM3ZS9yWUJGMkZwSEE9ClNhdCwgMjcgRGVjIDIwMjUgMjM6NDM6MjUgR01UCi92MS9wcml2YXRlL2FjY291bnRzCkVEMjU1MTkKMmM3MTdjZTEtODQxZC00ZjcwLThhMDUtZTM1ZjljNzM4OTZiPrivate key (hex-encoded):
957d29f8830b091d12c262888facea269946ffae762b47369006d04b42a17a80Resulting signature (base64-encoded):
vOKYI0N97JA+HE0NCOcID5ShZMfM901cX6UidaealfpaizANXnqH4b7sNPQ4SJxKAmDbDz3hiRuZuSIN6qOfAQ==To create money-transfer service order, it requires to pass additional external_kyc field beside the service, payment and tags with customer KYC data such as his last and first name, date of birth, document data (passport) etc.
Example:
Create money-transfer via SBP
Country = RUS
Receiving method = phone_number
- Do payment amount calculation
Endpoint POST /v1/private/transfers/countries/RUS/methods/phone_number/calculation API Reference
Request headers:
| name | value |
|---|---|
date | Sat, 27 Dec 2025 23:43:25 GMT |
x-partner-slug | your-partner-slug |
x-sig-alg | ED25519 |
x-sig-key-id | 2c717ce1-841d-4f70-8a05-e35f9c73896b |
x-sig-hash | <signature-hash> |
Request body:
{
"receive_amount": "100",
"receive_currency": "RUB",
"payment_currency": "RUB",
"payment_method": "PARTNER_BALANCE"
}Response:
{
"payment_amount": "101.3",
"service_fee": "1.3"
}- Create the order
Endpoint: POST /v1/private/orders API Reference
Request headers:
| name | value |
|---|---|
date | Sat, 27 Dec 2025 23:43:25 GMT |
x-partner-slug | your-partner-slug |
x-sig-alg | ED25519 |
x-sig-key-id | 2c717ce1-841d-4f70-8a05-e35f9c73896b |
x-sig-hash | <signature-hash> |
Request:
{
"service": {
"slug": "phone_number",
"region": "ISO-3166-1:A2:RU",
"funding_method": "MONEY_TRANSFER",
"funding_details": {
"receive_amount": "100",
"receive_currency": "RUB"
},
"extras": {
"recipient_phone_number": "79998887766",
"recipient_bank": "alfa_bank",
"sender_phone_number": "79998887766"
}
},
"payment": {
"amount": "101.3",
"currency": "RUB",
"method": "PARTNER_BALANCE"
},
"external_kyc": {
"first_name": "Тест",
"last_name": "Тестовый",
"gender": "M",
"passport_series": "1234",
"passport_number": "567890",
"passport_issue_date": "2018-01-02",
"issuer_department_code": "770-077",
"birth_place": "г. Москва",
"birth_date": "1991-01-03"
}
}