This repository contains code examples of how to integrate Prompt.cash as a payment processor in your backend.
See our API reference for detailed descriptions of each parameter used in the following examples.
Also watch our merchant introduction video.
This is the most minimalistic integration example into a static HTML page. It will generate a new address for every payment. You can then view a payment history including "payment description/reference" and used addresses in your account.
Just put the 2 HTML files on your webserver and customize the input
values
in the form
tag.
See the nodejs folder.
This example can add server-side parameters (such as order ID) and add a signature to each payment to prevent spoofing.
In the index.js
file, add the following:
- your Account
PublicToken
andSecretToken
- customize payment amount, currency and other parameters as needed
yarn install # npm works too
yarn start
See the php folder.
This example can add server-side parameters (such as order ID) and add a signature to each payment to prevent spoofing.
In the config.php
file, add the following:
- your Account
PublicToken
andSecretToken
In the index.php
file, add the following:
- customize payment amount, currency and other parameters as needed
Just download our WordPress plugin.
You can install it directly within WordPress under Plugins -> Add New
Payment plugin for web hosting providers & resellers using WHCMS to manage their customer invoicing.
We have an Anrdoi App Demo that shows you how to:
- display a QR code
- check for payment status
You can use this app as a template to accept Point of Sale (POS) payments.
To receive payments in your own SLP token, please follow this guide.
+-------------+ +-------------+ +-------------+
| | | Merchant | | Prompt.Cash |
| Customer | | Website | | Payment |
| | | | | Gateway |
+-------------+ +-------------+ +-------------+
| | |
|--(1)--Payment Request-------------->| |
| | |
|<--(2)--Generate Payment Form--------| |
| | |
|---(3)--Click "Pay" & Go to Gateway------------------------------------->|
| | |
| |<---(4)--Payment Success Callback--|
| | |
|<---------------------------------(5)--Send Customer back to Return URL--|
| | |
| | |