Skip to main content

Expose merchant information for 2CO shopping cart

Expose merchant information for 2CO shopping cart

Last updated: 25-Sep-2019
Rate this article:


Disclaimer: the following method is intended for internal purposes only.

Use the getMerchantInformation method for retrieving vendor information required by the 2CO shopping cart into a single call.

This API method is protected through a special authentication header that the 2CO cart should sent. Click here to learn more about the X - header authentication.


Authenticate using the special authentication header.


Info Description
Company name Merchant company name.
Commercial name Merchant commercial name.
Demo flag Y if the vendor status is Pending, else P if the vendor has the "test orders" package active, otherwise N.
Forced currency code 3-letter code.
Shopping cart customization Shows possible cart customizations.
Payment methods Merchant available payment options.
Override line item limit -
Order auth time Minutes into days (how long it takes for the order to become complete).
3DS status true if vendor has Use3DSecure = NO, false otherwise.
Currencies Merchant available currencies.
Countries Merchant available ordering countries.
Languages Merchant available ordering languages.

Promotions defined on merchant account.

Secret key Merchant account secret key.
Shipping methods Shipping methods defined on merchant account.



function callRPC($Request, $hostUrl, $Debug = false) {
    $curl = curl_init($hostUrl);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($curl, CURLOPT_SSLVERSION, 0);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_HTTPPROXYTUNNEL, false);
    curl_setopt($curl, CURLOPT_PROXY, '');
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Accept: application/json',
        'X-Avangate-Authentication: type="private" ver="2" app="2co-shopping-cart" merchant="RDGM" date="2018-01-31T13:57:44+00:00" hash="0m3ULy6dZ2xUI8CFtU0ersCootdf6wz8Z1qxN28FdXI="'

    curl_setopt($curl, CURLOPT_COOKIE, '');
    $RequestString = json_encode($Request);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $RequestString);

    if ($Debug) {
    $ResponseString = curl_exec($curl);
    if ($Debug) {

    if (!empty($ResponseString)) {
        $Response = json_decode($ResponseString);
        if (isset($Response->result)) {
            return $Response->result;
        if (!is_null($Response->error)) {
            var_dump($Request->method, $Response->error);
    } else {
        return null;

    return null;

$host = '';

$jsonRpcRequest = array (
    'jsonrpc' => '2.0',
    'id' => 1,
    'method' => 'getMerchantInformation',
    'params' => []

echo json_encode(callRPC((Object)$jsonRpcRequest, $host));


Rate this article:
Logo of Verifone