(Questa pagina è disponibile solo in inglese.)

How to accept Ripple (XRP) payments with NodeJS

Over the last decade, the way we can receive value over the internet has dramatically shifted from traditional payments to programmable money. Cryptocurrencies like Ripple's XRP have emerged and can be embedded into online shops or e-commerce sites to receive customer payments.

In its simplest form, all that is needed to receive Ripple (XRP) payments in NodeJS is to display an XRP account to the customer. Albeit outside of the scope of this document, it is easy to create an XRP account programmatically and obtain control of the private key. This is a good starting point if you are a NodeJS developer and wish to create your own XRP account.

This simple type of XRP payment integration is suitable for anonymous donations, but requires a lot of additional overhead to make it play well with accounting systems, compliance, and regulatory requirements. Connecting them with customer information and monitoring the XRP Ledger to detect the correct payment transaction and mark the sale as completed, introduce plenty of additional complexity in NodeJS.

Fortunately, Whalestack provides a suite of APIs and a convenient NodeJS software development kit (SDK) for online merchants and e-commerce site who wish to accept XRP payments. Using Whalestack, it is no longer necessary to continuously monitor various blockchains for payment transactions. Whalestack creates cryptocurrency payment transactions on your behalf and automatically notifies you once the payment has been settled.

Read our SDK guide and learn how to accept XRP payments with this tutorial.

Creating an XRP payment request is as simple as firing the below API request using the NodeJS SDK.

let response = await client.post('/checkout/hosted', {
    charge:{
        billingCurrency: 'EUR', // specifies the billing currency
        lineItems: [{ // a list of line items included in this charge
            description: 'PCI Graphics Card',
            netAmount: 169.99,
            quantity: 1
        }],
        shippingCostItems: [], // an optional list of shipping and handling costs
        taxItems: []
    },
    settlementAsset: 'USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN' // your settlement asset as given by GET /assets (or ORIGIN to omit conversion)
});

The API request returns a list of cryptocurrency payment methods and deposit addresses, including XRP. These can be displayed back to a customer to complete payment.

Moreover, the Whalestack platform provides built-in business accounting tools, invoicing and customer management. Most importantly, payments in XRP can automatically be settled in your national fiat currency and withdrawn directly into your bank account. Inspect our NodeJS SDK on GitHub to get started.

Last Update: Oct 2, 2023

Developers
© Whalestack LLC 2018-2024 · Termini di Servizio · Privacy Policy · Politica di Conoscenza del Cliente e Antiriciclaggio · Politica Antifrode · Elaborazione Dati · Licenza Whalestack LLC (Numero di Registro Aziendale 0000970546) è una società a responsabilità limitata con sede legale in via Jedności 54, 65-018 Zielona Góra, Polonia. Whalestack LLC è soggetta alla relazione dell'Ispettore Generale delle Informazioni Finanziarie ed è autorizzata dal Ministero delle Finanze polacco a fornire servizi di scambio e custodia di valuta virtuale con il numero di fornitore di servizi di attività di valuta virtuale RDWW-311. Unione Europea Con Licenza e Regolamentato nell'Unione Europea © Whalestack LLC 2018-2024 · Termini di Servizio · Privacy Policy · Politica di Conoscenza del Cliente e Antiriciclaggio · Politica Antifrode · Elaborazione Dati · Licenza
Space Cat
Space Cat! Meow. 🐱🚀