Integration Testing Scenarios
Following document lists recommended test cases that PSPs/Merchants should test while and after integrating with BPG API.
We recommend to test the scenarios with both Demo and Production environments.
Under each scenario we provide a description of expected behavior
Payment paid correctly
- New Payment
- Payment is paid correct amount
- BPG API will send one Payment notification with status
CONFIRMED
,paidAmount
andpaidBtc
will match what was requested
Payment paid after expiration
- New Payment
- Expiration time passes
- API will send one Payment notification with status
EXPIRED
,paidAmount
andpaidBtc
will be zero - Some time passes
- BPG API will wait few blockchain notifications and send Anomaly notification with
paidBtc
matching the BTC amount that was paid andpaidAmount
that is converted using exchange rate from the moment when payment was received - Payment will not be updated
Underpayment
- New Payment
- Payment is paid too little
- API will send one Payment notification with status
UNDERPAID
,paidAmount
andpaidBtc
will match what was paid - Expiration time passes
- API will send
INVALID
notification,paidAmount
andpaidBtc
will not change
Underpayment and the rest was paid
- New Payment
- Payment is paid too little
- API will send one Payment notification with status
UNDERPAID
,paidAmount
andpaidBtc
will match what was paid - Before expiration time passes, user pays the rest.
- API will send
CONFIRMED
notification,paidAmount
andpaidBtc
will match what was originally requested
Payment expired
- New Payment
- Expiration time passes
- API will send
EXPIRED
notification,paidAmount
andpaidBtc
will be zero.
Overpayment (single transaction)
- New Payment
- Payment is paid too much
- API will send
INVALID
notification,paidAmount
andpaidBtc
will match what was paid
Overpayment (two transactions)
- New Payment
- Payment is paid too little
- API will send
UNDERPAID
notification,paidAmount
andpaidBtc
will match what was paid. - User notices the error and sends the missing BTC, due to mistake user sends too much
- API will send
INVALID
notification,paidAmount
andpaidBtc
will match total that was paid
Unconfirmed Payment
- New Payment
- Payment is paid correct amount
- API decides that due to high amount of Payment it requires one network notification
- API will send
UNCONFIRMED
notification,paidAmount
andpaidBtc
will match what was requested. - Few minutes pass (API receives network confirmation about incoming transaction)
- API will send
CONFIRMED
notification ,paidAmount
andpaidBtc
will match what was requested.
Note: Creating payments for high amounts is the easiest situation to reproduce UNCONFIRMED
state, API analyzes multiple factors to decide if incoming transaction requires network confirmation so you can trigger this case when testing other scenarios
Unconfirmed Payment invalidated
(This case is very hard to reproduce, please contact support)
- New Payment
- Payment is paid correct amount
- API decides that due to high amount of Payment it requires one network notification
- API will
UNCONFIRMED
notification,paidAmount
andpaidBtc
will match what was requested. - API notices that the incoming transaction was fraudulent and is removed from blockchain
- API will send
INVALID
notification ,paidAmount
andpaidBtc
will be zero.