Invoice protocol
Rules
- If a payment was made, but the funds sent were not sufficient, the funds will be sent back.
- If a payment was made, but the funds sent were too much, the rest will be sent back.
- If a payment was made, but it was not in time, it will be sent back.
- If a payment was made, the expiration timer will be paused.
Note: If a payment is sent back, the fee will be subtracted from the transcation.
Creation
1. Submit a invoice request
The first step is to tell LibrePay that you want to create a new invoice by submitting all necessary details.
For example:
With that, LibrePay knows where to redirct after finishing or cancelling of the payment and how much everything will cost.
LibrePay will respond with all currently activated crypto currencies and there corresponding price:
Since the price for each crypto currency has been set, the user will receive a fixed time in which the payment has to be made.
2. Choose a payment method
Now you know what crypto currencies are supported and how much you'll have to pay. All you have to do now is to choose one of them.
LibrePay acknowledged this choice and will now await payments on a specific addresss.
You can also get this address by calling GET /invoice/YjcTCvruxPwdiNMk[...]