Login

Fetch Payment Options

Allows a merchant to query the various payment options available through which their consumers can make payments.

The payment options are in different categories i.e:

  1. Mobile Money - To facilitate payments from mobile money wallets.
  2. Mobile Banking - To facilitate payments from consumers bank accounts via mobile banking or internet banking.
  3. Card - To facilitate payments from consumers accounts via debit or credit cards.

1. Fetch Service Payment Options

This endpoint allows a merchant to query the various payment options available for their services.

GET https://developer.tingg.africa/checkout/v2/custom/requests/service-options?serviceCode=TESTSERVICE&countryCode=KE

Header Parameters

HeaderValueRequired
AuthorizationBearer <Bearer_Token> generated during authenticate request in step 1.YES
Content-Typeapplication/jsonYES

Request Parameters

Parameter NameTypeDescription
serviceCodestringA unique code identifier for the merchant's service in use as provided on the checkout platform.
countryCodestringTwo letter code indicating the country in which you want the payment options provided

Response Parameters

Parameter NameTypeDescription
statusCodeintegerRequest status code. See full status codes details below.
200 - Payment options fetched successfully from the checkout platform.
500 - Generic failure occurred. Could be as a result of a system failure on the checkout platform.
1001 - No payment option available
1003 - Service not found. The serviceCode sent in the checkout request did not match any the checkout platform service.
1007 - Missing countryCode
1013 - The checkout request posted was not valid JSON
statusDescriptionstringA description of the status provided above.
paymentOptionsJSON arrayAn array of payment options available for the checkout request. More details will be provided below

The paymentOptions array consists of the following parameters:

Parameter NameTypeDescription
payerClientNamestringThe name of the payment option client.
payerClientCodestringA unique identifying code of the payment option E.g. 'MPESAKE' for Mpesa payment.
paymentOptionCodestringThe mode of payment used.
paymentModeIDintegerNumber representing the mode available for use with the payment option.
paymentModestringName of the mode available for use with the payment option e.g. STK PUSH or INSTRUCTIONS
payerModeIDintegerNumber representing the mode available for use with the payment option
countryCodestringThe country in which the payment option is from.
clientLogostringA link to the image representation of the client
minChargeAmountdoubleA numerical value representing the minimum amount that the client can debit a customer’s wallet.
maxChargeAmountdoubleA numerical value representing the minimum amount that the client can debit a customer’s wallet
currencyCodestringA three characters currency code (ISO 4217) that the payment option can debit the customer’s wallet.
paymentInstructionsstringA brief description of steps to follow in order to make payment.
languageCodestringA two letter code representing the language that the instructions are in.

Example
Successful Response

{
    "status": {
        "statusCode": 200,
        "statusDescription": "Successfully processed request"
    },
    "paymentOptions": [
        {
            "paymentModeID": 3,
            "payerClientName": "Safaricom Limited",
            "payerModeID": 1,
            "paymentOptionCode": "Mobile Money",
            "payerClientCode": "SAFKE",
            "countryCode": "KE",
            "clientLogo": "https://beep2.cellulant.com:9001/hub/admin/images/logos/med96/Safaricom_Limited_10-Oct-2017_1507650496.png",
            "minChargeAmount": 1,
            "maxChargeAmount": 70000,
            "currencyCode": "KES",
            "paymentInstructions": "<p>You will receive a prompt on mobile number <b>^CHARGE_MSISDN^</b>.<br/> Enter your M-Pesa PIN to authorize your payment of <b>KES ^CHARGE_AMOUNT^</b> to account number <b>^ACCOUNT_NUMBER^</b>. </p>",
            "languageCode": "en",
            "paymentMode": "USSD Push"
        },      
        {
            "paymentModeID": 1,
            "payerClientName": "Bank of Africa - Kenya",
            "payerModeID": 6,
            "paymentOptionCode": "Banks",
            "payerClientCode": "BOA-K",
            "countryCode": "KE",
            "clientLogo": "https://beep2.cellulant.com:9001/hub/admin/images/logos/med96/boa1.jpg",
            "minChargeAmount": 1,
            "maxChargeAmount": 100000000,
            "currencyCode": "KES",
            "paymentInstructions": "<p>To pay via Bank of Africa:</p> <ol> <li>Dial <b>*587#</b></li> <li>Enter your mobile banking PIN</li> <li>Select the <b>PesaLink</b> option</li> <li>Select <b>Send to Phone</b></li> <li>Enter <b>0766369369</b> as the mobile number</li> <li>Enter <b>^CHARGE_AMOUNT^</b> for the amount</li> <li>Enter <b>^ACCOUNT_NUMBER^</b> as the reason / narration</li> <li>Tap <b>SEND</b> or <b>REPLY</b> to confirm</li> </ol>",
            "languageCode": "en",
            "paymentMode": "Instructions"
        }      
    ]
}

Failure Response

{
    "status": {
        "statusCode": 1001,
        "statusDescription": "No Payment Options available"
    },
    "paymentOptions": null
}

Authentication Failure Response

{
    "message": "Unauthenticated.",
    "status_code": 500
}

2. Fetch Request Payment Options

This endpoint allows a merchant to query the various payment options available from for a particular checkout request raised through which their consumers can make payments.

GET https://developer.tingg.africa/checkout/v2/custom/requests/options?checkoutRequestID=407073&merchantTransactionID=MTX437913

Header Parameters

HeaderValueRequired
AuthorizationBearer <Bearer_Token> generated during authenticate request in step 1.YES
Content-Typeapplication/jsonYES

Query Parameters

Parameter NameTypeDescription
merchantTransactionIDstringTransaction ID as given by merchant uniquely identifying the transaction.
checkoutRequestIDintegerUnique request identifier within the checkout platform

Response Parameters

Parameter NameTypeDescription
statusCodeintegerRequest status code. See full status codes details below.
200 - Payment options fetched successfully from the checkout platform.
500 - Generic failure occurred. Could be as a result of a system failure on the checkout platform.
1001 - No payment option available
1003 - Service not found. The serviceCode sent in the checkout request did not match any the checkout platform service.
1007 - Missing countryCode
1013 - The checkout request posted was not valid JSON
statusDescriptionstringA description of the status provided above.
paymentOptionsJSON arrayAn array of payment options available for the checkout request. More details will be provided below

Example

Successful Response

{
    "status": {
        "statusCode": 200,
        "statusDescription": "Successfully processed request"
    },
    "paymentOptions": [
        {
            "paymentModeID": 3,
            "payerClientName": "Safaricom Limited",
            "payerModeID": 1,
            "paymentOptionCode": "Mobile Money",
            "payerClientCode": "SAFKE",
            "countryCode": "KE",
            "clientLogo": "https://developer.tingg.africa/hub/admin/images/logos/med96/Safaricom_Limited_10-Oct-2017_1507650496.png",
            "minChargeAmount": 1,
            "maxChargeAmount": 150000,
            "currencyCode": "KES",
            "paymentMode": "USSD Push"
        },
        {
            "paymentModeID": 1,
            "payerClientName": "Bank of Africa - Kenya",
            "payerModeID": 6,
            "paymentOptionCode": "Banks",
            "payerClientCode": "BOA-K",
            "countryCode": "KE",
            "clientLogo": "https://beep2.cellulant.com:9001/hub/admin/images/logos/med96/boa1.jpg",
            "minChargeAmount": 1,
            "maxChargeAmount": 100000000,
            "currencyCode": "KES",
            "paymentInstructions": "<p>To pay via Bank of Africa:</p> <ol> <li>Dial <b>*587#</b></li> <li>Enter your mobile banking PIN</li> <li>Select the <b>PesaLink</b> option</li> <li>Select <b>Send to Phone</b></li> <li>Enter <b>0766369369</b> as the mobile number</li> <li>Enter <b>^CHARGE_AMOUNT^</b> for the amount</li> <li>Enter <b>^ACCOUNT_NUMBER^</b> as the reason / narration</li> <li>Tap <b>SEND</b> or <b>REPLY</b> to confirm</li> </ol>",
            "paymentMode": "Instructions"
        }          
    ]
}

Failure Response

{
    "status": {
        "statusCode": 1001,
        "statusDescription": "No Payment options available"
    },
    "paymentOptions": null
}

Authentication Failure Response

{
    "message": "Unauthenticated.",
    "status_code": 500
}