Skip to main content

Request: Payment Methods (payment_methods)

PayTabs provides you with a collection of API endpoints which used to process all payments, regardless of if they are through either your own payment pages, the managed payment pages, or if you are using the hosted payment pages.

Caution

This parameter behaving differently according to the integration type you are using (Managed Form, and Own Form).



How this parameter could benefit you?​

Integrating the payment_methods parameter into your payment system can provide a seamless and optimized payment experience for your customers while streamlining your business processes.

  • Tailored Payment Options: The parameter allows you to display specific payment methods on the payment page based on the customer's preferences or regional availability. This ensures a more personalized and convenient experience for the user.

  • Enhanced Conversion Rates: By showing only the most relevant payment methods, you reduce decision fatigue and simplify the checkout process, leading to higher conversion rates and fewer abandoned carts.

  • Improved Customer Satisfaction: Providing customers with their preferred payment options fosters trust and satisfaction, making it more likely for them to return for future transactions.

  • Reduced Transaction Errors: Limiting payment methods to those best suited for a transaction minimizes the chances of processing errors, ensuring smoother operations for both your business and your customers.

  • Increased Security: You can configure the Payment_method parameter to display only secure and verified payment gateways, reducing the risk of fraudulent transactions and improving overall trust in your platform.

Name but a few different Businesses/Industries that can benefit from this API parameter:

The Payment_method parameter isn’t just about improving the customer experience; it also provides substantial benefits across various industries by enabling businesses to align their payment processes with their unique operational needs. Here’s how it can help:

  • E-Commerce Platforms: Streamlines the checkout process by showcasing popular payment methods like credit cards, digital wallets, or Buy Now, Pay Later (BNPL) options, leading to higher conversion rates and reduced cart abandonment.

  • Travel and Hospitality: Allows businesses to offer region-specific payment options for international travelers, such as local payment methods or multi-currency options, creating a more user-friendly experience.

  • Event Management: Event organizers can tailor payment methods for ticket sales, offering group payment options or specific methods for VIP or premium ticket holders.

  • Educational Institutions: AFacilitates tuition payments by enabling students or parents to choose installment-based or one-time payment options, depending on their financial preferences.

  • Healthcare Providers: Supports the inclusion of flexible payment methods such as insurance billing, installment plans, or third-party financing for expensive procedures, ensuring accessibility for patients.


Limitations​


  • Country-Specific Restrictions: Not all payment methods are universally available. Certain payment options may be restricted based on the customer's country or region, potentially limiting accessibility for some users.
  • Profile-Specific Configuration: The available payment methods are limited to those configured in the merchant’s profile. If a specific payment method is not set up in your profile, it will not be available for use. This requires merchants to carefully manage and update their profiles to include all desired payment options.
  • Customer-Specific Limitations: Some payment methods may not work for certain customers due to their account configurations, card types, or banking restrictions, potentially impacting the payment experience.

How To Use?​

Along with the required parameters mentioned in our Step 3 - PT2 API Endpoints | Initiating the payment solution article, you will need to set the "payment_methods" as shown below:

All available Payment Methods

You can send the value "all" to show all available/configured payment methods on your PayTabs account on the payment page.

{
"payment_methods": ["all"]
}
!Tip

This is the default value. In other words, not passing this parameter at all will be the same as passing this "all" value.

Multiple Payment Methods

To initiate a payment page with multiple specific payment methods, you can pass a comma-separated string with all the preferred payment methods, as shown below:

{
"payment_methods": ["creditcard", "valu"] // same as ["all", "-valu", "-aman"]
}
Excluding Payment Methods

You can initiate a payment page with all the configured payment methods, excluding one method or more from being displayed in the payment by adding (-) before the excluded payment method, as shown below:

{
"payment_methods": ["all", "-applepay"]
}



Parameter specifications​

Parameter
payment_methods
Data TypeArray
Required❌
Validation RulesPass one or more of the following list: creditcard amex mada urpay unionpay stcpay stcpayqr valu aman meezaqr omannet knet knetdebit knetcredit applepay samsungpay installment forsa halan tamara amaninstallments souhoola tabby touchpoints paypal sadad
DescriptionTo initiate the payment page with one or more specific payment methods, which should be configured first in your profile and then set array of the valid payment methods.
To know more about this parameter please click here.
Code Sample
{
"payment_methods": [
"applepay",
"valu",
"creditcard",
"-meeza"
]

}



Request & Response Payloads Samples​

The below sample request payload will show you how you can pass the above-mentioned required parameter, which are needed to be passed with valid values to perform a request. Along with the response payload received after using this request payload.

{
{
"profile_id": "987654",
"tran_type": "sale",
"tran_class": "ecom",
"cart_id": "CART#1001",
"cart_currency": "SAR",
"cart_amount": 500,
"cart_description": "Description of the items/services",
"payment_methods": ["creditcard", "valu"]
}


Expected Payment Flow Behavior​

The payment_methods parameter is optional; not passing it within the payment page request payload would be the same as passing the "all" value (as a default), which would create a payment page with all the available payment methods for the merchant profile.

β„ΉYou need to know

Payment methods is depending on transaction classes and currencies. For example, Mada doesn't support recurring, and ValU is only supported for EGP transactions.

Expected Payment Flow Behavior​

  1. As mentioned above in the How to use? section, As a merchant you would initiate a payment request per the above Parameter specifications, same as the sample codes mentioned in the samples section above.

  2. Then, you will receive a response that includes redirect URL. This means you have initiated a correct payment request/page successfully.

    "redirect_url": "https://secure.paytabs.com/payment/page/599458B182E5B6B********************B4818688",

  3. Next, you should redirect your customer to this URL so the payment process can be finalized.

  4. After this, your customer would proceed normally with payment by providing his card information, and choose the preferred payment method. The appearance of the payment page will vary depending on the selected payment method. Each payment method may present a unique layout, fields, or instructions tailored to its specific requirements, ensuring a user-friendly and streamlined experience. Below are examples of how the payment page might look for different payment methods:

    The Payment Page Have Multiple Payment Methods:
    All Payments

    If you select 'All Payment Methods' or do not specify any payment method in your request, the payment page will default to displaying 'All' available options. These options are determined by the payment methods configured in your profile. The customer can then choose their preferred method from the list provided on the payment page

    Payment WorkflowPayment Workflow



    The Payment Page Have One Payment Methods:

    Each payment method had its own payment page view experience, as clarified in the samples below:

    Credit Cards

    If you select the 'Credit Card' payment method, the logos of the applicable card networks (e.g., Visa, MasterCard) will automatically appear on the payment page once the customer enters the first four digits of their card number. This helps the customer quickly identify their card type and provides a smoother payment experience.

    CreditCard: creditcard
    Amex: amex
    mada: mada
    UnionPay: unionpay
    OmanNet Debit: omannet
    KnPay: knet
    KnPay (Debit): knetdebit
    KnPay (Credit): knetcredit

    Payment WorkflowPayment Workflow

    Wallet

    The layout of the wallet payment page will vary depending on the selected payment method. For example, if 'Apple Pay' is chosen, the payment page will display the interface and branding specific to Apple Pay. Similarly, if 'STC Pay' is selected, the page will reflect the design and options unique to STC Pay. This ensures a tailored and seamless experience for each payment method.

    UrPay: urpay
    StcPay: stcpay
    StcPay(QR): stcpayqr
    Meeza (QR): meezaqr
    ApplePay: applepay
    SamsungPay: samsungpay
    PayPal: paypal

    Payment WorkflowPayment Workflow

    Cash

    If you select a cash payment method, such as Sadad or Aman, the payment page will display a specific layout tailored to that method. The customer will be provided with a unique reference number on the payment page, which they can use to complete the payment through the corresponding cash payment service.

    Aman: aman
    Sadad: sadad

    Payment WorkflowPayment Workflow

    Installments

    If you select the installment payment method, the payment page will display a layout specific to this option. The customer will need to enter their card number, and a note will be prominently displayed on the page, indicating that the provided card will be used for installment payments. This ensures the customer is fully informed about the payment process.

    NBE installment: installment
    Aman installments: amaninstallments

    Payment WorkflowPayment Workflow


  5. Then, he will be redirected to his issuer bank 3DS/OTP page to authenticate the used card

  6. Finally, he would be redirect to a success/error page accordingly. By this time, you will be able to see his transaction on your merchant dashboard, whether it's accepted/authorized or not.transaction view

    transaction view

We are glad to be always in help. We aim to serve you better each time. As such, please spare a minute to share feedback about your recent experience with PayTabs Developers , on Trustpilot, or Google Reviews.