WebSDK query parameters
The OSL Pay WebSDK supports passing query parameters via the URL Query String
You can use these parameters to customize the payment flow, pre-fill user information, configure callback URLs, and ensure transaction security and compliance.
- **Passing method: **All parameters are passed through the URL Query String.
- **Encoding requirement: **Certain parameter values must be URL-encoded to avoid parsing errors caused by special characters.
Parameter | Description | Required | Notes |
---|---|---|---|
appId | Your unique identifier. You will receive an appId after signing the contract. | Yes | |
merchantOrder | Your order number to track OSL Pay orders. Used for idempotency checks. | No | |
crypto | The cryptocurrency the user wants to purchase. See supported crypto list. Contact us if your desired crypto is not supported. | No | |
network | The blockchain network corresponding to the selected crypto. See supported crypto and network list. The crypto and network must match; otherwise, the values will be ignored. | No | |
fiatCurrency | The fiat currency the user will pay with. See supported fiat currencies. | No | |
amount | The fiat amount to be paid. See fiat limits. | No | |
payWayCode | Supported payment method:
Credit/debit card: | No | Amounts are strictly validated against limits; otherwise, users will be redirected to the Buy Crypto page to enter the amount again. |
User’s email. Pre-filled on the login page. The user must still enter the email verification code unless the accessToken is also provided. | No | Specified payment method: If both the order and the user’s device support it, the user can only pay with the specified method. **Unsupported or not specified: **The system defaults to CARD payment, and the user can choose from other supported methods on their device. | |
accessToken | To enhance user experience, you may pass the | No | Note: Do not use this parameter unless the user’s email is confirmed. |
address | Specified address with validation: When the user provides a crypto address, the system will verify whether it matches the crypto and network of the order. If the validation passes, the user will skip the address confirmation page, and the crypto will be sent directly to the specified address. Validation fails or no address specified: The parameter will be discarded, and the user will need to enter the receiving address manually on the address input page. | No | |
merchantUser | Off-chain mode required: This is the user’s unique identifier on the merchant side. When this parameter is passed, the user will skip the address confirmation page. On-chain mode required for wallet-type merchants: merchantUser must be bound to the user’s email. Once the binding is established, the user cannot log in with a different email. | Required when | |
successUrl | The URL to which the user is redirected after successful payment. If this parameter is not provided, the user will be redirected to the address you specified during onboarding. | No | Before passing the query parameter value, use |
failUrl | The URL to which the user is redirected after payment failure. If this parameter is not provided, the user will be redirected to the address you specified during onboarding. | No | Before passing the query parameter value, use |
callbackUrl | The webhook push URL. If this parameter is not provided, OSL Pay will push notifications to the address you specified during onboarding. | No | Before passing the query parameter value, use |
checkType | For wallet merchants, this parameter specifies the function to be completed by WebSDK.
| No | |
redirectUrl | The URL to which the user is redirected after wallet merchant authorization is completed. | Required when | Before passing the query parameter value, use |
useBorder | True/False, default is 'True' Desktop (width ≥ 480px): A fixed card layout is always used, regardless of the Mobile (width < 480px): When | No | |
locale | Default language parameter. See supported languages. | No | |
sign | Required when | Required when |
Updated 3 days ago