### Render Tabby Installments Snippet
Source: https://docs.tabby.ai/e-commerce-platforms/shopify/shopify-snippets
This command should be placed near the price element in your theme files (e.g., product.liquid, main-product.liquid) to render the Tabby installments snippet on your storefront.
```Liquid
{% render 'tabby-installments' %}
```
--------------------------------
### GET /llms.txt
Source: https://docs.tabby.ai/api-reference/checkout/create-a-session
Retrieves the complete documentation index for the Tabby AI project.
```APIDOC
## GET /llms.txt
### Description
Fetches the complete documentation index to discover all available pages within the Tabby AI documentation.
### Method
GET
### Endpoint
https://docs.tabby.ai/llms.txt
```
--------------------------------
### API Integration Guide
Source: https://docs.tabby.ai/api-reference/overview
Quick links to essential resources for integrating with the Tabby API.
```APIDOC
## Quick Links to Documentation
* [Direct API Integration Guide](/pay-in-4-custom-integration/quick-start)
* [Testing Credentials](/testing-guidelines/testing-credentials)
* [Postman API Collection](/testing-guidelines/postman-api-collections)
```
--------------------------------
### Complete Product and Cart Snippet Implementation
Source: https://docs.tabby.ai/pay-in-4-custom-integration/on-site-messaging
A full example showing the HTML structure and script initialization for the product and cart promo snippet.
```HTML
```
--------------------------------
### GET /webhooks
Source: https://docs.tabby.ai/api-reference/webhooks/retrieve-all-webhooks
Retrieves a list of all registered webhooks in the system.
```APIDOC
## GET /webhooks
### Description
Retrieves all registered webhooks.
### Method
GET
### Endpoint
/webhooks
```
--------------------------------
### Create Tabby Installments Snippet
Source: https://docs.tabby.ai/e-commerce-platforms/shopify/shopify-snippets
Create a new file named 'tabby-installments.liquid' in the Snippets folder. Ensure variables like publicKey, merchantCode, and priceElement are configured correctly for your store.
```HTML
{%- liquid
assign sectionId = section.id
assign lang = localization.language.iso_code
-%}
```
--------------------------------
### Manually Set Tabby Extension Version
Source: https://docs.tabby.ai/e-commerce-platforms/magento-2/magento-2-plugin-installation
If a 'Higher matching version' error occurs during installation, manually specify the required version in your composer.json file or via the command line.
```bash
tabby m2-payments >= 7.0.1
```
--------------------------------
### Get Disputes List using cURL
Source: https://docs.tabby.ai/api-reference/disputes
Use this cURL command to retrieve a list of disputes. Ensure you replace `` with your actual Bearer token for authorization.
```bash
curl --request GET \
--url https://api.tabby.ai/api/v1/disputes \
--header 'Authorization: Bearer '
```
--------------------------------
### Handle Tabby Eligibility Rejection
Source: https://docs.tabby.ai/introduction/faq
Example of the status and rejection reason returned in the Tabby Session creation response when a customer is ineligible.
```json
"status": "rejected",
"configuration"."products"."installments"."rejection_reason": "not_available"
```
--------------------------------
### JSON Phone Number Example
Source: https://docs.tabby.ai/introduction/technical-requirements
Accepts various mobile phone formats, using the UAE +971 mask as an example.
```json
{
"phone": "+971500000001" // OR "971500000001", "500000001", "0500000001"
}
```
--------------------------------
### Initialize TabbyPromo Component
Source: https://docs.tabby.ai/pay-in-4-custom-integration/on-site-messaging
Load the Tabby promo script and initialize the component with required merchant credentials and product details.
```HTML
```
--------------------------------
### Implement Android File Chooser with ActivityResultContracts
Source: https://docs.tabby.ai/pay-in-4-custom-integration/mobile-apps/integration-without-sdk
Uses PickVisualMedia to launch the system image picker and handle the result via a callback.
```kotlin
var uploadMessageCallback: ValueCallback>? = null
val fileChooserContract = registerForActivityResult(ActivityResultContracts.PickVisualMedia()) { result ->
val callback = uploadMessageCallback ?: return@registerForActivityResult
val URIs = result?.let { arrayOf(it) }
callback.onReceiveValue(URIs)
uploadMessageCallback = null
}
// Web chrome client implementation here. This implementation should be set to your WebView.
object : WebChromeClient() {
override fun onShowFileChooser(
webView: WebView?,
filePathCallback: ValueCallback>?,
fileChooserParams: FileChooserParams?
): Boolean {
uploadMessageCallback = filePathCallback
fileChooserContract.launch(
PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly)
)
return true
}
}
```
--------------------------------
### Initialize WebView with Custom WebChromeClient
Source: https://docs.tabby.ai/pay-in-4-custom-integration/mobile-apps/integration-without-sdk
Sets a custom WebChromeClient instance to a WebView object.
```kotlin
WebView(context).apply {
webChromeClient = object : WebChromeClient() {
// Custom implementations.
}
}
```
--------------------------------
### GET /api/v2/checkout/{id}
Source: https://docs.tabby.ai/openapi.yaml
Retrieves an existing checkout session by its ID.
```APIDOC
## GET /api/v2/checkout/{id}
### Description
Use this API to retrieve the token (only if tokens used in your integration).
### Method
GET
### Endpoint
/api/v2/checkout/{id}
### Parameters
#### Path Parameters
- **id** (string) - Required - The unique identifier of the checkout session
```
--------------------------------
### GET /api/v2/payments/{payment.id}
Source: https://docs.tabby.ai/offline-payment-methods/pos-integration
Retrieves the current status of a specific payment.
```APIDOC
## GET /api/v2/payments/{payment.id}
### Description
Retrieves the status of a payment using the payment ID.
### Method
GET
### Endpoint
/api/v2/payments/{payment.id}
### Parameters
#### Path Parameters
- **payment.id** (string) - Required - The unique identifier of the payment.
```
--------------------------------
### Handling Multiple WebView Permissions (Java)
Source: https://docs.tabby.ai/pay-in-4-custom-integration/mobile-apps/integration-without-sdk
Implements a WebChromeClient to handle permission requests for WebView resources. It checks for runtime permissions and launches a launcher to request them if not granted.
```java
import android.webkit.PermissionRequest;
import android.webkit.WebChromeClient;
import androidx.activity.result.ActivityResultCallback;
import androidx.activity.result.ActivityResultLauncher;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class PermissionRequester implements ActivityResultCallback