This feature allows site owners to accept payment from other users of CedsonHub, can be also called as merchant API.
How it works
CedsonHub provides two endpoints to implement this feature.
First, to create an invoice or payment request. Here site owner will specify currency and the amount of the transaction.
Once, payment request is created site owner will be provided with a link, where the user needs to be redicted to confirm the payment.
Second, to verify invoice or payment request status.
Once, user confirmed or canceled the transaction. Site owner can check its status, and perform required actions based on result.
We recommend site owners to show, 'verify my payment' button to their users, to prevent unnecessary checks of transaction's status.
Description of the status
Pending: invoice is created, however, yet was not verified or canceled by user.
Paid: invoice is paid, site owner received payment. Please don't check this invoice's status again, as it's already paid.
Canceled: invoice is canceled, user decided not to pay this invoice. Please don't check this invoice's status again, as it was rejected by user.
Make sure to show user the invoice details and status.
Make sure to store redirect_url and other details of the invoice, in case user was not able finish transaction from the first try. For example: user did not have enough funds.
Don't send user to redirect_url of invoice that already has status of 'Paid' or 'Canceled', such invoices are completed so the link is invalid.