Generate Token

This function will generate a token for the submitted card details.



AuthorizationBearer <BEARER_TOKEN> Generated during the authenticate requestYES


Parameter NameTypeDescriptionRequired
service_codestringUnique assigned code from your sandbox or shared with you.Yes
merchant_transaction_idstringUnique transaction ID identifying the transaction as given by the merchant.Yes
payment_option_codeintegerValue representing the payment option for the card change.Yes
localestringIt is the language used for the transactionYes
country_codestringCountry code for where the request will be processedYes
extra_dataJSON ObjectExtra DetailsYes
extra_data.checkout_request_idintegerUnique request ID identifying the transaction provided byYes
orderJSON ObjectOrder DetailsYes
order.account_numberStringIs the unique reference of the orderYes
order.amountdoubleIt is the amount to be charged on the cardYes
order.currency_codestringIs the currency of the amount being transacted / chargedYes
order.descriptionstringIt contains a description of the transactionYes
source_Of_funds.cardStringSource of funds details - card detailsYes
source_Of_funds.card.nameOnCardstringIt is the full name on the customer's cardYes
source_Of_funds.card.numberintegerIt is the card’s primary account number (PAN)Yes
source_Of_funds.card.cvvintegerIt is the card’s verification number. Normally a 3 digit value found at the back of your cardYes
source_Of_funds.card.expiry.month source_Of_funds.card.expiry.yearintegerIs the card’s expiry date. In moth and Year (MM/YY)Yes
billing_detailsJSON ArrayBilling DetailsYes
billing_details.addressJSON ArrayBill Address DetailsYes
billing_details.address.citystringBilling address, CityYes
billing_details.address.country_codestringBilling address, CountryYes
billing_details.customer.first_namestringIt is the customer’s first nameYes
billing_details.customer.surnamestringIt is the customer’s last nameYes
billing_details.customer.email_addressstringIt is the customer’s email address that is tied to the card token generatedYes
billing_details.customer.mobile_numberstringIt is the customer’s mobile number.Yes
browser_detailsJSON ArrayContains browser detailsYes
browser_details.accept_headerstringThis represent http data formatYes
browser_details.screen_color_depthstringIt's the maximum number of colors that can be displayedYes
browser_details.languagestringThis indicates browser languageYes
browser_details.screen_heightstringThe is the value of browser window layout viewportYes
browser_details.screen_widthstringThis is the value of browser window layout viewportYes
browser_details.timezonestringIt's the browser region where the same standard time is usedYes
browser_details.java_enabledbooleanThis specify if browser supports java or notYes
browser_details.javascript_enabledbooleanThis specify if browser supports javascript or notYes
browser_details.ip_addressstringIt uniquely identify the device on the internetYes
browser_details.user_agentstringThis field contains the exact content of the HTTP User-Agent headerYes

Request Body

    "service_code" : "{{service_code}}",
    "country_code": "KEN",
    "billing_details": {
        "address": {
            "country_code": "KEN",
            "city": "Kenya"
        "customer": {
            "first_name": "Gunnar",
            "email_address": "[email protected]",
            "surname": "Stewart",
            "mobile_number": "254791498482"
    "merchant_transaction_id": "MT546871086",
    "payment_option_code": "ECO_CARD",
    "source_Of_funds": "RVlQZHRDdjNhMm9IeitjOWdZQ3o2QUo5d1I0SlRsSGV4bG9TamtETUlZK09xSitDampNTHNpemVSS1g0dEl1SjNVMW91S3RRT0lqUjlSM3V3TFhYVFRwSFRPS2o2TFdkUzJEekdERUErMkdmVWVpMGZOdzVQOXhYdzNVV3NJMm9OM3BoUVg5MHoycSthblk4eWwwelBMWU1PTFV5L05KWlFubHM3REpEWVVvPQ==",
    "locale": "en",
    "order": {
        "account_number": "31318461285",
        "amount": "1000.00",
        "currency_code": "KES",
        "description": "Order XX Purchase"  
       "checkout_request_id": 565
    "browser_details" :{
    "accept_header": "text\/html",
    "screen_color_depth": "24",
    "language": "en-US",
    "screen_height": "768",
    "screen_width": "1366",
    "timezone": "-180",
    "java_enabled": "false",
    "javascript_enabled": "true",
    "ip_address": "",
    "user_agent": "Firefox 105.0"


Parameter NameTypeDescriptionRequired
statusJSON ObjectContains status code and descriptionYes
status_codeintegerThe response status codeYes
status_descriptionstringExact description of the statusYes
resultsJSON ObjectNull when request failsYes
results.redirect_urlStringRedirect URL or page to redirect your client for payment authentication by your issuing bank.No
results.typestringThe type of responseNo

Response Body

  "status": {
    "status_code": 200,
    "status_description": "Operation done successfully"
  "results": {
    "redirect_url": "",
    "type": "THREE_D_SECURE"

Status Codes

Status CodeStatus Description
200Transaction was successful
2013DS Authentication failed. Retry transaction with correct OTP
203Rejected due to Address Verification System data mismatch (name, address, etc.). Retry with a different card or contact your bank to update address details
204Transaction may or may not have been successful, but MUST be canceled to comply with sanctions and law enforcement. Retry with a different card
205Transaction rejected due to CVV mismatch. Retry transaction with correct CVV
209The card is expired. Retry with a different card
210Transaction has been blocked due to fraud. Retry with a different card
211Amount is too high, too low, does not match a previous authorisation or is otherwise invalid. Retry with a different amount
212Card data (PAN, expiry date or CVV) are invalid. Retry with correct card details
213PAN is invalid. Retry with correct card PAN
214Transaction declined by acquirer. Retry with a different card
215Rejected due to problems on the issuer side. Retry with a different card
216Insufficient funds or withdrawal limit exceeded. Fund account or retry with a different card
217Card reported as lost. Contact issuing bank or retry with a different card
219Transaction not permitted to either issuer, cardholder, acquirer or merchant. Retry with a different card
220Transaction was successful for only a partial amount, void transaction and try again
222Rejected due to issues with cardholder PIN. Retry with correct card PIN or a different card
223Transaction has been rejected, please contact your card issuer or retry with a different card
224Transaction was processed, but has been flagged for manual review due to suspicion of fraud
225Card has been reported as stolen. Contact issuing bank
226Transaction timed out with unclear status; recommend to cancel and retry with a different card
602Invalid payment token passed. Merchant to review and send correct token
6083DS Authentication failed, unable to redirect customer to card issuer page. Retry with a different card
609Token not allowed for 3DS transaction
610Unable to complete the payment. Please try again
611Payment Declined. Your card is not 3DS Enabled. Contact your bank.
616Token not found. Retry with a valid token
617Duplicate reference number. Reinitiate transaction with a unique Merchant transaction ID
629Transaction blocked due to suspected fraud. Contact card issuer for support
631Missing card number. Please provide the card number
632Missing card expiry field. Please provide the card expiry field
633Missing card expiry month field. Please provide the card expiry month field
634Missing card expiry year field. Please provide the card expiry year field
637Invalid Country Code passed. Please provide the correct country code
642Customer email is required
644Invalid card BIN format. Value should be numeric
647Card BIN is required
648Invalid card BIN length passed
651Missing card number. Please provide card number for card tokenization requests
655Incorrect card pin length. Card PIN must be four (4) digit(s)
656Unsupported request type. Set isCvvLess flag to True
660Invalid card length %s scheme. % card length should be %
661Invalid card PAN. Retry with correct card PAN
662Incorrect Expiry year length. Expiry year must be 2 digits
663Incorrect Expiry month length. Expiry month must be 2 digits
664Incorrect Expiry month. Expiry month must be value must be between 1 and 12
665Incorrect Expiry year. Expiry month must be value must be between 0 and 99
667Invalid CVV format. Card Verification Value must be a numeric value between 3 and 4 digits
668BIN passed in card issuer information does not match card BIN
671Card details is not required for delete token requests. Send only token
672Missing token. Token is required delete token requests
673Missing card pin. cardPin is required for VERVE Cards
675Unsupported request type. Set tokenizeCard flag to false
701Secure3D Authentication Pending. Prompt user for OTP for Verve Card
1067We are unable to process your request at the moment. Please contact support via [email protected]
1700Invalid currencyCode or currencyCode {currencyValue} has not been configured
1701Invalid or expired request. Data not found for the specified service and checkoutRequestId
1702Account Number Mismatch. Account number should be same as used in initiate checkout request
1703Invalid countryCode or countryCode {countryCodeValue} has not been configured
1704Payment Option not configured for paymentOptionCode and countryCode
1707Invalid sourceOfFunds value passed. Encrypt with valid encryption credentials
Click Try It! to start a request and see the response here!