Choose the Ultimate Payment API Aggregator to Save Time, Effort, and Money

X-Payments is a headless payments API aggregator that allows access to ready-made integrations with various payment providers and systems, fraud screening apps and other integrations and features through a single API. It’s PSD2/SCA ready and PCI DSS Level 1 Certified.

Using X-Payments allows you to integrate it once and get access to a variety of payment processors, fraud screening services, and handy features: one or many at a time. It allows you to add or switch between providers and solutions by simply checking the right boxes in the backend.

  
      total: '99.95',
      currency: 'USD',
    },
    company: {
      name: 'Example Store',
      countryCode: 'US',
    },
    language: 'en',
  }
  var widget = new XPaymentsWidget();
  widget.init(xpaymentsWidgetConfig); 
  widget.load();
</script>
X-Payment Card form

To start using X-Payments, follow these simple steps:

1

Sign up for a trial account.

2

Add this piece of code to your website:

Show / Hide Script
<div id="xpayments-iframe-container"></div>

<form class="place" method="post">
    <input type="submit"/>
</form>

<script src="sdk/js/widget.js"></script>
<script>
    var widget = new XPaymentsWidget();

    widget.init({
        account: 'clouddemo',
        widgetKey: '4kleb1szEhC6gOQRvfnc4vhebFRRX5aH',
        container: '#xpayments-iframe-container',
        form: 'form.place',
        order: { 
            total: '99.95',
            currency: 'USD',
        },
        language: 'en',
    });

    widget.load();
</script>
3

Check and submit your credit card form

4

Add the following PHP code to process order submission.

Show / Hide Script
require_once 'sdk/lib/XPaymentsCloud/Client.php';
	
    $cart = array (
        'login' => 'customer@example.com (User ID #7)',
        'merchantEmail' => 'admin@example.com',
        'billingAddress' => array (
            'firstname' => 'John',
            'lastname' => 'Doe',
            'address' => 'Null street 458',
            'city' => 'New York',
            'state' => 'NY',
            'zipcode' => '10001',
            'country' => 'US',
            'phone' => '+1 (800) 555-5555',
            'email' => 'aa@bb.cc',
        ),
        'shippingAddress' => array(), 
        'currency' => 'USD',
        'items' => array (
            array (
              'sku' => 'RCRD0001H',
              'name' => 'Hi-Fi Stereo Record Player',
              'price' => 9.95,
              'quantity' => 1,
            ),
        ),
        'shippingCost' => 16.65,
        'taxCost' => 2.54,
        'discount' => 0.95,
        'totalCost' => 99.95,
        'description' => 'Order #123',
    );
	
    $client = new \XPaymentsCloud\Client(
	    'clouddemo', 
	    'em8zFQtMh0E6WAwrdfKIYpHeRzHtvbq2', 
	    'meU8VqPx8d95CRFBXxd1AeD9synW9eFE'
	);

    $result = $client->doPay(
        $_POST['xpaymentsToken'],
        'Order #00001',
        '',
        $cart,
        'https://example.com',
        'https://example.com',
    );
	
    echo '<pre>' . var_export($result, true);
	
5

Check your processed order. Done!

Learn more by checking these resources:

Feel free to use source, submit updates, and suggest changes via a pull request in the X-Payments GitHub Repository.

Save your time, money, and effort by using the ready-made integrations and smart features in X-Payments.

No more fuss developing a new payment integration from scratch whenever you need to connect it to use in your project. No need to dig into another API documentation (save X-Payments) and figure out how things work inside the new payment system.

Start Using X-Payments