POS Integration
Steps to Integrate POS
Register with Tabby and finish the application
Collect the Test API Keys and Merchant codes from Tabby Merchant Dashboard or your Tabby Account manager
Set up the Tabby session creation from your terminal
Make sure a payment link is successfully shown as a QR code on the POS screen
Set up Payment Processing on your Backend. This can be done manually from the POS or set to automatically check until updated.
Once the payment is complete - print the receipt for the customer
Test your Integration, contact Tabby Integrations Team in the Integration email thread to complete the testing process
After successful testing passed receive the Live API keys and deploy to production
Create Session and Payment Using Checkout API
Call the Create a session API. The required Request parameters for the POS session:
Background Pre-scoring Checks
As a response you receive one of the two session statuses - “created”
or “rejected”
:
- if the session status is
“created”
- save the session_id (it will be required for cancellation step) and payment_id (will be required for payment verification and refund steps) received in the response:
- if the session status is
“rejected”
- inform the cashier that the customer is not eligible for Tabby and offer the customer an alternative payment method. Please, do not proceed with any further steps with Tabby. The response payload will containt the following:
The “rejection_reason”
field can take the following values, you may add human readable messages from below to your system (optional):
Reason | English | Arabic |
---|---|---|
General Rejection (not_available ) | Sorry, Tabby is unable to approve this purchase. Please use an alternative payment method for your order. | نأسف، تابي غير قادرة على الموافقة على هذه العملية. الرجاء استخدام طريقة دفع أخرى. |
order_amount_too_high | This purchase is above your current spending limit with Tabby, try a smaller cart or use another payment method | قيمة الطلب تفوق الحد الأقصى المسموح به حاليًا مع تابي. يُرجى تخفيض قيمة السلة أو استخدام وسيلة دفع أخرى. |
order_amount_too_low | The purchase amount is below the minimum amount required to use Tabby, try adding more items or use another payment method | قيمة الطلب أقل من الحد الأدنى المطلوب لاستخدام خدمة تابي. يُرجى زيادة قيمة الطلب أو استخدام وسيلة دفع أخرى. |
Show QR Code
When the session has status “created”
you will receive the QR code link in the response. The path is available_products.installments[].qr_code
.
Payment Processing
Check the payment status using the Retrieve Payment API call. We recommend calling the Retrieve API every 10 seconds until a terminal status is received. Alternatively, you can add a “Check status” button on the POS terminal to manually check this.
The following statuses can be received:
CREATED
- the payment has not been completed yet, wait for it to change to one of the terminal statuses.AUTHORIZED
orCLOSED
- a payment was placed successfully, mark orders as successful, print a receipt and proceed with the order on your POS/OMS.REJECTED
orEXPIRED
- a payment is not successful. Ask the customer to pay with a different payment method.
Cancel a Payment
A request to cancel a payment is available in the Postman collection.
You can cancel a payment in two scenarios:
- The customer changes their mind, and the cashier presses the “Cancel” button on the POS.
- Automatically, after a timeout period. The recommended period is 300 seconds, but the timeout should never be less than 180 seconds.
The payment can only be canceled if its status is CREATED
. Once canceled - the status will change to EXPIRED
.
If the payment has already been authorized, attempting to cancel it will return the following error: 400 Bad Request
In this case check the payment status via the Retrieve Payment API call and verify the status is AUTHORIZED
or CLOSED
. Then show a success screen, print a receipt and proceed with the order.
The Cancel API does not refund payments and can only be used to expire not finalised sessions. Once the payment receives one of the terminal statuses - AUTHORIZED
, CLOSED
, REJECTED
or EXPIRED
- the session cannot be cancelled.
Refund a Payment
You can process a full or partial Refund. Call Refund API for a specific Payment ID with the desired amount. You can find the payment.id
by matched payment.order.reference_id
in your OMS.
You can also process a refund from the Tabby Merchant Dashboard.
Only payment in status CLOSED
with a captured amount present in the “captures”:[]
array of objects can be refunded.
On Merchant Dashboard such payment will have status CAPTURED
.
Print a Receipt
Show your success screen and print a receipt. The receipt data can be used to identify the order and payment, and (optionally) initiate a refund if your POS system provides this functionality.
Receipt data template |
---|
Merchant Order / Transaction ID |
Date and Time |
Tabby logo |
Tabby Payment ID (optional) |
Merchant name (optional) |
Recommended Designs
Native Screen POS Journey
Testing Scenarios
Kindly verify that your integration can handle all listed below scenarios.
1. Payment Success
Testing Steps:
- Choose Tabby on the POS terminal and enter the payment amount.
- Show the QR code on the POS terminal for the customer to scan.
- On Tabby Checkout page use these credentials:
- Complete the payment using
OTP:8888
on Tabby HPP. - Verify that the capture of the successful payment occurred - check for status
CAPTURED
on the Merchant Dashboard or Payment statusCLOSED
via Retrieve Payment API call.
Expected Results:
- Tabby is present among payment methods on POS terminal.
- Session creation response has status
“created”
- the customer is eligible to use Tabby. - A QR code is shown successfully on the POS screen.
- Tabby Hosted Payment Page opens.
- The success Tabby screen appears.
- Order is captured:
- on Merchant Dashboard payment status is
CAPTURED
- via a Retrieve Payment API call response Payment status is
CLOSED
, captured amount is present in the“captures”:[]
array of objects.
- on Merchant Dashboard payment status is
If a payment status remains NEW
on the Merchant Dashboard or AUTHORIZED
via Retrieve Payment API call - kindly contact your Tabby Account manager or partner@tabby.ai
to review the situation.
2. Background Pre-scoring Reject
Testing Steps:
- Choose Tabby on the POS terminal and enter the following based on the data you pass in:
- if you do not pass a phone number in a session creation request - enter the payment amount to be over the max limit, set for your store from Tabby side. To learn the set limit kindly contact your Tabby Account manager or
partner@tabby.ai
. - if you pass a phone number in a session creation request - use the following phone numbers:
- if you do not pass a phone number in a session creation request - enter the payment amount to be over the max limit, set for your store from Tabby side. To learn the set limit kindly contact your Tabby Account manager or
- Attempt to create session and payment with Tabby.
Expected Results:
- Tabby is present among payment methods on POS terminal.
- Session creation response has status
“rejected”
- the customer is not eligible to use Tabby. - Tabby payment method becomes hidden or marked unavailable, the following message can be shown (optional):
- English: Sorry, Tabby is unable to approve this purchase, please use an alternative payment method for your order.
- Arabic: نأسف، تابي غير قادرة على الموافقة على هذه العملية. الرجاء استخدام طريقة دفع أخرى.
- Another payment method should be selected on POS terminal.
3. Payment Cancellation
Testing Steps:
- Choose Tabby on the POS terminal and enter the payment amount.
- Show the QR code on the POS terminal for the customer to scan.
- Leave or abandon Tabby Checkout page.
- You may also cancel the session from your POS terminal.
Expected Results:
- Tabby is present among payment methods on POS terminal.
- Session creation response has status
“created”
- the customer is eligible to use Tabby. - A QR code is shown successfully on the POS screen.
- Tabby Hosted Payment Page opens.
- After the payment is left / abandoned / cancelled a new session can be created from POS terminal.
- No order appears on the Merchant Dashboard (unsuccessful orders are not displayed on the Dashboard).
- On checking Payment Status via Retrieve Payment API call it should be:
- first -
CREATED
as the payment has not been completed; - after the cancellation from your side -
EXPIRED
; - if no cancellation has been sent from your side -> after the set timeout - recommended 300 seconds and not less than 180 seconds -
EXPIRED
; - if no cancellation from your side and no timeout is set -> after 20 minutes from opening the QR (sometimes plus additional 10-20 minutes) -
EXPIRED
.
- first -
By default, Tabby session expires after 20 minutes since creation and customer is not able to continue the session. However, a payment status may change to EXPIRED
after additional 10-20 minutes due to more checks and awaiting a bank confirmation whether a downpayment was paid.
4. Payment Failure
Testing Steps:
- Choose Tabby on the POS terminal and enter the payment amount.
- Show the QR code on the POS terminal for the customer to scan.
- On Tabby Checkout page use these credentials:
- Finish the payment using
OTP:8888
in Tabby HPP. - Verify the payment status via Retrieve Payment API.
Expected Results:
- Tabby is present among payment methods on POS terminal.
- Session creation response has status
“created”
- the customer is eligible to use Tabby. - A QR code is shown successfully on the POS screen.
- Tabby Hosted Payment Page opens.
- The rejection screen with the message ‘We can’t approve this purchase’ appears.
- Tabby payment method is still available for selection on POS terminal.
- No order appears on the Merchant Dashboard (unsuccessful orders are not displayed on the Dashboard).
- On checking Payment Status via Retrieve Payment API call it should be
REJECTED
.
Postman Collection
- Download the JSON file.
- Import the JSON file from the downloaded archive into Postman.
- Enter your Tabby
Secret API Key
andmerchant_code
into the appropriate Collection Variables.
POS API Collection
The name of the collection is “Custom PL” - this is an expected behaviour as Custom Payment Links flow includes all the POS steps and can be used for both types of integration.