# Create a session Source: https://docs.tabby.ai/api-reference/checkout/create-a-session post /api/v2/checkout Creates a Checkout session. Creates Session and Payment, returns Pre-Scoring result (status), ids of Payment and Session. # Session creation payload model Source: https://docs.tabby.ai/api-reference/checkout/session-payload-model ## Request The payload example for a session creation request with all required fields for a direct API custom integration. Fields marked `// required` are mandatory for the full checkout session — the background pre-scoring call accepts a minimal subset. Fields marked `// recommended` are optional, but improve scoring accuracy and approval rates — send them whenever you have the data. The `//` comments are annotations, not part of the payload — strip them before sending. ```jsonc theme={"dark"} { "payment": { // required "amount": "100", // required. Up to 2 decimals for UAE and KSA, e.g. 100.00 "currency": "AED", // required. Use the ISO 4217 standard for defining currencies "description": "test payload", "buyer": { // required "name": "John Doe", // required. Customer's full name "email": "jsmith@example.com", //required. Customer's email address "phone": "500000001", //required. Customer's phone number "dob": "2000-01-20" }, "shipping_address": { // required "city": "Dubai", // required. Name of city, municipality, or village "address": "Dubai", // required. Building name, apartment number "zip": "1111" // required. Postal code }, "order": { // required "reference_id": "1001", // required. Merchant-assigned order number. "updated_at": "2023-11-07T05:31:56Z", "tax_amount": "0.00", "shipping_amount": "0.00", "discount_amount": "0.00", "items": [ // required { "reference_id": "SKU123", "title": "Name of the product", // required. Name of the product. "description": "Description of the product", "quantity": 1, // required. Quantity of the product ordered. Should be >= 1 "unit_price": "0.00", // required. Price per unit of the product. Should be positive or zero. "discount_amount": "0.00", "image_url": "https://example.com/", "product_url": "https://example.com/", "gender": "Kids", "category": "Clothes", // required. Name of high-level category (Clothes, Electronics,etc.) "color": "white", "product_material": "cotton", "size_type": "EU", "size": "M", "brand": "Name of the Brand", "is_refundable": true, "barcode": "12345678", "ppn": "MNXT2ZM/A", "seller": "Name of the Seller" } ] }, "buyer_history": { // required "registered_since": "2023-11-07T05:31:56Z", // required. Date and time the customer got registred with you "loyalty_level": 0, // recommended. Customer's loyalty level within your store "wishlist_count": 0, "is_social_networks_connected": true, "is_phone_number_verified": true, "is_email_verified": true }, "order_history": [ // recommended. 5-10 previous orders { "purchased_at": "2023-11-07T05:31:56Z", // recommended. Date and time the order was placed "amount": "100", // recommended. Up to 2 decimals for UAE and KSA, e.g. 100.00 "payment_method": "card", "status": "new", // recommended. Status of the order "buyer": { // recommended "name": "John Doe", // recommended. Customer's full name "email": "jsmith@example.com", // recommended. Customer's email address "phone": "500000001", // recommended. Customer's phone number "dob": "2000-01-20" }, "shipping_address": { // recommended "city": "Dubai", // recommended. Name of city, municipality, or village "address": "Dubai", // recommended. Building name, apartment number "zip": "1111" // recommended. Postal code }, "items": [ { "reference_id": "SKU123", "title": "Name of the product", "description": "Description of the product", "quantity": 1, "unit_price": "0.00", "discount_amount": "0.00", "image_url": "https://example.com/", "product_url": "https://example.com/", "gender": "Kids", "category": "Clothes", "color": "white", "product_material": "cotton", "size_type": "EU", "size": "M", "brand": "Name of the Brand", "is_refundable": true, "barcode": "12345678", "ppn": "MNXT2ZM/A", "seller": "Name of the Seller" } ] } ], "meta": { "customer": "#customer-id", "order_id": "#1234" }, "attachment": { "body": "{\"flight_reservation_details\": {\"pnr\": \"TR9088999\",\"itinerary\": [...],\"insurance\": [...],\"passengers\": [...],\"affiliate_name\": \"some affiliate\"}}", "content_type": "application/vnd.tabby.v1+json" } }, "lang": "en", // required. Session language "merchant_code": "code provided to you from Tabby side", // required. Merchant's branch code "merchant_urls": { "success": "https://your-store/success", "cancel": "https://your-store/cancel", "failure": "https://your-store/failure" }, "token": null } ``` ## Response A successful session creation returns `200 OK` with this structure (the `payment` object echoes your request payload back, trimmed here for brevity): ```jsonc theme={"dark"} { "id": "e5f9d6c8-...", // session id "status": "created", // "created" | "rejected" | "expired" "payment": { "id": "01a04380-64b8-8432-a20f-904a48584390", // payment id — SAVE IT: used to verify, capture and refund "created_at": "2026-01-20T09:12:00Z", "status": "CREATED", "is_test": true, "amount": "100.00", "currency": "AED" // ...the rest of your request payload echoed back }, "configuration": { "available_products": { "installments": [ { "web_url": "https://checkout.tabby.ai/?sessionId=...&apiKey=pk_test_...&product=installments", "qr_code": "https://api.tabby.ai/api/v2/checkout/.../hpp_link_qr?product_type=installments" } ] }, "products": { "installments": { "type": "installments", "is_available": true, "rejection_reason": null } } }, "merchant_urls": { "success": "https://your-store/success", "cancel": "https://your-store/cancel", "failure": "https://your-store/failure" }, "merchant": { "name": "Your store name" } } ``` What to read from it: * **`status`** — `created` means the customer can pay; `rejected` means hide Tabby or show the rejection message. * **`payment.id`** — save it; all later calls (verify, capture, refund) address the payment by this id. * **`configuration.available_products.installments[0].web_url`** — the Hosted Payment Page link to redirect the customer to. `installments` is an **array**: take the first element. Always validate `web_url` is present before redirecting. * On rejection (`status: "rejected"`), the reason is in `configuration.products.installments.rejection_reason` (`null` in `created` responses), and `configuration.available_products` comes back **empty** — no `web_url` to redirect to. # Register a dispute webhook Source: https://docs.tabby.ai/api-reference/dispute-webhooks/register-a-dispute-webhook post /api/v1/dispute-webhooks Registers a dispute webhook for the merchant identified by the secret key and the `X-Merchant-Code` header. Disputes have no test mode: authorize with a production secret key (`sk_...`) — a request signed with a test key (`sk_test_...`) is rejected with `403`. Each `merchant_code` can have up to 4 dispute webhooks; the limit is separate from payment webhooks. The `url` is normalised before it is stored (lower-case scheme and host, default port and trailing slash removed) and must be unique per merchant. `header.value` is a secret: it is accepted in full and returned masked in every response, including this one — `****` followed by the last 4 characters for values longer than 8 characters, `****` alone for shorter values. This is a public, self-service endpoint. Call `https://api.tabby.ai/api/v1/dispute-webhooks` (`https://api.tabby.sa/api/v1/dispute-webhooks` for KSA) with your **live** secret key and the `X-Merchant-Code` header. How dispute webhooks work, payload and statuses: Dispute webhooks. # Remove a dispute webhook Source: https://docs.tabby.ai/api-reference/dispute-webhooks/remove-a-dispute-webhook delete /api/v1/dispute-webhooks/{id} Removes the specified dispute webhook. # Retrieve a dispute webhook Source: https://docs.tabby.ai/api-reference/dispute-webhooks/retrieve-a-dispute-webhook get /api/v1/dispute-webhooks/{id} Retrieves the specified dispute webhook. `header.value` is returned masked. # Retrieve all dispute webhooks Source: https://docs.tabby.ai/api-reference/dispute-webhooks/retrieve-all-dispute-webhooks get /api/v1/dispute-webhooks Retrieves all dispute webhooks registered for the merchant. Returns an empty array when none are registered. # Update a dispute webhook Source: https://docs.tabby.ai/api-reference/dispute-webhooks/update-a-dispute-webhook put /api/v1/dispute-webhooks/{id} Updates the specified dispute webhook. The request **replaces the whole object**: send both `url` and `header`; omitting `header` removes it. The same URL rules as on registration apply (normalised, unique per merchant). # Approve disputes Source: https://docs.tabby.ai/api-reference/disputes/approve-disputes post /api/v1/disputes/approve Approve disputes (refund money to the customer). Only 20 disputes can be approved within a single request. # Challenge disputes Source: https://docs.tabby.ai/api-reference/disputes/challenge-disputes post /api/v1/disputes/challenge Challenge disputes (request Tabby support to take a look at the case). Only 20 disputes can be challenged within a single request. Only disputes with status 'new' might be challenged. # Get dispute by id Source: https://docs.tabby.ai/api-reference/disputes/get-dispute-by-id get /api/v1/disputes/{disputeId} Returns detailed information about dispute. # Get disputes list Source: https://docs.tabby.ai/api-reference/disputes/get-disputes-list get /api/v1/disputes Returns list of 100 recently created disputes. # Provide evidence for a dispute Source: https://docs.tabby.ai/api-reference/disputes/provide-evidence post /api/v1/disputes/{disputeId}/provide-evidence Provide evidence (text and/or attachments) for a dispute. Used by the merchant to submit proof in response to an evidence request. # Upload attachment Source: https://docs.tabby.ai/api-reference/disputes/upload-attachment post /api/v1/disputes/attachments/upload Upload an attachment. Attachment must be in PNG, JPEG or PDF format and can be up to 5 megabytes in size. Files larger than 5 MB are rejected. # API Reference Documentation Source: https://docs.tabby.ai/api-reference/overview In this part of the documentation all the needed API calls for Tabby Integration can be found and tested: * Checkout - it is a whole process of customer data collection and payment authorization. * Payments - the core of Tabby is a payments flow enabling you to handle payments at your webstore. * Webhooks - serve to ensure a seamless payment verification flow. * Dispute webhooks - notify you when a dispute is opened on your payment or changes its status. * Disputes - help merchants resolve issues with customers orders more efficiently. ## Base URLs Tabby uses region-specific domains. Choose the base URL based on the merchant's operating country: | Region | API Base URL | Checkout / Promo | Merchant Dashboard | | - | - | - | - | | **UAE** | `https://api.tabby.ai` | `checkout.tabby.ai` | `merchant.tabby.ai` | | **KSA** | `https://api.tabby.sa` | `checkout.tabby.sa` | `merchant.tabby.sa` | All API paths and payloads are identical across both domains. Tabby identifies the environment (test or live) based on the API keys used. **Use the base URL that matches the merchant's region for every call.** Many existing integrations call `api.tabby.ai` for all regions and rely on Tabby-side request routing — but not every endpoint is routed (e.g. payments retrieval and disputes), and cross-region calls can return `404`/`403`. New integrations must pin all calls — session creation, payment retrieval, captures, refunds, webhooks, dispute webhooks, disputes — to the regional base URL. | Contact | UAE | KSA | | - | - | - | | **Partner Support** | `partner@tabby.ai` | `partner@tabby.sa` | | **Customer Support** | `help@tabby.ai` | `help@tabby.sa` | ## OpenAPI Specification To access and download the raw OpenAPI specification file kindly use this: [openapi.yaml](https://docs.tabby.ai/openapi.yaml). You can also view this API specification using [ReDoc](https://redocly.github.io/redoc/?url=https://docs.tabby.ai/openapi.yaml), the same is present below: