Supported workflows
| Workflow | Supported |
|---|---|
| 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:- Set up a Checkout.com integration in your workspace. Follow the Checkout.com integration setup guide if you don’t have one yet.
- Ask Checkout.com support to enable STC Pay on your Checkout.com account.
- In the Payrails Portal, go to Settings → Integrations, open your Checkout.com integration, select STC Pay under Payment methods, and save.
- 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 withstcPay as the paymentMethodCode.
Authorize request
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 indata.otp. Send the request to the requiredAction.href link.
Confirm request
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.