10 Billing - get transaction info



10.1 Successful call

To use Bango's test payment provider 'TestPay' to test this scenario generate a userId using the following details:

identificationMethodKey

GBR_BANGO
MSISDN447710900120

Test

Action

Expected result

1

Send a valid 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:

{ 
    "responseCode": "OK", 
    "responseMessage": "Success.",
    "availablePaymentMethods":
    [
        {
            "type": "OPERATORBILLING",
            "key": "{network-name}",
            "description": "Direct operator billing",
            "parameters":
            {
            }
        }
    ]
}


10.2 Not found

This scenario can be tested using Prefer Headers or by forcing an error.

Test

Action

Expected result

1

Option 1: Send a GET request to https://api.bango.net/v5/transaction/{Bango-transaction-id}


Include the following headers in the request:

  • Prefer:status=404


Option 2: Send a GET request with an invalid bango transaction id to https://api.bango.net/v5/transaction/{Invalid-bango-transaction-id}


An HTTP response code 202 (Accepted) should be returned with the following body:

{
  "responseCode": "NOT_FOUND",
  "responseMessage": "Invalid transaction id."
}


10.3 Bad request

This scenario can be tested using Prefer Headers.

Test

Action

Expected result

1

Send a GET request to https://api.bango.net/v5/transaction/{Bango-transaction-id}


Include the following headers in the request:

  • Prefer:status=400


An HTTP response code 202 (Accepted) should be returned with the following body:

{
  "responseCode": "BAD_REQUEST",
  "responseMessage": "Invalid request."
}


10.4 Unauthorized

This scenario can be tested using Prefer Headers.

Test

Action

Expected result

1

Send a GET request to https://api.bango.net/v5/transaction/{Bango-transaction-id}


Include the following headers in the request:

  • Prefer:status=401


An HTTP response code 202 (Accepted) should be returned with the following body:

{
  "responseCode": "UNAUTHORIZED",
  "responseMessage": "Invalid access credentials."
}


10.5 Internal Error

This scenario can be tested using Prefer Headers.

Test

Action

Expected result

1

Send a GET request to https://api.bango.net/v5/transaction/{Bango-transaction-id}


Include the following headers in the request:

  • Prefer:status=500

An HTTP response code 202 (Accepted) should be returned with the following body:

{
  "responseCode": "INTERNAL_ERROR",
  "responseMessage": "The server encountered an unexpected condition which prevented it from fulfilling the request."
}


10.6 Service unavailable

This scenario can be tested using Prefer Headers.

Test

Action

Expected result

1

Send a GET request to https://api.bango.net/v5/transaction/{Bango-transaction-id}


Include the following headers in the request:

  • Prefer:status=503

An HTTP response code 202 (Accepted) should be returned with the following body:

{
  "responseCode": "SERVICE_UNAVAILABLE",
  "responseMessage": "The server is undergoing maintenance and is 
not available. Please, try again later."
}