Test cards
For testing purposes you can use the following test cards.
Simple integration
- A customer selects a product in the online store, and then clicks Buy.
- The online store server receives a purchase request.
- The online store server contacts the payment gateway server.
- The payment gateway server creates an order, generates a payment link, and send it to the online store server.
- The online store redirects the customer to the received URL.
- The payment gateway opens the payment URL.
- The customer enters his or her card number, expiration date, and CVV/CVC, and clicks Pay.
- The payment gateway processes the payment request and displays confirmation of the successful payment to the customer.
- The customer returns to the online store page or closes the page.
Notes for simple integration
An example of how to register an order.
curl --request POST \
--url https://ecommerce.radarpayments.com/payment/rest/register.do \
--header 'content-type: application/x-www-form-urlencoded' \
--data amount=2000 \
--data currency=978 \
--data userName=test_user \
--data password=test_user_password \
--data returnUrl=finish.html \
--data description=my_first_order \
--data language=en
{
"orderId": "0179018d-8f96-7fbe-bc2b-4b7e00a7d8c0",
"formUrl": "https://ecommerce.radarpayments.com/payment/merchants/rbs/payment_en.html?mdOrder=0179018d-8f96-7fbe-bc2b-4b7e00a7d8c0"
}
The merchant operator periodically (manually) checks the order status via the merchant portal to identify the payment result.
Integration with callback
- A customer selects a product in the online store, and then clicks Buy.
- The online store server receives a purchase request.
- The online store server contacts the payment gateway server.
- The payment gateway server creates an order, generates a payment link, and send it to the online store server.
- The online store redirects the customer to the received URL.
- The payment gateway opens the payment URL.
- The customer enters his or her card number, expiration date, and CVV/CVC, and clicks Pay.
- The payment gateway processes the payment request and displays confirmation of the successful payment to the customer.
- The customer returns to the online store page or closes the page.
- The payment gateway sends an asynchronous callback notification to the online store server.
- The online store server checks the order status if the callback is not signed.
Notes for integration with callback
Instead of the last step of the Simple Integration a merchant may choose to do one of the following:
* Make use of returnUrl
:
When the merchant web-site code located at returnUrl
(for example, https://www.merchantlogin.com/?back&orderId=61c33664-85a0-7d6b-af26-09ee009c4000&lang=en
) identifies a cardholder being redirected back from the gateway after a payment attempt, the merchant can check the order status using the API request getOrderStatusExtended
.
This option is the easiest one but it is not completely reliable because the cardholder redirect may fail (for example, as a result of a broken connection or the cardholder closing the browser) and the merchant returnUrl
may not get the "trigger" to proceed with getOrderStatusExtended
.
curl --request POST \
--url https://ecommerce.radarpayments.com/payment/rest/getOrderStatusExtended.do \
--header 'content-type: application/x-www-form-urlencoded' \
--data userName=test_user \
--data password=test_user_password \
--data orderId=016b6f47-4628-7ea2-80f5-6c6e00a7d8c0 \
--data language=en
{
"errorCode": "0",
"errorMessage": "Success",
"orderNumber": "11008",
"orderStatus": 2,
"actionCode": 0,
"actionCodeDescription": "",
"amount": 2000,
"currency": "978",
"date": 1618577250840,
"orderDescription": "my_first_order",
"merchantOrderParams": [
{
"name": "browser_language_param",
"value": "en"
},
{
"name": "browser_os_param",
"value": "UNKNOWN"
},
{
"name": "user_agent",
"value": "curl/7.75.0"
},
{
"name": "browser_name_param",
"value": "DOWNLOAD"
}
],
"transactionAttributes": [],
"attributes": [
{
"name": "mdOrder",
"value": "016b7747-c4ed-70b3-bc36-fdd400a7d8c0"
}
],
"cardAuthInfo": {
"maskedPan": "555555**5599",
"expiration": "202412",
"cardholderName": "TEST CARDHOLDER",
"approvalCode": "123456",
"pan": "555555**5599"
},
"authDateTime": 1618577288377,
"terminalId": "123456",
"authRefNum": "931793605827",
"paymentAmountInfo": {
"paymentState": "DEPOSITED",
"approvedAmount": 2000,
"depositedAmount": 2000,
"refundedAmount": 0
},
"bankInfo": {
"bankCountryCode": "UNKNOWN",
"bankCountryName": "<Unknown>"
}
}
- Make use of a non-signed gateway callback:
The merchant profile may be preconfigured (this necessitates placing a request with gateway support team) with acallbackUrl
that the gateway will use to send a notification request TO a merchant immediately after the payment. Every callback has a guaranteed delivery.
Because the callback is not securely signed with the gateway certificate, the merchant is strongly advised to double-check the order status via the merchant portal to avoid any callback abuse.
https://myshop.com/callback/?mdOrder=1234567890-098776-234-522&orderNumber=0987&operation=deposited&status=1
- Make use of a signed gateway callback:
If a merchant is familiar with digital certificates and signatures, the gateway can send a digitally signed callback with a checksum for verification and security purposes. After the callback signature has been verified by the merchant, there is no need to sendgetOrderStatusExtended
because the callback includes the order status.
https://myshop.ru/callback/?mdOrder=1234567890-098776-234-522&orderNumber=0987&checksum=DBBE9E54D42072D8CAF32C7F660DEB82086A25C14FD813888E231A99E1220AB3&operation=deposited&status=1
Advanced integration
- An online store has its own payment page to collect card data natively through its web site. The online store delivers some goods periodically each month.
- The first step is to reserve funds on the card and "capture" the amount when the goods are actually shipped some days later.
- If goods arrive damaged, the online store initiates a partial refund.
- Since deliveries are periodic, the online store may provide subscriptions for cardholders and enable their cards to be debited automatically (cardholder-not-present).
Initiate a funds reservation and subscription for a clientId (recurring payment)
- A customer selects a product in the online store, and then clicks Buy.
- The online store server receives a purchase request and opens a payment page.
- The customer enters their card details on the online store payment page.
- The online store server collects the card data.
- The online store server registers an order with
clientId
and sends card data to a payment gateway.
- The payment gateway communicates with the Directory Server to reach the ACS. It returns all the data necessary for the ACS redirect to the online store.
- The online store server redirects the customer to the payment gateway.
- The payment gateway redirects the customer to the ACS.
- The cardholder confirms the order and the ACS redirects him or her to the payment gateway.
- The customer returns to the online store page or closes the page.
- The payment gateway sends an asynchronous callback notification to the online store server.
- The online store server checks the order status to get
bindingId
for further recurring payments.
Register a recurring order
curl --request POST \
--url https://ecommerce.radarpayments.com/payment/rest/registerPreAuth.do \
--header 'content-type: application/x-www-form-urlencoded' \
--data amount=2000 \
--data currency=978 \
--data userName=test_user \
--data password=test_user_password \
--data returnUrl=finish.html \
--data description=my_second_order \
--data clientId=659753456 \
--data 'jsonParams={"recurringFrequency": "5", "recurringExpiry": "20240101"}' \
--data language=en
{
"orderId": "017908cc-57c6-739a-ad25-df0d00a7d8c0",
"formUrl": "https://ecommerce.radarpayments.com/payment/merchants/rbs/payment_en.html?mdOrder=017908cc-57c6-739a-ad25-df0d00a7d8c0"
}
Request paymentOrder method
curl --request POST \
--url https://ecommerce.radarpayments.com/payment/rest/paymentorder.do \
--header 'content-type: application/x-www-form-urlencoded' \
--data userName=test_user \
--data password=test_user_password \
--data MDORDER=019dbf02-e9f4-7fe2-b1c2-d50500a7d8c0 \
--data '$PAN=4012001038166662' \
--data '$CVC=123' \
--data YYYY=2024 \
--data MM=12 \
--data 'TEXT=TEST CARDHOLDER' \
--data 'ip=185.230.240.201' \
--data language=en
{
"info": "Your order is proceeded, redirecting...",
"errorCode": 0,
"acsUrl": "https://web.rbsuat.com/acs/auth/start.do",
"paReq": "eJxVUtFu4jAQ/BWU92DHcSCpFle946ryAEd7FKl9OZl4gbSNA05ypP36s0NSWsmSd8br3fGO4brJ3wb/0JRZoSdeMKTeAHVaqEzvJt7j6taPvWsBq71BnP7BtDYoYI5lKXc4yNTEG48kj5KN8jfxOPH5NqZ+kiTURxYlSEMaxtvUE7C8ecCjgK6RsH2GDEgPbUWT7qWuBMj0+GO2EJyNR5QC6SDkaGZTEfGQhRzIGYGWOYpSarUpmr95VwJIS0Na1Loy72LEQyA9gNq8iX1VHa4IqbCshmmRA3EkkIuGZe2i0hZpMiUWH/en39NZs3j5xearHZ+vnk6LD7tPnyZAXAYoWaFglAWUB8mAjq/simIgLQ8yd93tefugM4CD63Hz9eQrA3bQxvrQy+8RYHMoNLo7QD5jeHDGCNgaPNZtXgTkAgC1OmdYiZwGNLB3ewpIv19e/fPO+ZBWdsYvxamWr6rcnNaqWMuQrbF+zqLlXbQ7OHfaJKcqs9NlPDjLcgCIK0M640n3Z2z07S/9Bypv08k=",
"termUrl": "https://ecommerce.radarpayments.com/payment/rest/finish3ds.do?lang=en"
}
Redirect to the ACS
The online store must POST paReq
, MD
(same value as MDORDER
above), and termUrl
to acsUrl
.
Alternatively, the online store can use the gateway acsRedirect
method, which will perform the same cardholder redirect to the issuer ACS.
https://ecommerce.radarpayments.com/payment/acsRedirect.do?orderId=017908cc-57c6-739a-ad25-df0d00a7d8c0
Get status for bindingId
curl --request POST \
--url https://ecommerce.radarpayments.com/payment/rest/getOrderStatusExtended.do \
--header 'content-type: application/x-www-form-urlencoded' \
--data userName=test_user \
--data password=test_user_password \
--data orderId=017908cc-57c6-739a-ad25-df0d00a7d8c0 \
--data language=en
{
"errorCode": "0",
"errorMessage": "Success",
"orderNumber": "11044",
"orderStatus": 1,
"actionCode": 0,
"actionCodeDescription": "",
"amount": 2000,
"currency": "978",
"date": 1618815949170,
"orderDescription": "my_second_order",
"ip": "185.230.240.201",
"merchantOrderParams": [
{
"name": "browser_language_param",
"value": "en"
},
{
"name": "recurringExpiry",
"value": "20240101"
},
{
"name": "recurringFrequency",
"value": "5"
},
{
"name": "browser_os_param",
"value": "UNKNOWN"
},
{
"name": "user_agent",
"value": "curl/7.75.0"
},
{
"name": "browser_name_param",
"value": "DOWNLOAD"
}
],
"transactionAttributes": [],
"attributes": [
{
"name": "mdOrder",
"value": "017908cc-57c6-739a-ad25-df0d00a7d8c0"
}
],
"cardAuthInfo": {
"maskedPan": "401200**6662",
"expiration": "202412",
"cardholderName": "TEST CARDHOLDER",
"approvalCode": "123456",
"pan": "401200**6662"
},
"bindingInfo": {
"clientId": "659753456",
"bindingId": "0162d467-bbfe-77f3-9c21-415c00a7d8c0"
},
"authDateTime": 1618816213981,
"terminalId": "123456",
"authRefNum": "012851192298",
"paymentAmountInfo": {
"paymentState": "APPROVED",
"approvedAmount": 2000,
"depositedAmount": 0,
"refundedAmount": 0
},
"bankInfo": {
"bankCountryCode": "UNKNOWN",
"bankCountryName": "<Unknown>"
}
}
Initiate funds capture when goods are actually shipped
- An online store employee selects an order in an online store dashboard.
- The online store dashboard sends a capture request to its server.
- The online store server calls
deposit.do
.
curl --request POST \
--url https://ecommerce.radarpayments.com/payment/rest/deposit.do \
--header 'content-type: application/x-www-form-urlencoded' \
--data userName=test_user \
--data password=test_user_password \
--data amount=2000 \
--data orderId=017908cc-57c6-739a-ad25-df0d00a7d8c0 \
--data language=en
{
"errorCode": "0",
"errorMessage": "Success"
}
Merchant initiates a partial refund a few days later for goods that arrived damaged
- An online store employee selects an order in an online store dashboard.
- The online store dashboard sends a refund request to its server.
- The online store server calls
refund.do
.
curl --request POST \
--url https://ecommerce.radarpayments.com/payment/rest/refund.do \
--header 'content-type: application/x-www-form-urlencoded' \
--data userName=test_user \
--data password=test_user_password \
--data orderId=017908cc-57c6-739a-ad25-df0d00a7d8c0 \
--data amount=2000 \
--data language=en
{
"errorCode": "0",
"errorMessage": "Success"
}
Merchant initiates a monthly recurring payment
- The online store server registers an order and conducts a payment with
bindingId
.
- The online store can check the payment status or wait for a signed callback.
Register subsequent recurring payment
curl --request POST \
--url https://ecommerce.radarpayments.com/payment/rest/register.do \
--header 'content-type: application/x-www-form-urlencoded' \
--data amount=2000 \
--data currency=978 \
--data userName=test_user \
--data password=test_user_password \
--data returnUrl=finish.html \
--data clientId=259753456 \
--data description=my_first_order \
--data language=en \
--data features=AUTO_PAYMENT
{
"orderId": "01791274-d9ca-7103-b148-7dc000a7d8c0",
"formUrl": "https://ecommerce.radarpayments.com/payment/merchants/rbs/payment_en.html?mdOrder=01791274-d9ca-7103-b148-7dc000a7d8c0"
}
Ignore formUrl
in register response. You don't need it for recurrent payment.
Next call paymentOrderBinding.do
from your server to make a recurrent payment.
Recurring payment with bindingId
curl --request POST \
--url https://ecommerce.radarpayments.com/payment/rest/paymentOrderBinding.do \
--header 'content-type: application/x-www-form-urlencoded' \
--data userName=test_user \
--data password=test_user_password \
--data mdOrder=01791274-d9ca-7103-b148-7dc000a7d8c0 \
--data bindingId=01491394-63a6-7d45-a88f-7bce00a7d8c0 \
--data ip=1d0d:db8:6:1::77 \
--data language=en
{
"redirect": "https://ecommerce.radarpayments.com/payment/merchants/rbs/finish.html?orderId=01791274-d9ca-7103-b148-7dc000a7d8c0&lang=en",
"info": "Your order is proceeded, redirecting...",
"errorCode": 0
}
Check subsequent recurring order status
curl --request POST \
--url https://ecommerce.radarpayments.com/payment/rest/getOrderStatusExtended.do \
--header 'content-type: application/x-www-form-urlencoded' \
--data userName=test_user \
--data password=test_user_password \
--data orderId=01791274-d9ca-7103-b148-7dc000a7d8c0 \
--data language=en
{
"errorCode": "0",
"errorMessage": "Success",
"orderNumber": "11045",
"orderStatus": 2,
"actionCode": 0,
"actionCodeDescription": "",
"amount": 2000,
"currency": "978",
"date": 1618816612879,
"orderDescription": "my_first_order",
"ip": "1d0d:db8:6:1::77",
"merchantOrderParams": [
{
"name": "browser_language_param",
"value": "en"
},
{
"name": "browser_os_param",
"value": "UNKNOWN"
},
{
"name": "user_agent",
"value": "curl/7.75.0"
},
{
"name": "browser_name_param",
"value": "DOWNLOAD"
}
],
"transactionAttributes": [],
"attributes": [
{
"name": "mdOrder",
"value": "01791274-d9ca-7103-b148-7dc000a7d8c0"
}
],
"cardAuthInfo": {
"maskedPan": "555555**5599",
"expiration": "202412",
"cardholderName": "TEST CARDHOLDER",
"approvalCode": "123456",
"pan": "555555**5599"
},
"bindingInfo": {
"clientId": "259753456",
"bindingId": "01491394-63a6-7d45-a88f-7bce00a7d8c0"
},
"authDateTime": 1618816705914,
"terminalId": "123456",
"authRefNum": "947633173729",
"paymentAmountInfo": {
"paymentState": "DEPOSITED",
"approvedAmount": 2000,
"depositedAmount": 2000,
"refundedAmount": 0
},
"bankInfo": {
"bankCountryCode": "UNKNOWN",
"bankCountryName": "<Unknown>"
}
}