Tamara
Basic information
Customers review the available payment plan and complete a one-time purchase on the provider’s hosted page.
- Integration paths: Direct API, Checkout, Web SDK
- Transaction type: One-time payment
lpmsInfo.lpmsType:tamara- Web SDK
config.paymentMethod:['tamara']
| Customer country/region | Order currency |
|---|---|
| 🇸🇦 SA | SAR |
The customer country/region is the billingInformation.country value in the payment request.
This guide covers enabled configurations for physical goods and enabled education-related digital goods. It applies when you collect the customer and product details before creating the payment, as described in Before you begin. Before using another market or order currency, confirm the enabled scope for your merchant account and application with Onerway, then check the current order with List available payment methods.
Before you begin
Complete Setup and confirm that Tamara is enabled. Also confirm transaction limits, the applicable payment validity period, settlement arrangements, and the test procedure. For amount formatting, see Currency and amount validation.
Confirm that your merchant account and application are enabled for Tamara and the product categories you sell. Collect a stable customer identifier, billing name, email, phone number, and country; for physical goods, also collect the delivery recipient’s full contact and address details. Tamara also requires complete recipient details for education-related digital goods in this flow. Use the customer’s actual billing and shipping countries. Configure your notification and return URLs, and store the mapping between your order and the Onerway identifiers.
This is a one-time purchase in the Onerway request: use subProductType=DIRECT and txnType=SALE. Do not create a subscription or supply Onerway installment parameters merely because the customer selects a payment plan on the provider’s page.
For each integration path on this page, prepare the following details before creating the payment. Follow the field conditions of the API you use. The shared API Reference example does not include all of these method-specific details.
| Field | Value for this flow |
|---|---|
merchantCustId | Stable customer identifier in your system; reuse it for the same customer. |
billingInformation | Collected firstName, lastName, email, country, phone, and phoneCountryCode. Follow the API format for the local number and separate country code. |
shippingInformation | Follow the API conditions, including its required email and country. For physical goods, also provide the recipient’s firstName, lastName, phone, phoneCountryCode, city, address, and postalCode. Provide these recipient details for education-related digital goods as well. |
txnOrderMsg.products | Include the product name, quantity, unit price, currency, type, and productAvatarUrl. Categorize merchandise as physical or virtual; retain the API’s distinct types for shipping-fee and discount lines. |
txnOrderMsg.customerPlatform | Your website domain for web purchases or application name for app purchases. |
Encode billingInformation, shippingInformation, and txnOrderMsg as JSON strings. The nested txnOrderMsg.products value is also a JSON string. Follow the product field definitions for amounts and image requirements.
Start the payment
Direct API
- Check List available payment methods for the current order. After the customer selects this method, call Create direct transaction from your server with
productType=LPMS,subProductType=DIRECT,txnType=SALE, andpaymentMode=WEB. SetlpmsType=tamarainlpmsInfo, encoded as a JSON string. - Supply the stable
merchantCustIdand all customer and product details prepared above. EncodebillingInformation,shippingInformation, andtxnOrderMsgas JSON strings, including the nestedtxnOrderMsg.productsJSON string. Include notification and return URLs, and merchant-collected end-user IP, browser, and device information intxnOrderMsg. Use SAR for the order and products; product amounts, discounts, and shipping fees must totalorderAmount.
Select the request example “Redirect local payment request (illustrative)”. It uses Bancontact / BE / EUR to show the shared structure. Replace the method withtamara, use SAR, and supply the actual order together with the customer identifier, billing, recipient, product category and image, andcustomerPlatformdetails described above. Apply the recipient requirements for the actual product type. The example amount does not establish a transaction limit. - Store the returned
paymentIdandtransactionId. Whenstatus=RandactionType=RedirectURL, redirect the customer’s browser toredirectUrl. The response example “Redirect local payment response (illustrative)” shows this shape. For other actions or states, follow Local payment integration. Do not repeatedly create the same order while waiting. - The Tamara page guides the customer through payment. When the customer returns to your site, display the result retrieved from your server. See Request signing for authentication.
Checkout
When locking Checkout to this method, first call List available payment methods for the current order and confirm that the method is returned. When Checkout displays all available methods, Onerway performs this filtering.
- On your server, call Create checkout payment with
productType=ALL,subProductType=DIRECT, andtxnType=SALE. To show only Tamara, setlpmsInfo.lpmsTypetotamara, sendinglpmsInfoas a JSON string. If you omitlpmsInfo, the customer chooses from the methods available for the order. - Submit the stable customer identifier in the top-level
merchantCustId, together with the required billing, shipping, product, return URL, and notification URL fields. EncodebillingInformationandshippingInformationas JSON strings. Keep product and order currencies consistent, and ensure that product amounts, discount entries, and shipping fees add up toorderAmount.
Select the request example “Unified Checkout with all available payment methods”. Replace the order and customer details, use SAR for this flow, supply all the customer and product details listed above, and add this method’slpmsInfoif you want to select only Tamara. Remove the example’scardInfoobject for this flow. The example shows the shared Checkout request structure. - Select the response example “Unified Checkout session created”. Store the returned
paymentIdandtransactionIdagainst your order, then redirect the customer’s browser toredirectUrl. The initialstatus=Umeans that payment has not been completed. - Checkout handles the payment page and subsequent customer interaction. When the customer reaches
returnUrl, display the result retrieved from your server. For signing, redirects, and return handling, see Checkout integration.
Web SDK
This flow uses the default Payment Element with the customer, recipient, and product details above supplied when creating the transaction. The SDK collects device information; this does not replace the customer details.
- On your server, call Create SDK transaction with
productType=ALL,subProductType=DIRECT,txnType=SALE, and an order in SAR. At creation, supply the top-levelmerchantCustId,billingInformation, andshippingInformation. Include products, your website domain ascustomerPlatform, and notification and return URLs intxnOrderMsg. Encode these objects and the nestedproductsvalue as JSON strings as specified by the API. For a standard Web SDK flow, omitpaymentModeandosType; the SDK collects the end-user IP, browser, and device information. - Select the request example One-time SDK payment. Replace the order, customer, and application details, use SAR for the order and products, and supply the method-specific details listed above. Retain the requirements for the actual product type and recipient. Select the response example One-time SDK transaction created and store
paymentIdagainst your order. Initialize the client withpaymentId; do not start this flow using the creation response'sredirectUrl. - Follow Web SDK integration to create a Checkout instance, register event listeners, and then mount the Payment Element. To display only Tamara, set
config.paymentMethod=['tamara']and check thattamarais present inavailablePaymentMethodsfrom thereadyevent. Filtering narrows the methods available for the order; it does not enable an unavailable method. - When the customer selects Tamara and confirms payment, call
confirmPayment()and let the SDK handle the customer interaction. ForpaymentStatus=RwithnextAction.type=PresentToShopper, retain the same Checkout instance and mounted Payment Element, and wait forpayment_resultwithout confirming again. ForRedirectShopper, query the result on your server when the customer returns toreturnUrl. Do not assume that every payment uses the same action. - Follow the customer and final-result steps below. SDK events, a displayed page, or a browser return do not replace server-side notification and query handling. The logistics-upload requirements after delivery of physical goods also apply to this path.
Customer actions and final result
Customers open the Tamara page, sign in or create an account, and complete the requested verification. They review the available payment plan, purchase amount, and payment schedule, supply the payment details requested on that page, and confirm the purchase. If an initial payment is required, they complete it as instructed.
Tamara determines the options available for the customer and purchase. Do not promise approval, a fixed number of installments, or interest-free terms. Customers may leave before completing the process; reaching your return URL or selecting a plan does not confirm payment. Your application does not collect the provider’s account credentials or verification codes.
Process the order using a signature-verified payment result webhook. If no notification has arrived or you need to check the result, call Query payments with the stored paymentId. Fulfill the order only after your server confirms a successful payment. For verification, acknowledgement, idempotency, and query fallback, see Webhooks.
Delivery information and settlement
For physical goods, fulfill the order after your server confirms successful payment. Once the package has actually been delivered and signed for, call Upload logistics information for that successful transaction. Use its original transactionId, select carrierNo from the linked carrier list, and submit the real trackingNo. The API Reference contains the shared request example and signing requirements.
Payment success and settlement eligibility are separate. Delivery information is used for subsequent settlement processing; a successful upload response does not mean that settlement funds have arrived. Submitting the same transactionId again replaces the saved logistics information, so verify corrections before resubmitting.
For enabled education-related digital-goods purchases, you do not upload logistics information.
Refunds and disputes
Confirm the refund capabilities, restrictions, and dispute process applicable to your merchant with Onerway. If refunds are enabled, follow Refunds.
Testing and go-live
Confirm the test environment and available Tamara test procedure with Onerway, then follow Sandbox testing:
- Test each path you use with SAR and the customer, product, and recipient details required for the product type. For the Direct API, check that the returned redirect opens the Tamara payment page. For Checkout, check that the first
redirectUrlopens Checkout and Tamara is available before proceeding to the payment page. For Web SDK, verify thatreadyincludestamara, the default component allows selection, and confirmation handles the returned action. A customer cancelling or clicking repeatedly must not create or confirm duplicate payments. - Open the Tamara page and check the customer verification, purchase details, and available plan. Complete the agreed payment test, including an initial payment if required, and verify the result on your server. Opening the page or selecting a plan alone does not pass the successful-payment check.
- Test a customer leaving before payment, failed verification or payment, and a return to your site before a final result. Verify query fallback when no notification has arrived and idempotent handling of duplicate notifications. For physical goods, separately verify the agreed logistics-upload procedure after the package has been delivered and signed for; do not use fabricated shipment details.
- For go-live acceptance, retain the notification and acknowledgement for the same order. Query the payment status and check that it matches the notification. Check production enablement, notification and return URLs, limits, and validity periods. Test refunds separately if they are enabled.
stc pay
Accept stc pay payments through the Direct API, Checkout, or Web SDK with customer and product details supplied in advance, confirm payment on your server, and handle delivery information for settlement.
Tabby
Accept Tabby payments through the Direct API, Checkout, or Web SDK with customer and product details supplied in advance, confirm payment on your server, and handle delivery information for settlement.