PayU Kenya

Follow the standard PaymentsOS integration procedure, and then apply the relevant extra specifications in this section to integrate with PayU Kenya.

API Version

Minimum required API version: 1.1.0

Payment Methods

Server-to-Server Integrations

The tables below lists payment methods that are supported through a server-to-server integration and through the PayU payment page. When integrating a payment method, the Authorization, Capture and Charge request types are supported unless stated otherwise in the Only for Requests column.

Payment MethodPayment Method TypeOnly for Requests
Airtel MoneyeWalletCharge
EFT (MOBILE BANKING)Bank TransferCharge
EQUITELeWalletCharge
MASTERCARDCards
MPESAeWalletCharge
VISACards

Payment Page

The following table lists all supported payment methods available on the PayU payment page. For each supported payment method, the API Value column list the value you need to pass in the payment_method.additional_details.supported_payment_methods array of the Create Charge request.

Payment MethodAPI ValueOnly for Requests
AirtelAIRTEL_MONEYCharge
EFT (MOBILE BANKING)MOBILE_BANKINGCharge
EquitelEQUITELCharge
MASTERCARDCREDITCARD
MPESAMPESACharge
VISACREDITCARD

Currencies

KES, USD

Features

The following table provides an overview of all supported and non-supported features.

FeatureSupported
3DS 2.0 ExternalNo
3DS 2.0 PaymentsOS-handledNo
3DS 2.0 Provider-handledYes
3DS 2.0 Self-handledNo
InstallmentsNo
Level 2 and 3 DataNo
Multi-seller PaymentsNo
Network TokensNo
Payment FacilitatorNo
PayU RiskNo
Pre-authorizationNo
Retrieve Supported Payment MethodsNo
Retrieve Supported PlansNo
Statement Soft DescriptorNo
Stored Credentials FlagNo
Transaction Processing without CVVYes

Requests

The following table lists all supported requests for card-based transactions. Use the bodybuilder to create a sample request body for each request type.

Supported requests for card transactions.
RequestPartial/MultipleModeNotes
AuthorizePartial and multiple are not supportedAsynchronousThe request can be synchronous or asynchronous, depending on whether you implemented a 3DS flow.
Capture Partial is supportedSynchronous
Charge Not ApplicableAsynchronousThe request can be synchronous or asynchronous, depending on whether you implemented a 3DS flow.
Refund Both partial and multiple are supportedSynchronous
Void Not ApplicableSynchronous

Setup Procedures

The following table lists the setup procedures that are specific to this provider.

ConfigurationRequired/Optional
In the PaymentsOS Control Center, configure the following credentials:
  • Username: Web service username provided by PayU Kenya.
  • Password: Web service password provided by PayU Kenya
  • Safekey: PayU Merchant Identifier provided by PayU Kenya.
To obtain test credentials, click here. To obtain live credentials, login to the merchant portal.
Required
In your PayU Kenya account, verify whether 3DS is configured to be optional or required and handle the 3DS flow accordingly. For more information, see Enabling 3DS below. Contact PayU Kenya support for assistance.Required
In your PayU Kenya account, disable the cvv check if you do not require customers to enter their cvv code when initiating a payment. Contact PayU Kenya support for assistance.Optional
In your PayU Kenya account, enable the payment methods you want to display in the payment page. For more information, see Implementing a Payment Page Flow below. Contact PayU Kenya support for assistance.Optional
If you want to use our End-to-End Encryption Service, configure the public key generated with PayU Kenya in the PublicJWK field in your PaymentsOS account. Optional

Integration Procedures

The following sections list the integration procedures that are specific to this provider.

Enabling 3DS

If you require 3DS, contact PayU Kenya support to configure the following IPN URLs in your PayU Kenya environment:

After configuring the IPN URLs, configure Webhooks in your PaymentsOS environment to receive updates when a change in a transaction status occurs.

Note that in your PayU Kenya account, you can configure 3DS to be either required (force 3DS) or optional. If you configured your account to enforce 3DS, then the user will always be required to complete a 3DS authentication step. If you configured 3DS to be optional and you want the user to complete a 3DS authentication step, then include a provider_specific_data object with an is3ds value of true in your Create Authorization or Create Charge API requests.

Copy
"provider_specific_data": {
    "magellan": {
      "additional_details": {
        "is3ds": "true"
      }
    }
  }

Regardless of whether 3DS is set to required or optional, PayU Kenya will only direct a user to complete a 3DS authentication flow if a user’s card is enrolled for 3DSecure.

Bear in mind that a 3DS redirection flow requires that you pass a merchant_site_url in the Create Authorization or Create Charge request. If you do not pass a merchant_site_url, the user will not be able to complete the 3DS authentication flow. The response data of the Create Authorization or Create Charge request will indicate this in the additional_details.error field:

Copy
{
  "additional_details": {
    "error": "The transaction requires 3DS authentication, but cannot be completed as the merchant_site_url was not provided"
  }
  ...
}

Implementing a Payment Page Flow

If desired, you can implement a payment flow in which users are redirected to a payment page where they can then select their payment method of choice. This flow is identical to a redirection flow, in which the response of the Create Charge request returns a Redirection object that includes the URL of the payment page to which you can redirect the user. Just make sure that your Create Charge request includes a payment_method.additional_details.supported_payment_methods field with a comma separated list of the payment methods you want to show in the payment page:

Copy
{
  "payment_method": {
    "source_type": "payment_page",
    "type": "untokenized",
    "additional_details": {
      "supported_payment_methods": "CREDITCARD,[SEE TABLE SUPPORTED PAYMENT METHODS]"
    }
  }
}

A few caveats:

  • In your PayU account, you must enable the payment methods you want to show in the payment page.

  • Authorize and Capture requests are not supported in a payment page flow.

  • When using the BodyBuilder to generate sample requests, make sure to choose the Payment Page payment type.

Testing

You can use the test cards from the PayU Kenya Test Credentials site.

Last modified March 2, 2023