Documentation
Payment Systems API§
API Description§
Payment Systems API allows the merchants to retrieve the list of payment systems activated for a project in a specific country along with their names, logos and shortcodes. This can be further used for deeplinking specific payment methods on merchant's existing payment page via Paymentwall Uni widgets.
Configuration§
Make sure that "Evaluation Mode" is ON in your project's settings:
Here's an example of how Payment Systems API can be used for integrating deeplinked payment methods powered by Paymentwall into a merchant's existing payment page: Screenshot
API Endpoint§
https://api.paymentwall.com/api/payment-systems/
Request Method§
GET
Request Parameters§
parameter | required | description |
---|---|---|
country_code | yes | Country code in ISO 3166-1 alpha-2 format |
currency_converted | no | Currency code (in ISO 4217 format) to be used for converting the price point amounts from local currencies to the converted currency |
include_pricepoints | no | 1 or 0 to include pricepoints for Mobiamo |
key | yes | Project key |
sign_version | no | Signature version |
sign | yes* | Request signature. Refer to Signature Calculation. Can be made optional if "Widget Signature is Required" setting is off in My Projects > Settings |
Request Sample§
https://api.paymentwall.com/api/payment-systems/?key=[PROJECT_KEY]&country_code=RU&sign_version=2&sign=[SIGNATURE]
Response Sample§
[
{
"id":"cc",
"name":"Credit card",
"new_window":false,
"img_url":"https:\/\/api.paymentwall.com\/images\/ps_logos\/pm_cc.png"
},
{
"id":"mobiamo",
"name":"Mobiamo",
"new_window":false,
"img_url":"https:\/\/api.paymentwall.com\/images\/ps_logos\/pm_mobilegateway.png",
"pricepoints":[
{
"amount":140,
"currency":"RUB",
"currency_converted":"USD",
"amount_converted":2.95
},
{
"amount":205,
"currency":"RUB",
"currency_converted":"USD",
"amount_converted":4.32
},
{
"amount":307,
"currency":"RUB",
"currency_converted":"USD",
"amount_converted":6.47
}
]
},
{
"id":"webmoney",
"name":"Webmoney",
"new_window":true,
"img_url":"https:\/\/api.paymentwall.com\/images\/ps_logos\/pm_webmoney.png"
},
{
"id":"qiwiwallet",
"name":"Qiwi Wallet",
"new_window":false,
"img_url":"https:\/\/api.paymentwall.com\/images\/ps_logos\/pm_qiwiwallet.png"
}
]
Response Details§
parameter | description |
---|---|
id | Payment system shortcode |
name | Payment system name |
img_url | URL of the payment system logo |
new_window | For payment methods that require opening a new window or redirecting users to a new window, this flag will be true. Example: WebMoney requires users to be redirected to a new window. You can redirect users via $widget->getUrl() method. |
Code Sample§
require_once('/path/to/paymentwall-php/lib/paymentwall.php');
$params = array(
'key' => 'YOUR_PUBLIC_KEY',
'country_code' => 'RU',
'sign_version' => 2
);
Paymentwall_Config::getInstance()->set(array('private_key' => 'YOUR_PRIVATE_KEY'));
$params['sign'] = (new Paymentwall_Signature_Widget())->calculate(
$params,
$params['sign_version']
);
$url = 'https://api.paymentwall.com/api/payment-systems/?' . http_build_query($params);
$payment_systems = json_decode(file_get_contents($url));