POST
/
api
/
partner
/
v1
/
on-ramp
cURL
curl --request POST \
  --url https://staging-api.capa.fi/api/partner/v1/on-ramp \
  --header 'Content-Type: application/json' \
  --header 'partner-api-key: <partner-api-key>' \
  --header 'x-supported-country: <x-supported-country>' \
  --data '{
  "fromAmount": 10200,
  "fiatCurrencyId": "8374f327-38bd-4b0b-b8a7-2524599eb903",
  "userWalletAddress": "0x4d2f3d8f83b6f2f8e0f3f4f3f3f3f3f3f3f3f3f3",
  "blockchainToTokenId": "5f9d37f5-c2f4-4e7e-8bb4-e0d2a1442252",
  "userId": "8374f327-38bd-4b0b-b8a7-2524599eb903",
  "premiumSpread": 0.01
}'
{
  "status": "ok",
  "data": {
    "id": "<string>",
    "userId": "<string>",
    "status": "<string>",
    "fromAmount": 123,
    "fiatCurrencyId": "<string>",
    "blockchainToTokenId": "<string>",
    "exchangeRate": 123,
    "type": "<string>",
    "userBankInfo": [
      {}
    ]
  }
}

Headers

x-supported-country - Country code of the flow (MX or DO) PartnerApiKey (string) - API key associated with the partner.
Partner API Key RequiredRequires partner-api-key for authentication to ensure only authorized partners can access this data.See ๐Ÿ”‘ API Key Generation Guide for getting your API key

Parameters

  • fromAmount (number) - The amount of fiat money to be exchanged. The amount of crypto to be received can be calculated with the On Ramp Quoter
  • fiatCurrencyId (string) - Refers to the fiat currency id for on-ramp transactions. See Fiat docs for more information on how to retrieve the fiat currency id.
  • userWalletAddress (string) - Refers to the user where the crypto will be sent to, make sure that it is an EVM Wallet since this is the only type of wallets we support for now
  • blockchainToTokenId (string) - Refers to the blockchain-to-token id for on-ramp transactions. See Blockchain to Token docs for more information on how to retrieve the Blockchain to token id.
  • userId (string) - Id from the user the transaction is going to be created on behalf of

Response Body

  • id(string) - Transaction Id
  • userId(string) - Id from the user the transaction was created on behalf of
  • status (string) - The status of the transaction which at the time of the creation should equal to PENDING
  • fromAmount (number) - The amount of fiat currency being converted.
  • fiatCurrencyId (string) - The id of the fiat being exchanged from.
  • blockchainToTokenId(string) - The id of the blockchainToToken.
  • type - Type of transaction ON_RAMP or OFF_RAMP

Example

{
  id: "a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6",
  userId: "8f48c371-24e5-4f63-9589-f4f1d2921635",
  status: "PENDING",
  fromAmount: 1000.00,
  fiatCurrencyId: "dd4f872b-3221-4a20-8eff-80149278ec35"
	blockchainToTokenId: "2ede30c1-4c9c-4a07-a402-f525f0a52e77"
  type: "ON_RAMP
}

Use Cases

  • Execute On-Ramp Transaction: Create on ramp transaction in behalf of a user with the parameters selected.

Headers

x-supported-country
string
required

Country code of the flow (MX or DO)

partner-api-key
string
required

Api key for the affiliated partner that is performing the request

Body

application/json
fromAmount
number
required

Amount of fiat currency to be converted to crypto currency.

Example:

10200

fiatCurrencyId
string
required

Identifier for the currency from which the conversion will be made.

Example:

"8374f327-38bd-4b0b-b8a7-2524599eb903"

userWalletAddress
string
required

Wallet address of the user making the transaction.

Example:

"0x4d2f3d8f83b6f2f8e0f3f4f3f3f3f3f3f3f3f3f3"

blockchainToTokenId
string
required

Identifier for the currency on the blockchain to which the conversion will be made.

Example:

"5f9d37f5-c2f4-4e7e-8bb4-e0d2a1442252"

userId
string
required

Identifier for the user

Example:

"8374f327-38bd-4b0b-b8a7-2524599eb903"

premiumSpread
number

Spread percentage to be applied to the exchange rate

Example:

0.01

Response

201 - application/json
status
string
Example:

"ok"

data
object