Web Checkout

Accepting Payments via Web Checkout

Our Web Checkout integration option is best used for accepting payments through websites, but can also be used in mobile applications as a webview. To use our Web Checkout you simply need to generate a payment link and redirect your users there so they can complete payment. Below is an example of how to generate a payment link using our API:

Before you begin, make sure you understand the difference between Test and Live Mode as this will affect how your integration works.

Security and Compliance

Our Web Checkout solution is built with security as a priority, following guidelines from:

End point: https://gateway.yallapaysudan.com/api/v1/gateway/generatePaymentLink

HTTP Method: POST

Authorization: Pass your authorization token (Which you can find in the dashboard) as a bearer token in the header.

Request Parameters:
ParameterDescriptionRequired/Optional
amountThe amount to be debited from the customers accountRequired
paymentSuccessfulRedirectUrlThe URL used to redirect the customer after a successful paymentRequired (If not provided will default to the value provided in the dashboard)
paymentFailedRedirectUrlThe URL used to redirect the customer after a failed paymentRequired (If not provided will default to the value provided in the dashboard)
clientReferenceIdA unique ID that identifies the transaction on your backend. Will be used in the webhook request to update payment status.Required
descriptionA description of the payment to display to the customer at checkoutOptional
subscriptionConfigurationObject to configure recurring subscription payments. If provided, the payment becomes a subscription.Optional

For more advanced integration needs, you might want to consider our Direct API which provides more control over the payment process.

Example request:
REQUEST
JSON
Header:
{
  "Authorization": "Bearer <Authorization-Token>"
}

Body:
{
  "amount": 15,
  "paymentSuccessfulRedirectUrl": "https://your-successful-redirect-url",
  "paymentFailedRedirectUrl": "https://your-failed-redirect-url",
  "clientReferenceId": "7ff632fc-3e5b-4be5-b2a0-dbe2600e7789",
  "description": "Test payment",
  "subscriptionConfiguration" : { // Add this object to make the payment a subscription
      "interval": "MONTH", // Accepted values are DAY, MONTH, YEAR
      "intervalCycle": "2", // Every 2 intervals (e.g., months or days)
      "totalCycles": "10" // Optional. This is the total number of recurring payments to be made. If left null then the default is infinite (never ending subscription)
  }
}
Subscription notes:
  • subscriptionConfiguration is optional: Include it only when you want the payment to become a recurring subscription.
  • Field requirements inside subscriptionConfiguration:
    • interval: Required (Accepted values: DAY, MONTH, YEAR)
    • intervalCycle: Required (e.g., 2 means every 2 intervals)
    • totalCycles: Optional — if omitted, the subscription continues indefinitely
subscriptionConfiguration keyDescriptionRequired/Optional
intervalFrequency unit for billing (DAY, MONTH, YEAR)Required
intervalCycleNumber of intervals between charges (e.g., 2 means every 2 months)Required
totalCyclesTotal number of billing cycles before auto-cancel. If omitted, it never ends.Optional
Example successful response:
RESPONSE
JSON
{
  "responseCode": "0",
  "responseMessage": "Success",
  "currentDate": "2025-06-22",
  "currentTime": "13:25:20",
  "paymentUrl": "https://gateway.yallapaysudan.com/checkout/web/01JXF7HSW4P9FCG9YN6Z"
}

Best Practices for Web Checkout

When implementing our Web Checkout, consider these best practices:

  1. Secure Redirects: Follow Google's Web Fundamentals guide on Navigation and Redirects to ensure secure redirects.
  2. User Experience: Design your payment flow according to Nielsen Norman Group's checkout usability guidelines.
  3. Mobile Optimization: Ensure your checkout process is mobile-friendly as recommended by Google's Mobile-Friendly Test.

For a comprehensive overview of how our payment system works, check out our System Overview documentation.