Using the Public API for checkout

Accepting cryptocurrency payments with the CPAY Public API is fast and easy. After you've signed up you already can to create a charge to receive a payment.
Use the CPAY Public API for checkout creating. When you create a charge, we generate payment addresses on your behalf for each cryptocurrency that’s enabled and provide you with a hosted page you can send to customers to complete the payment.

Login to merchant

You need to get api keys for your merchant and login to your merchant in order to get the token necessary for creating checkout and further actions on them.
post
https://api.cpay.world
/api/public/auth
Endpoint POST /public/auth

Checkout(donation) creating

post
https://api.cpay.world
/api/public/checkout/donation
Endpoint POST /api/public/checkout/donation

Checkout(sale) creating

post
https://api.cpay.world
/api​/public​/checkout​/sale
Endpoint /api​/public​/checkout​/sale

Get all checkouts list

get
https://api.cpay.world
/api​/public​/checkout
Endpoint /api/public/checkout

Get a specific checkout

get
https://api.cpay.world
/api/public/checkout/{checkoutId}
Endpoint /api/public/checkout/{checkoutId}

Checkout deleting

delete
https://api.cpay.world
/api/public/checkout{checkoutId}
Endpoint /api/public/checkout{checkoutId}

Checkout(donation) editing

patch
https://api.cpay.world
/api/public/checkout/{checkoutId}/donation
Endpoint PATCH /api/public/checkout/{checkoutId}/donation

Checkout(sale) editing

patch
https://api.cpay.world
/api/public/checkout/{checkoutId}/sale
Endpoint PATCH /api/public/checkout/{checkoutId}/sale
A checkout object is returned with a URL to a hosted page where a customer can complete their charge. The customer is able to send any amount for donation or fixed amount for sale.

Receive a payment

After creating a charge, Coinbase Commerce will continuously monitor each blockchain network for a payment. Since cryptocurrencies are push payments, we set an expiration time for the charge which is currently 1 hour after the creation date. If the customer does not make a payment within that timeframe, we consider the charge to be expired.
After the user opens the widget, two requests are sent: the first to receive the chargeId, and the second to receive all the information on the charge.

Get the chargeId

post
https://api.cpay.world
/api/checkout-client/{identifier}/charge
Endpoint /api/checkout-client/{identifier}/charge

Get the charge

get
https://api.cpay.world
​/api​/checkout-client​/{chargeId}​/charge
Endpoint /api/checkout-client/{chargeId}/charge
Also you can get information about checkout by identifier
get
https://api.cpay.world
/api​/checkout-client​/{identifier}
Endpoint /api/checkout-client/{identifier}
The user opens a charge with an available list of currencies and expired time. After selecting the currency, a unique client wallet is generated. In this case, the status of the charge is accepted as New. When the user sends funds to the selected wallet, the charge status is accepted as Pending. After successful payment, the status of the charge is accepted as Done. If the user has not paid for the charge at the specified time, then the status of the charge is accepted as Expired. If any error or failure has occurred in the network, then the status of the transaction is accepted as Failed. After successful replenishment, the user needs to click on the "Back" button to generate new wallets or replenish the previous wallet, but in this case the transaction will not be displayed in the widget.