Skip to main content
Accept STC Pay payments from customers in Saudi Arabia with Checkout.com as the payment service provider (PSP). The customer enters the mobile number registered to their STC Pay wallet, then confirms the payment with the one-time code that STC Pay sends by SMS.

Supported workflows

WorkflowSupported
Payrails SDK✔
Payrails API✔
Delayed / Manual Capture✖
Instant Capture✔
Cancel / Void✖
Refund / Reverse✔
Save Instruments✖
Merchant Initiated Transaction (MIT)✖

Before you begin

Complete these steps before you send your first STC Pay payment through Checkout.com:
  1. Set up a Checkout.com integration in your workspace. Follow the Checkout.com integration setup guide if you don’t have one yet.
  2. Ask Checkout.com support to enable STC Pay on your Checkout.com account.
  3. In the Payrails Portal, go to Settings → Integrations, open your Checkout.com integration, select STC Pay under Payment methods, and save.
  4. Add STC Pay as a payment option in your workflow.

Request fields for Checkout.com

Send these fields in the authorize request, in addition to the standard authorize fields. Required fields must be present for the payment to succeed. Payrails sends Optional fields to the PSP when you include them. STC Pay sends the one-time code to the phone number in the payer fields, so send the number there. The Payrails SDK collects it for you. To confirm the payment, send the code in the confirm request:

Authorize an STC Pay payment

Call authorize a payment with stcPay as the paymentMethodCode.
Authorize request
STC Pay sends the customer a one-time code by SMS. The payment stays in authorizePending, and the execution’s requiredAction has the type collectInput with the confirm link in requiredAction.href.

Confirm the payment with the code

Ask the customer for the code, then confirm the payment with the code in data.otp. Send the request to the requiredAction.href link.
Confirm request
After you send the code, the payment stays in authorizePending until Checkout.com sends the final result. Confirm the result through webhook notifications or the execution status before you fulfill the order. The Web SDK shows STC Pay when your workflow returns it as a payment option. The SDK collects the customer’s phone number, then shows a screen where the customer enters the code STC Pay sends by SMS and clicks Confirm. Follow How to accept APMs without a redirect for the full integration, including how to change the form’s appearance and texts.
STC Pay is supported in Web SDK version 6.10.0 onwards.

How Checkout.com handles STC Pay

  • Payrails creates the STC Pay payment through the Checkout.com Payment Setup API. Checkout.com needs no payment token for STC Pay.
  • Payrails checks the phone number before it calls Checkout.com, and sends it to Checkout.com on the customer.
  • The code is valid for 5 minutes.
  • Payrails sends the merchant reference to Checkout.com, cut to 80 characters.
  • Checkout.com sends the final result as a webhook notification.
  • Each STC Pay payment is a new customer-initiated payment.
Last modified on November 3, 2026