# 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 The payload example for a session creation request with all required fields for a direct API custom integration can be found here: ```JSON theme={"dark"} { "payment": { "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": { "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": { "city": "Dubai", // required. Name of city, municipality, or village "address": "Dubai", // required. Building name, apartment number "zip": "1111" // required. Postal code }, "order": { "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": [ { "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": { "registered_since": "2023-11-07T05:31:56Z", // required. Date and time the customer got registred with you "loyalty_level": 0, // required. 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": [ { "purchased_at": "2023-11-07T05:31:56Z", // required. Date and time the order was placed "amount": "100", // required. Up to 2 decimals for UAE and KSA, e.g. 100.00 "payment_method": "card", "status": "new", // required. Status of the order "buyer": { "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": { "city": "Dubai", // required. Name of city, municipality, or village "address": "Dubai", // required. Building name, apartment number "zip": "1111" // required. 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 }' ``` # 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. * 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, Kuwait** | `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. | Contact | UAE, Kuwait | 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: