Download OpenAPI specification:Download
The Payments API helps you to process payments of your customers using a variety of payment methods and a single API Endpoint. You can easily and securely process payments from your customers using either the:
Hosted Payment API: This hosted checkout solution offers a variety of payment options for your convenience through a single integration.
Direct Integration API: This hosted checkout allows users to be redirected directly to the payment provider for processing bypassing the cashier.
Server-to-Server API: This option enables you to use your own payment form to collect card information, which is then securely transmitted to us. Note: You must be PCI certified to use this integration.
You can also access your transaction analytics and manage accounts within the merchant portal.
Obtaining Your API and Secret Keys
The APIs require a dedicated Merchant API Key for all requests. You can generate this key within the merchant portal.
API keys can be created by navigating to Settings > Credentials.
We use HTTP statuses for our response as per the HTTP specification
| Status range | Description |
|---|---|
| 2xx | indicates a successful request |
| 4xx | indicates there is a problem with the client's request |
| 5xx | indicates there is a problem with our servers/infrastructure. In this case it is our responsibility to fix the issue |
If you receive a 4xx HTTP status response, it is safe to retry the request after fixing the root cause of the problem (either your request parameters or your account configuration).
If you receive a 5xx HTTP status response, please contact our support with the request information so we can investigate.
Test accounts enable you to test and process API transactions in an environment that replicates the production system.
Payment transactions in the test environment can be executed using the simulator. To create test payments, use the same URL as in production but ensure you utilize a DEV API Key. This key can be created under Settings > Credentials.
Below is an example of the payload you will receive in these webhooks:
{
"transaction_id": "bbds7128hdha",
"user_id": "123",
"tracking_id": "kshdhay6381623",
"status": "successful",
"currency": "EUR",
"amount": "200.00",
"transaction_type": "withdrawal"
}
Webhook Payload Explanation
Webhook Signature
To ensure the integrity and authenticity of the data in these webhooks, it is essential to verify the included signature. This guide explains how to verify the webhook signature generated by our system.
When you receive a webhook, it will include an x-signature header in the HTTP request. To generate the signature, you must use the SHA-1 hashing algorithm. Update the hash with the payload, and then convert it to an uppercase hexadecimal representation.
const crypto = require("crypto");
const data = /* Data object from the webhook payload */;
const signaturePassword = /* Your secret signature password that can be find in BACK OFFICE under Credentials page */;
const payloadForHash = JSON.stringify(data) + signaturePassword;
const localSignature = crypto
.createHash("sha1")
.update(payloadForHash)
.digest("hex")
.toUpperCase();
Example:
payload =
{
"transaction_id":"r21nmrtpcmrcava",
"user_id":"1111222",
"tracking_id":"b8f04416-116a-11ed-861d-0242ac120002",
"status":"rejected",
"currency":"GBP",
"amount":"200.00",
"transaction_type":"withdrawal"
}
signature_password = spg_test_companyxxxxQyGAheyMqcHVmp8ZMQtkYcev27sCu7RF
Calculated Hash: "5FDDA8F46411C132DCFBEE53C39BA06298CB48BC"
This endpoint facilitates an all in one cashier, this will provide a one time integration solution that will show all the available providers.
| x-api-key | string Example: api_key |
object |
{- "request": {
- "mode": "test",
- "theme": "dark",
- "settings": {
}, - "user_id": "128",
- "tracking_id": "fb832194-34e1-4e6c-8494-d88034cf3e47",
- "ip": "127.34.125.54",
- "amount": 10.05,
- "currency": "EUR",
- "amount_restricted": true,
- "customer": {
- "max_deposit_limit": 1000,
- "first_name": "John",
- "last_name": "Doe",
- "kyc_status": "passed",
- "email": "user@example.com",
- "zip_code": "12345",
- "address": "123 Main Street",
- "city": "New York",
- "dob": "05/03/2000",
- "country_code": "GB",
- "phone": {
- "country": "GB",
- "number": 783433252,
- "prefix": 44
}
}
}
}{- "token": "Mtg4OakI0YSGdHPY1y4vUnGLOaMxnJJZ9BX09LQ1u3yft0OY81"
}This endpoint facilitates Direct Integration payments, This hosted checkout allows users to be redirected directly to the payment provider for processing. You will need to specify the provider ID which you can find under settings - providers.
| x-api-key | string Example: api_key |
object |
{- "request": {
- "mode": "test",
- "provider_id": 210,
- "settings": {
}, - "user_id": "128",
- "tracking_id": "fb832194-34e1-4e6c-8494-d88034cf3e47",
- "ip": "127.34.125.54",
- "amount": 10.05,
- "currency": "EUR",
- "customer": {
- "max_deposit_limit": 1000,
- "first_name": "John",
- "last_name": "Doe",
- "kyc_status": "passed",
- "email": "user@example.com",
- "zip_code": "12345",
- "address": "123 Main Street",
- "city": "New York",
- "dob": "05/03/2000",
- "country_code": "GB",
- "phone": {
- "country": "GB",
- "number": 783433252,
- "prefix": 44
}
}
}
}This endpoint facilitates Server-to-Server (S2S) payments, providing a straightforward integration process. Below, you will find details on its implementation. Upon successful invocation, the response will include two key attributes: url and transaction_status. Check the url on the response; if it is not empty, redirect the user to complete the 3DS process. Additionally, if the transaction_status is rejected, an error attribute will accompany the response.
| x-api-key | string Example: api_key |
object |
{- "request": {
- "mode": "test",
- "routing_id": 210,
- "settings": {
}, - "user_id": "U123",
- "tracking_id": "fb832194-34e1-4e6c-8494-d88034cf3e47",
- "ip": "127.34.125.54",
- "amount": 10.05,
- "currency": "EUR",
- "customer": {
- "max_deposit_limit": 1000,
- "first_name": "John",
- "last_name": "Doe",
- "kyc_status": "passed",
- "email": "user@example.com",
- "zip_code": "12345",
- "address": "123 Main Street",
- "city": "New York",
- "dob": "05/03/2000",
- "country_code": "GB",
- "phone": {
- "country": "GB",
- "number": 783433252,
- "prefix": 44
}
}, - "card_details": {
- "holder_name": "John Doe",
- "card_number": "4111111111111111",
- "cvc": "444",
- "exp_month": "05",
- "exp_year": "2025"
}
}
}{- "url": "{{url}}",
- "transaction_status": "pending"
}This endpoint facilitates an all in one cashier for withdrawals. This will provide a one time integration solution that will show all the available payout providers. You can configure the payout providers in Settings - Provider Rules
| x-api-key required | string Example: xxxx |
object |
{- "request": {
- "mode": "test",
- "theme": "dark",
- "settings": {
}, - "user_id": "128",
- "tracking_id": "fb832194-34e1-4e6c-8494-d88034cf3e47",
- "ip": "127.34.125.54",
- "amount": 10.05,
- "currency": "EUR",
- "customer": {
- "first_name": "John",
- "last_name": "Doe",
- "kyc_status": "passed",
- "email": "user@example.com",
- "zip_code": "12345",
- "address": "123 Main Street",
- "city": "New York",
- "dob": "05/03/2000",
- "country_code": "GB",
- "phone": {
- "country": "GB",
- "number": 783433252,
- "prefix": 44
}
}
}
}{- "token": "Mtg4OakI0YSGdHPY1y4vUnGLOaMxnJJZ9BX09LQ1u3yft0OY81"
}If there are any pending payouts, this endpoint can be used to reject them from the client side.
| x-api-key required | string Example: xxxx API key for authentication |
| transaction_id required | string Our unique transaction id that you received in webhook |
{- "transaction_id": "fb832194-34e1-4e6c-8494-d88034cf3e47"
}{ }If there are any pending payouts, this endpoint can be used to approve them from the client side.
| x-api-key required | string Example: xxxx API key for authentication |
| transaction_id required | string Unique transaction id in your system. |
{- "transaction_id": "fb832194-34e1-4e6c-8494-d88034cf3e47"
}{- "message": "Transaction Withdrawal has been approved successfully",
- "transaction_status": "pending"
}This endpoint can be used to get the latest infromation regarding a specific transaction.
| id required | string Unique transaction id in your system |
| x-api-key required | string Example: xxxx API key for authentication |
{- "transaction_status": "rejected",
- "rejected_reason": "Insufficient funds"
}This endpoint retrieves transactions. You can specify a date range using from and to query parameters. If no date range is specified, it will return transactions for the current date. Maximum range between dates it’s 7 days
| from | string <date-time> Example: from=01-08-2024 (optional) The start date for the date range in DD-MM-YYYY format. |
| to | string <date-time> Example: to=02-08-2024 (optional) The end date for the date range in DD-MM-YYYY format. |
| x-api-key required | string Example: xxxx API key for authentication |
[- {
- "transaction_id": "g7xp8kudinz3tyi",
- "gateway_transaction_id": "sh7gv8knfxpktgh",
- "provider_transaction_id": "9474883d-6c07-4205-8d89-d7ee0a6f3d7a",
- "transaction_type": "deposit",
- "transaction_date": "2024-07-05 11:53:25",
- "status": "rejected",
- "payment_provider": "numipay_simulator",
- "customer_id": 123,
- "amount": 8.56,
- "currency": "GBP",
- "user_amount": 10,
- "user_currency": "EUR",
- "fx_amount": 0
}
]