curl --request POST \
--url https://app.dynamicauth.com/api/v0/sdk/{environmentId}/onramps/coinbase/buy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destinationAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"networks": [
"An example name"
],
"assets": [
"An example name"
],
"defaultNetwork": "An example name",
"defaultAsset": "An example name",
"defaultExperience": "buy",
"defaultPaymentMethod": "An example name",
"fiatCurrency": "An example name",
"handlingRequestedUrls": true,
"partnerUserRef": "An example name",
"presetCryptoAmount": "100.00",
"presetFiatAmount": "100.00",
"redirectUrl": "https://website-sample.com"
}
'{
"url": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
ID of the environment
36^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"95b11417-f18f-457f-8804-68e361f9164f"
Coinbase onramp order data
Valid blockchain wallet address, must be an alphanumeric string without any special characters
255^[A-Za-z0-9]{18,100}$"0xbF394748301603f18d953C90F0b087CBEC0E1834"
50^(?=\S)[\p{L}\p{N}a-zA-Z _.,:!?&%@\/+\-'|]+(?<=\S)$50^(?=\S)[\p{L}\p{N}a-zA-Z _.,:!?&%@\/+\-'|]+(?<=\S)$50^(?=\S)[\p{L}\p{N}a-zA-Z _.,:!?&%@\/+\-'|]+(?<=\S)$"An example name"
50^(?=\S)[\p{L}\p{N}a-zA-Z _.,:!?&%@\/+\-'|]+(?<=\S)$"An example name"
Default visual experience. Either transfer funds from Coinbase (send) or buy assets (buy)
buy, send 50^(?=\S)[\p{L}\p{N}a-zA-Z _.,:!?&%@\/+\-'|]+(?<=\S)$"An example name"
50^(?=\S)[\p{L}\p{N}a-zA-Z _.,:!?&%@\/+\-'|]+(?<=\S)$"An example name"
Prevents the widget from opening URLs directly & relies on onRequestedUrl entirely for opening links
255^(?=\S)[\p{L}\p{N}a-zA-Z _.,:!?&%@\/+\-'|]+(?<=\S)$"An example name"
Digits with optional decimal part
^(\d+(\.\d+)?|\.\d+)$"100.00"
Digits with optional decimal part
^(\d+(\.\d+)?|\.\d+)$"100.00"
^$|^((https?:\/\/)?([a-z0-9]+([-.]+[a-z0-9]+)*\.[a-z]{2,10}|localhost)(:[0-9]{1,5})?(\/.*)?|([a-zA-Z+-]{2,20}):\/\/(?!.*\*.*\*.*)[-*a-zA-Z0-9.-\/]{0,255}(:[*0-9]{1,5})?((\/|\?).*)?)$"https://website-sample.com"
Successfully generated a Coinbase onramp buy URL
The URL to the hosted widget the user should be redirected to.
Was this page helpful?
curl --request POST \
--url https://app.dynamicauth.com/api/v0/sdk/{environmentId}/onramps/coinbase/buy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"destinationAddress": "0xbF394748301603f18d953C90F0b087CBEC0E1834",
"networks": [
"An example name"
],
"assets": [
"An example name"
],
"defaultNetwork": "An example name",
"defaultAsset": "An example name",
"defaultExperience": "buy",
"defaultPaymentMethod": "An example name",
"fiatCurrency": "An example name",
"handlingRequestedUrls": true,
"partnerUserRef": "An example name",
"presetCryptoAmount": "100.00",
"presetFiatAmount": "100.00",
"redirectUrl": "https://website-sample.com"
}
'{
"url": "<string>"
}