Skip to main content
Tabby’s Buy Now, Pay Later solution allows your customers to split the purchase price into several payments with the downpayment and monthly repayments.
1
2
3

Tabby on Checkout

Use the standard Tabby naming and Logo to present Tabby method at your checkout.
EnglishArabic
Payment Method NamePay later with Tabbyادفع لاحقًا عبر تابي
Payment Method DescriptionUse any cardاستخدم أي بطاقة
Tabby payment method

Background Pre-scoring Check

Background pre-scoring (also known as eligibility check) determines whether a customer is eligible to use Tabby before displaying it as a payment option. This check takes place at your checkout when the total amount and customer contact details are known.
For detailed implementation including when to perform checks, error handling, caching strategies, rejection messages, and complete code examples, see: FAQ - Eligibility Check Best Practices

Quick Implementation

Call POST https://api.tabby.ai/api/v2/checkout endpoint with minimal required data (but more is better): amount, currency, buyer.email, buyer.phone, and merchant_code. Providing additional details like order.items, shipping_address, and customer information - buyer_history, order_history, etc. - helps improve scoring accuracy and increases approval rates.

Response handling

Check the status field to determine eligibility:
  • status: "created" → customer is eligible, show Tabby;
  • status: "rejected" → customer is not eligible, hide Tabby or show rejection message.
You can extract the rejection reason from: configuration.available_products.installments[0].rejection_reason

Possible rejection_reason values

Here are possible “rejection_reason” values and corresponding messages to show to customers:
ReasonEnglishArabic
General Rejection (not_available)Sorry, Tabby is unable to approve this purchase. Please use an alternative payment method for your order.نأسف، تابي غير قادرة على الموافقة على هذه العملية. الرجاء استخدام طريقة دفع أخرى.
order_amount_too_highThis purchase is above your current spending limit with Tabby, try a smaller cart or use another payment methodقيمة الطلب تفوق الحد الأقصى المسموح به حاليًا مع تابي. يُرجى تخفيض قيمة السلة أو استخدام وسيلة دفع أخرى.
order_amount_too_lowThe purchase amount is below the minimum amount required to use Tabby, try adding more items or use another payment methodقيمة الطلب أقل من الحد الأدنى المطلوب لاستخدام خدمة تابي. يُرجى زيادة قيمة الطلب أو استخدام وسيلة دفع أخرى.

Best Practices

Key principles:
  • Fail-safe approach - always default to showing Tabby on API errors or timeouts
  • Loading states - show appropriate UI feedback during checks
  • Background checks - perform eligibility checks when customer enters checkout or cart amount changes
  • Rejection handling - hide Tabby (recommended) or show rejection message.
Background pre-scoring rejection message

Eligibility Check vs Session Creation

Tabby’s Checkout API serves two distinct purposes. Here’s a side by side comparison:
AspectEligibility CheckCheckout Session Creation
PurposeDetermine if customer can use TabbyCreate payment session for actual checkout
TimingBefore showing Tabby payment methodWhen customer clicks “Place order”
PayloadMinimal (amount, currency, buyer)Complete (all order details, items, shipping, merchant URLs)
ResponseStatus (created or rejected) + rejection reasonStatus + web_url for redirect + payment.id
Next StepShow or hide / mark unavailable Tabby payment method based on the responseRedirect to Tabby Hosted Payment Page

Checkout Session Initiation

When the customer who passed eligibility check clicks “Place order” with Tabby selected, call Checkout API with the full payload including all order details, items, shipping address, and merchant URLs. This is different from the eligibility check - you must now provide complete order information.

Example of a minimal payload for eligibility check

{
  "payment": {
    "amount": "340.00",
    "currency": "SAR",
    "buyer": {
      "email": "[email protected]",
      "phone": "+966500000001"
    }
  },
  "merchant_code": "your_merchant_code"
}
Key principle: Use the same endpoint (POST /api/v2/checkout) but with different payload sizes for different purposes.

Response and Validation

In a successful response you will receive status, web_url, and payment.id:
Always validate that web_url is present in the response before redirecting. If web_url is missing or status is “rejected”, show the rejection message instead of redirecting.
This validation handles edge cases where:
  • Cart amount or customer details changed between eligibility check and session creation;
  • Customer was blacklisted between checks;
  • Eligibility check timed out (fail-safe showed Tabby as available).
Save “payment”.“id” from the response - it will be used to verify, capture and refund the payment on the next steps.

At Tabby Hosted Payment Page

At Tabby Checkout your customers will be asked:
  • To verify the phone number by OTP (each transaction);
  • To link Apple Pay or regular card (only for new Tabby customers);
  • Additional data may be asked during customer’s flow for some customers.

Redirection to the Store

When customers finish Tabby session, they are redirected to one of three URLs you provide in the session creation request, with payment_id appended as a query parameter:
Redirect URLUse CasePayment StatusNext Steps
successCustomer completed payment verificationAUTHORIZED or CLOSEDShow “Thank you” page, verify status on backend, proceed to Payment Processing
cancelCustomer cancelled the payment willinglyEXPIREDReturn to checkout or cart, allow retry
failurePayment was rejected by TabbyREJECTEDShow rejection message, offer alternative payment methods

Handling redirects

  • Redirect the customer immediately to avoid delays - do not block with payment status checks
  • The redirect is a frontend navigation signal only. Verify payment status asynchronously on your backend via webhooks or getPayment API
  • Show “Confirming payment…” on Thank you page if status is pending, update once backend confirms final status
Always verify payment status via your backend. Never rely on redirect URLs or query parameters alone as the source of truth.

Approved messages for redirects

The following messages can be used to show to customers after a redirect:
ReasonEnglish messageArabic message
CancellationYou aborted the payment. Please retry or choose another payment method.لقد ألغيت الدفعة. فضلاً حاول مجددًا أو اختر طريقة دفع أخرى.
FailureSorry, Tabby is unable to approve this purchase. Please use an alternative payment method for your orderنأسف، تابي غير قادرة على الموافقة على هذه العملية. الرجاء استخدام طريقة دفع أخرى.

Allowed characters in redirect URLs (“success”, “cancel”, “failure”)

  1. Latin letters (a-z, A-Z)
  2. Arabic letters (ء-ي)
  3. Digits (0-9)
  4. Special characters - \ | / : ;., + {}? & @ = # %