Handling Client Deposits
BPG 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 deposit.
We cannot guarantee that addresses will be valid more more than few weeks.
- Present Bitcoin address to the client for depositing funds (use address per client)
- Client sends BTC to the address indicated above.
- Depositing funds requires 2 Bitcoin network confirmations (this is when we generate anomalies in Payment processing workflow)
- We send Anomaly Notification and indicate the paid fiat amount in
fiatAmountattribute, this is the amount that can be added to client deposit.
- Ignore any other Payment notifications except
CONFIRMED, this also means that client has successfully deposited funds