new RampnowSdk(config), useRampnowSdk(config) or RampnowSdk.createRedirectUrl(config). The SDK sends each order and display option to the widget as a URL parameter of the same name, so these are the same parameters the Widget takes.
SDK options
These options control the SDK itself and are not sent to the widget:apiKey is required: the constructor throws [RampnowSdk] apiKey is required without it.
Order and display options
In the SDK,lockFields is an array (['srcAsset', 'dstAsset']) and boolean options take true. You don’t need to set prefill; the SDK adds it whenever paymentMode is set.
Order details
Defaults. Every parameter except
apiKey is optional, and a missing or invalid value never shows an error to the user. Rampnow fills the gaps from your account’s live configuration: the first listed asset for the direction (usually the user’s local fiat for buy), a typical amount for that currency, and the first active payment or payout method for the asset. Pass the values you care about rather than relying on these.
Valid currency and chain codes, and the payment methods enabled for your account, are listed under What’s Supported. Values are case-sensitive: paymentMode=SEPA is ignored, paymentMode=sepa works.
Display options
Attribution
skipPaymentInstructions
SDK option, boolean. On a sell order, skips the crypto transfer instructions screen and shows a waiting screen instead. Use it when your wallet sends the crypto itself after the ORDER_CREATED event, then pass the hash with the UPDATE_PAYMENT_DETAIL command.
Next: Display modes
Overlay, embedded or redirect