Create a charge

Accepting Payments in Cryptocurrency

If you want to accept payments in cryptocurrency, you will need to initiate a payment request, which is called a charge.

To create a charge, our system generates unique payment addresses for each enabled cryptocurrency on your behalf. You can then share a hosted payment page with your customers, which they can use to submit their payment.

For instance, here is an example of how to create a charge dynamically:

curl -X POST https://api.commerce.busha.co/charges/ \
-H "Content-Type: application/json" \
-H "X-BC-API-KEY: YOUR_SECRET_API_KEY" \
--data-raw '{
    "local_amount" : "50000",
    "local_currency" : "NGN",
    "meta": {
        "email":"[email protected]", 
        "name" : "Sarah Shaw"
    }
}'

In the request above, we're creating a charge of NGN 50,000 for a customer (Sarah Shaw)