v1

latestOpenAPI 3.1.0Apache 2.02026-07-2265186296.2 KB
Retail Ramp

Create a crypto widget

Use this endpoint to create a crypto widget for a session to buy or sell crypto.

post/crypto/session/widget

Request body

bypassKycboolean

When true, the system will automatically look up the customer's KYC status and generate a share token if KYC is approved. Requires a valid customerId or externalCustomerId.

customerIdstring

Meld generated unique identifier for your customer. This should be used to track customer activity.

externalCustomerIdstring

Your unique identifier for your customer. If maintaining your own customer management system this can also be used for tracking customer activity.

externalSessionIdstring

Your reference id for your widget session, if you use this optional field you must pass in a unique value each time

externalSubaccountCustomerIdstring

Optional external identifier for the sub-account customer this transaction belongs to. Used for tracking when multiple businesses operate under one Meld account. A sub-account customer must be created first before it can be referenced.

sessionType'BUY' | 'SELL' | 'TRANSFER' required

The type of widget session to create

subaccountCustomerIdstring

Optional Meld customer id used to track the business sub-account this transaction belongs to when multiple businesses operate under one Meld account.

Example request

{
  "sessionData": {
    "kycInfo": {
      "kycProvider": "SUMSUB",
      "kycShareToken": "_act-sbx-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
  }
}

Response

Widget created