These tests are only relevant if your integration does not require the user to be redirected via a Bango or Payment provider flow. This will be dependent on Payment Provider requirements. |
To use Bango's test payment provider 'TestPay' to test these scenarios generate a userId using the following details:
UK format
identificationMethodKey | GBR_BANGO |
---|---|
MSISDN | 447710900120 |
USA format
identificationMethodKey | USA_BANGO |
---|---|
MSISDN | 12025550120 |
Test | Action | Expected result | ||
---|---|---|---|---|
1 | Start a transaction Send a valid POST request to https://api.bango.net/v5/transaction
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
2 | (Optional) Retrieve transaction information Send a GET request to https://api.bango.net/v5/transaction/{Bango-transaction-id}
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
3 | Commit the transaction Send a valid PUT request to https://api.bango.net/v5/transaction/{Bango-transaction-id}
| An HTTP response code 200 (OK) should be returned with the following body:
|
Test | Action | Expected result | ||
---|---|---|---|---|
1 | Start a transaction Send a valid POST request to https://api.bango.net/v5/transaction
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
2 | (Optional) Retrieve transaction information Send a GET request to https://api.bango.net/v5/transaction/{Bango-transaction-id}
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
3 | Cancel the transaction Send a valid DELETE request to https://api.bango.net/v5/transaction/{Bango-transaction-id}
| An HTTP response code 200 (OK) should be returned with the following body:
|
Test | Action | Expected result | ||
---|---|---|---|---|
1 | Start a transaction Send a valid POST request to https://api.bango.net/v5/transaction
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
2 | (Optional) Retrieve transaction information Send a GET request to https://api.bango.net/v5/transaction/{Bango-transaction-id}
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
3 | Commit the transaction Send a valid PUT request to https://api.bango.net/v5/transaction/{Bango-transaction-id}
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
4 | Refund the transaction Send a valid DELETE request to https://api.bango.net/v5/transaction/{Bango-transaction-id}
| An HTTP response code 200 (OK) should be returned with the following body:
|
Test | Action | Expected result | ||
---|---|---|---|---|
1 | Start a transaction Send a valid POST request to https://api.bango.net/v5/transaction
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
2 | (Optional) Retrieve transaction information Send a GET request to https://api.bango.net/v5/transaction/{Bango-transaction-id}
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
3 | Partially commit the transaction Send a valid PUT request to https://api.bango.net/v5/transaction/{Bango-transaction-id} with a grossAmount or taxAmount lower than the POST
| An HTTP response code 200 (OK) should be returned with the following body:
|
NOTE: Partial commits are not supported by all payment providers. |
Test | Action | Expected result | ||
---|---|---|---|---|
1 | Start a transaction Send a valid POST request to https://api.bango.net/v5/transaction
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
2 | (Optional) Retrieve transaction information Send a GET request to https://api.bango.net/v5/transaction/{Bango-transaction-id}
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
3 | Partially commit the transaction Send a valid PUT request to https://api.bango.net/v5/transaction/{Bango-transaction-id} with a grossAmount or taxAmount lower than the POST
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
4 | Refund the transaction Send a valid DELETE request to https://api.bango.net/v5/transaction/{Bango-transaction-id}
| An HTTP response code 200 (OK) should be returned with the following body:
The committed amount will be refunded to the user. |
NOTE: Partial refunds are not supported by all payment providers. |
Test | Action | Expected result | ||
---|---|---|---|---|
1 | Start a transaction Send a valid POST request to https://api.bango.net/v5/transaction
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
2 | (Optional) Retrieve transaction information Send a GET request to https://api.bango.net/v5/transaction/{Bango-transaction-id}
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
3 | Commit the transaction Send a valid PUT request to https://api.bango.net/v5/transaction/{Bango-transaction-id}
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
4 | Partially refund the transaction Send a valid DELETE request to https://api.bango.net/v5/transaction/{Bango-transaction-id} with a grossAmount and or taxAmount lower than the POST
| An HTTP response code 200 (OK) should be returned with the following body:
The requested amount will be refunded to the user. | ||
5 | Further partial refunds under remaining amount Subsequent partial refunds can be made up to the amount remaining from the original transaction. | An HTTP response code 200 (OK) should be returned with the following body:
The requested amount will be refunded to the user. |
NOTE: Partial commits or refunds are not supported by all payment providers. |
Test | Action | Expected result | ||
---|---|---|---|---|
1 | Start a transaction Send a valid POST request to https://api.bango.net/v5/transaction
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
2 | (Optional) Retrieve transaction information Send a GET request to https://api.bango.net/v5/transaction/{Bango-transaction-id}
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
3 | Commit the transaction Send a valid PUT request to https://api.bango.net/v5/transaction/{Bango-transaction-id} with a grossAmount and or taxAmount lower than the POST
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
4 | Partially refund the transaction Send a valid DELETE request to https://api.bango.net/v5/transaction/{Bango-transaction-id} with a grossAmount and or taxAmount lower than the POST
| An HTTP response code 200 (OK) should be returned with the following body:
The requested amount will be refunded to the user. | ||
5 | Further partial refunds under remaining amount Subsequent partial refunds can be made up to the amount remaining from the original committed amount. | An HTTP response code 200 (OK) should be returned with the following body:
The requested amount will be refunded to the user. |