curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_fiat_off_ramp_session \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: <string> (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_FIAT_OFF_RAMP_SESSION",
"timestampMs": "<string> (e.g. 1746736509954)",
"organizationId": "<string> (Your Organization ID)",
"parameters": {
"quoteId": "<string>",
"walletAddress": "<string>",
"redirectUrl": "<string>"
}
}'
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createFiatOffRampSession({
quoteId: "<string> (Identifier of a saved fiat off-ramp quote. Returned by GetFiatOffRampQuotes.)",
walletAddress: "<string> (Wallet address for this sale. Coinbase uses it as the source address. MoonPay uses it as the refund address; the user deposits the crypto to MoonPay separately.)",
redirectUrl: "<string> (URL the provider redirects to after the user submits the sell. Required when the saved quote is from Coinbase. When set for MoonPay, it is included in the signed sell URL so MoonPay can append the deposit address.)"
});
{
"activity": {
"id": "<activity-id>",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_FIAT_OFF_RAMP_SESSION",
"organizationId": "<organization-id>",
"timestampMs": "<timestamp> (e.g. 1746736509954)",
"result": {
"activity": {
"id": "<string>",
"organizationId": "<string>",
"status": "<string>",
"type": "<string>",
"intent": {
"createFiatOffRampSessionIntent": {
"quoteId": "<string>",
"walletAddress": "<string>",
"redirectUrl": "<string>"
}
},
"result": {
"createFiatOffRampSessionResult": {
"offRampUrl": "<string>",
"offRampTransactionId": "<string>"
}
},
"votes": "<array>",
"fingerprint": "<string>",
"canApprove": "<boolean>",
"canReject": "<boolean>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}
}
}
Activities
Create Fiat Off Ramp Session
Open a fiat off-ramp session for a saved quote.
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/create_fiat_off_ramp_session \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: <string> (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_CREATE_FIAT_OFF_RAMP_SESSION",
"timestampMs": "<string> (e.g. 1746736509954)",
"organizationId": "<string> (Your Organization ID)",
"parameters": {
"quoteId": "<string>",
"walletAddress": "<string>",
"redirectUrl": "<string>"
}
}'
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().createFiatOffRampSession({
quoteId: "<string> (Identifier of a saved fiat off-ramp quote. Returned by GetFiatOffRampQuotes.)",
walletAddress: "<string> (Wallet address for this sale. Coinbase uses it as the source address. MoonPay uses it as the refund address; the user deposits the crypto to MoonPay separately.)",
redirectUrl: "<string> (URL the provider redirects to after the user submits the sell. Required when the saved quote is from Coinbase. When set for MoonPay, it is included in the signed sell URL so MoonPay can append the deposit address.)"
});
{
"activity": {
"id": "<activity-id>",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_CREATE_FIAT_OFF_RAMP_SESSION",
"organizationId": "<organization-id>",
"timestampMs": "<timestamp> (e.g. 1746736509954)",
"result": {
"activity": {
"id": "<string>",
"organizationId": "<string>",
"status": "<string>",
"type": "<string>",
"intent": {
"createFiatOffRampSessionIntent": {
"quoteId": "<string>",
"walletAddress": "<string>",
"redirectUrl": "<string>"
}
},
"result": {
"createFiatOffRampSessionResult": {
"offRampUrl": "<string>",
"offRampTransactionId": "<string>"
}
},
"votes": "<array>",
"fingerprint": "<string>",
"canApprove": "<boolean>",
"canReject": "<boolean>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}
}
}
A successful response returns the following fields:
Was this page helpful?