v1

latestOpenAPI 3.0.02026-07-2417129274.8 KB
OTP Recover (Sync flow)

Initiate OTP

Triggers an OTP SMS to the customer if the order is eligible for recovery. This call should be triggered from the backend after receiving a “declined” response and that the order is eligible for OTP process from /api/decide. The response will provide the widget token which is the JWT (JSON Web Token) for the OTP widget.

post/initiate

Headers

x-riskified-shop-domainstring required
Example:merchant.example.com

The merchant shop domain registered with Riskified.

x-riskified-hmac-sha256string required
Example:b1946ac92492d2347c6235b4d2611184

Verification hash for the Request. Generated by performing an SHA256 encryption on the request's POST body and calculating the HMAC hash of the result using your Riskified authentication token. Please use UTF8 encoding.

content_type'application/json' required

As payloads are sent to Riskified in JSON format, value should be: application/json

accept'application/vnd.riskified.com; version=2' required

Specify the version of the API to target. For example, to target the latest version of the API, use the following: application/vnd.riskified.com; version=2

Request body

idstring required

The unique identifier for the order

challenge_access_tokenstring required

A unique token generated by the merchant. It is used to validate that the order matches the OTP after a successful OTP verification. This is critical to ensure that users cannot tamper with the OTP verification process. The token has to be at least 32 characters long and hard to guess - we recommend on using UUID

localization_language'en-US' | 'es-ES' | 'fr-FR' required

The widget localization language. The language codes currently supported:

  • “en-US” (English US)
  • “es-ES” (Spanish Spain)
  • “fr-FR” (French France)

Contact your Integration Engineer for instructions on expanded language support.

contact_detailsstring

The merchant’s support contact email

Response

Widget token successfully returned

widgetTokenstring

The JWT (JSON Web Token) for the OTP widget