Интегрируйте Romb в вашу платформу, используя наш гибкий и безопасный API. Автоматизируйте платежи, управляйте счетами и масштабируйтесь глобально — всё из вашего бэкенда.
Будь вы маркетплейс, финтех-приложение, SaaS или платформа электронной коммерции — API Romb даёт вам полный контроль: создавать, выставлять, выплачивать и отслеживать транзакции в реальном времени.
Create your account at https://romb.mx
Access your dashboard using your credentials
Navigate to https://romb.mx/shops/index
Click "New shop" to create a merchant account
Complete all required fields for your merchant account
Copy your API token from the shop settings section
All API requests must include authentication headers:
| Header | Описание | Required |
|---|---|---|
X-Uid |
Your merchant unique identifier | Да |
X-Public-Key |
Your public API key | Да |
X-Private-Key |
Your private API key | Да |
Content-Type |
Must be application/json | Да |
Accept |
Must be application/json | Да |
X-Uid: ***************************
X-Public-Key: ************************************
X-Private-Key: ************************************
Content-Type: application/json
Accept: application/json
https://romb.mx/api/pay/order/create
| Parameter | Описание | Тип |
|---|---|---|
orderNumber |
Unique payment ID in your system (Required) | String |
amount |
Payment amount (Required) | Number |
description |
Описание платежа | String |
currency |
Currency code (643 for RUB) | Number |
email |
Customer email | String |
phone |
Customer phone | String |
curl --location 'https://romb.mx/api/pay/order/create' \
--header 'X-Uid: ***************************' \
--header 'X-Public-Key: ************************************' \
--header 'X-Private-Key: ************************************' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
"orderNumber": "E-0061",
"amount": 289.68,
"description": "Test Pay",
"currency": 643,
"email": "test@example.com",
"phone": "+71111111111"
}'
{
"status": "success",
"data": {
"orderId": "123456789",
"formUrl": "https://romb.mx/pay/order/0198212c4-140423-72bf-97da-8b73a3e8401b"
}
}
{
"status": "error",
"error": {
"code": "validation_error",
"message": "Invalid email format"
}
}
https://romb.mx/pay/order/cancel/{orderNumber}
Use this endpoint to cancel a pending payment. The system will send a webhook notification about the cancellation.
| Parameter | Описание | Тип |
|---|---|---|
orderNumber |
Unique payment ID in your system (URL parameter) | String |
After successful cancellation, a webhook will be sent with event type: payment_canceled
curl --location 'https://romb.mx/pay/order/cancel/E-0061' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json'
{
"status": "success",
"message": "Payment cancelled successfully"
}
{
"status": "error",
"message": "Order not found or already processed"
}
After successful payment, we will send a POST request to your callback URL with the following JSON data:
| Parameter | Описание |
|---|---|
id |
Transaction ID in our system |
order_id |
Your order number |
amount |
Payment amount |
data |
Additional payment data |
createdDateTime |
Payment creation time in ISO 8601 format |
status |
Payment status (PAID, WAIT, PENDING, CANCELED) |
sign |
HMAC-SHA256 signature for data verification |
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"order_id": "ORDER-12345",
"amount": 100.50,
"data": {
"customer_email": "customer@example.com",
"product_id": "PROD-001"
},
"createdDateTime": "2024-01-15T10:30:45+00:00",
"status": "PAID",
"sign": "a7d8f9g0h1i2j3k4l5m6n7o8p9q0r1s2t3u4v5w6x7y8z9"
}
To verify the signature, follow these steps:
sign parameter from received dataalphabetically by key key1=value1&key2=value2HMAC-SHA256 using your secret tokenfunction verifySignature($receivedData, $secretToken) {
$receivedSignature = $receivedData['sign'];
unset($receivedData['sign']);
ksort($receivedData);
$signatureString = '';
foreach ($receivedData as $key => $value) {
if (is_array($value)) {
$value = json_encode($value, JSON_UNESCAPED_UNICODE);
}
$signatureString .= $key . '=' . $value . '&';
}
$signatureString = rtrim($signatureString, '&');
$calculatedSignature = hash_hmac('sha256', $signatureString, $secretToken);
return hash_equals($calculatedSignature, $receivedSignature);
}
// Usage
$isValid = verifySignature($_POST, 'your_secret_token');
Check out our open-source integrations and code samples to get started quickly with Romb API.
Our technical team is ready to help you implement Romb API into your business workflow.
Email us at api@romb.mx for personalized assistance.