Handling Client Deposits
Bitclear API has been designed with payment processing in mind but can be used to work in a case when you allow your clients to deposit funds inside your application.
If your application requires that clients need to know in advance now much fiat will receive, or you only allow for depositing specific amounts (for example only depositing 10, 25, 50, 100 USD is allowed), then please use the Payment processing workflow.
Alternatively, when the amount can be flexible, please analyze following suggested workflow.
- Generate new Payment request.
Set amount to fixed value (API requires the value, but it will be ignored later), for example 10 USD, the currency matters as this is the currency that will be used for settlement. The addresses can be reused, but please refresh them at least every week, to maximize privacy you can generate new address every time client wants to perform a deposit.
- Present Cryptocurrency address to the client for depositing funds (use address per client)
- Client sends Cryptocurrency to the address indicated above.
- Every time API receives any incoming transaction, a Payment notification will be sent with updated values that reflect the latest state.
- Client can analyze the contents of
transactionssection to see the most recent transaction.