docs.crypto.xmoney.com Open in urlscan Pro
2a05:d014:275:cb00::c8  Public Scan

URL: https://docs.crypto.xmoney.com/
Submission: On May 25 via automatic, source certstream-suspicious — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

 * Basics
   * 0. Before you start
   * 1. Checkout process
   * 2. Try our flow
   * 3. Build the order
   * 4. Checkout suggestions
   * 5. Webhooks
 * Integrations
 * Libraries
 * APIs

API docs by Redocly





XMONEY FOR DEVELOPERS




Welcome to the xMoney documentation for Developers. Here you will find
everything you need to start accepting crypto payments in your online store or
website easily with xMoney.


BASICS

In this section you can find a set of concepts that will help you understand how
xMoney handles payments, so that you can integrate our payment method without
any trouble.


0. BEFORE YOU START

Be aware xMoney Payments have the following limitations:

> ⏰ Our payment confirmation can take up to 2h30;

> 🌍 Our Payment Widget is only available in English.


1. CHECKOUT PROCESS

Our payment flow is asynchronous; the customer has 15 minutes to choose the
cryptocurrency and issue a transaction in the respective blockchain, sending the
requested funds to the address we provided.

Once we detect the pending transaction, which usually happens in a matter of
seconds, we recognize the payment and redirect the user to the merchant success
callback URL.

Upon confirmation of the transaction, which can take up to 2 hours, we send a
notification to the merchant store or website via a webhook.

In more detail, this flow has 6 stages:


 1. [Merchant] On checkout, the merchant system sends the order details to
    create it on our server, getting a redirect_url in the response (see the
    create order endpoint).
 2. [Merchant] Redirects users to the provided URL, which shows them the xMoney
    Payment widget.
 3. [xMoney] Users pay for the order, seeing a "Payment Complete" message.
    xMoney also sends them an email with the detected payment details. This
    completes the user interaction.
 4. [xMoney] Redirects the customer back to the return_url provided when the
    order was created.
 5. [xMoney] It takes some time to confirm transactions (minutes or hours,
    depending on the blockchain). Once confirmed, xMoney sends an HTTP request
    to the Merchant system notifying the payment was received.
 6. [Store] Verifies and validates the request, and, if valid, finalizes the
    order.


2. TRY OUR FLOW

The best way to learn about what we do is by trying it out yourself. For this,
we recommend you to use Elrond devnet wallet with some "fake" EGLD (notice
Devnet instead of Testnet). After creating your wallet, go to "Faucet" and click
"Request tokens". This should get you 10 xEGLD (which is the fake EGLD you will
need). If that faucet is not working, you can try this one (don't forget to
choose Devnet, as for Elrond, it is the network we use for testing).



You can also use MetaMask with some fake ETH, just make sure to change to the
Göerli Test Network, which is what we use in our sandbox environment.

When you are ready, go to our Sandbox online store and give it a spin by
selecting an item and proceeding to checkout. Choose the xMoney payment method.
Once you proceed to the payment, you will see xMoney Payment Widget.

Confirm prefilled email or fill in the one you want to use.



Select Pay with another wallet.



Select the EGLD (MultiversX) currency.



Select MultiversX network.



The widget will then show you a QR Code with the payment details. Copy the
address and amount.



Open Elrond wallet and send the amount in xEGLD to the provided address.



Wait some seconds, and the widget should change to show the payment is complete.



For EGLD, the payment is complete because transactions are confirmed very fast.
For other cryptocurrencies, it can take some minutes to confirm. Either way, the
confirmation notification will we delivered to the merchant server, via webhook.


3. BUILD THE ORDER

Assuming you now have a clear understanding of the flow, let's integrate your
system.


3.1. SANDBOX AND PRODUCTION

In addition to the real-world payment processing environment, xMoney offers
developers an environment where they can test their integration using
not-so-valuable test money. We call these environments Production and Sandbox,
respectively.

The two environments are identical for most of the time, differing only in that
Production uses blockchains mainnets, and Sandbox uses the respective testnets.

However, please note that some currencies may not available in Sandbox due to
the unavailability of their testnets. For example, Lightning Network cannot be
used to test Bitcoin transfers in Sandbox, but is always available for testing
in Production.

We also release new features to Sandbox a bit before them reaching Production,
but this usually happens in a couple of hours.

Depending on which environment they want to target, developers must choose the
appropriate hostname to target their requests. Production uses the
crypto.xmoney.com domain, whereas Sandbox uses the sandbox.crypto.xmoney.com
domain.


3.2. SIGN UP FOR SANDBOX

To use our Sandbox environment first you need a merchant account. Remember
Production is a separate environment, your real merchant account won't exist in
Sandbox (but here you can have many).




3.3. AUTHENTICATION

You must then generate credentials for your store, which can be done through
your xMoney Merchant Dashboard. In there, go to the Integrations section, choose
Custom and click on the Generate Credentials button.



You’ll then be shown the API Key and Webhooks Secret for your store. This
information will not visible afterwards, make sure to save it.




3.4. CREATING THE ORDER

Orders are base concept to process payments in xMoney. To process a payment the
system must first call the create order endpoint.

The response will then contain a URL to which users must be redirected. When the
payment is processed xMoney redirects the user back to the system, using the
URLs provided.


3.5. GOING INTO PRODUCTION

All tests went good and you want to move into production? To create a production
account go here. You will have to generate your production API Key and Webhook
secret in the Integrations page. If you need to add more users, please let us
know and we will add them manually to the same Organization.


4. CHECKOUT SUGGESTIONS

To increase conversions on the checkout page, we suggest you to add the
following:

 * Payment method name: “Pay with Crypto” or xMoney — Pay with Cryptocurrencies”
   (if it’s not possible to add the xMoney logo)
   
   Have in mind the correct way to spell "xMoney":

 * Description/Instructions: “You will be redirected to the xMoney payment
   widget compatible with any major crypto wallets. It will allow you to pay for
   your purchase in a safe and seamless way using Bitcoin, Ethereum, Tether or a
   number of other currencies. What is xMoney?”

 * xMoney checkout logo: Download the logos here.

Example with the xMoney logo:

Example without the xMoney logo:


5. WEBHOOKS

Merchant systems can be notified of events in the xMoney platform through
webhooks. At the moment these events include:

 * Confirmation of the order payment;
 * Cancellation of the order.

The URL to use for these webhooks is defined by the callback_url field when
creating an order.

All webhook requests are expected to respond with HTTP status 2xx in case of
success. Any other status code, or the lack of a response, will be considered a
failure. In that case xMoney will retry up to 15 times with an exponential back
off following a Fibonacci sequence -- first retry happens after 1 minute, second
happens 2 minutes after the first one, third happens 3 minutes after the second
one, etc.

All requests sent by xMoney to the provided URL are signed for validation using
the Webhooks Secret generated (see 3.3 Authetication).

When using our integrations, webhooks are set and validated automatically as
part of the order payment flow. For custom integrations we make available
libraries able to validate the requests.

For manual validation instructions, and further technical details, check the
Webhooks section in the xMoney API documentation.


INTEGRATIONS

xMoney develops and maintains plugins for some of the most popular e-commerce
solutions.

Platform Magento 1 Download Magento 2 Magento marketplace or Download OpenCart 3
OpenCart marketplace or Download Payrexx Instructions PrestaShop 1.6 Download
PrestaShop 1.7 Shopify Apply here Weasy Instructions WHMCS WHMCS marketplace or
Download WooCommerce Wordpress marketplace or Download

Is your platform missing from this list?

Let us know so we can consider it in our development roadmap.

Alternatively, use our API documentation to build the integration you need and
join forces with us to foster an active open-source community around xMoney.


LIBRARIES

Language Repository PHP utrust-php CFML UtrustCFML (maintained by Gary Stanton)
Typescript utrust-ts-library

Is your language missing from this list?

Let us know so we can consider it in our development roadmap.

Alternatively, use our API documentation to build the library you need and join
forces with us to foster an active open-source community around xMoney.


APIS

The xMoney platform provides public APIs that you can use to build your own
tools around our ecosystem.

For more details, check the xMoney API Reference.