Skip to main content
POST
/
api
/
partner
/
v2
/
off-ramp
cURL
curl --request POST \
  --url https://staging-api.capa.fi/api/partner/v2/off-ramp \
  --header 'Content-Type: application/json' \
  --header 'partner-api-key: <partner-api-key>' \
  --data '{
  "userBankInformation": {
    "accountIdentifier": "<string>",
    "country": "MX",
    "accountType": "SAVINGS",
    "bankName": "<string>",
    "documentIdentifier": "<string>",
    "documentType": "<string>",
    "routingNumber": "<string>",
    "address": {},
    "bic": "<string>",
    "iban": "<string>",
    "accountHolder": {}
  },
  "quoteId": "<string>",
  "userId": "8374f327-38bd-4b0b-b8a7-2524599eb903",
  "fiatAmount": 10200,
  "cryptoAmount": 10200,
  "fiatCurrency": "MXN",
  "blockchainSymbol": "BASE",
  "tokenSymbol": "ETH",
  "premiumSpread": 0.01
}'
{
  "success": true,
  "data": {
    "id": "63f51f11-6869-47b0-a109-ddb50ef20efb",
    "userId": "8374f327-38bd-4b0b-b8a7-2524599eb903",
    "status": "PENDING_PAYMENT",
    "cryptoAmount": 2500,
    "fiatAmount": 50000,
    "crossFiatAmount": 123,
    "exchangeRate": 19.53964594161554,
    "tokenSymbol": "USDC",
    "blockchainSymbol": "POL",
    "fiatCurrency": "MXN",
    "premiumSpread": 0.01,
    "createdAt": "2025-05-14T10:00:00Z",
    "completedAt": "<string>",
    "destinationWalletAddress": "0x7796d4f304bd84171ee6730ad0f69c07a47e786d",
    "bankAccount": {
      "country": "MX",
      "accountIdentifier": "014680260346007120",
      "bankName": "Santander",
      "accountType": "SAVINGS",
      "isVerified": true,
      "documentIdentifier": "123abc",
      "documentType": "RNC",
      "iban": "DE89370400440532013000",
      "bic": "DEUTDEFF",
      "routingNumber": "021000021"
    }
  }
}
Creates an off-ramp transaction on behalf of a verified user. This enables the conversion of crypto to fiat and initiates the withdrawal to a registered bank account verified as belonging to the user.

πŸ” Headers

HeaderDescription
partner-api-keyAPI key associated with your partner account. Required. See API Key Generation Guide.
This endpoint requires authentication using a valid partner-api-key.
For Staging Transaction Testing please use Mock Testing Guide

πŸ“₯ Request Body

ParameterTypeRequiredDescription
userIdstringβœ…ID of the user on whose behalf the transaction is created.
The user’s kyc must be verified first.
fiatAmountnumberπŸ”˜Amount of fiat to be converted. Required if cryptoAmount is not provided.
cryptoAmountnumberπŸ”˜Amount of crypto to be converted to fiat. Required if fiatAmount is not provided.
fiatCurrencystringβœ…Currency for the off-ramp transaction.
The user must have an account in this currency.
Accepted values follow the ISO 4217 format (e.g., MXN, DOP).
blockchainSymbolstringβœ…Identifier of the blockchain used for the conversion. Refer to our supported blockchain list for availability.
tokenSymbolstringβœ…Identifier of the token used for the conversion. Refer to our supported token list for availability.
premiumSpreadnumberπŸ”˜Additional percentage applied to the exchange rate. This amount is fully awarded to the partner.
userBankInformationobjectβœ…User’s bank information to be saved. See nested fields below.
userBankInformation
.accountIdentifier
stringβœ…Unique account identifier (CLABE for Mexico, Account Number for the Dominican Republic).
userBankInformation
.country
stringβœ…Country in which the bank account is held.
userBankInformation
.bankName
stringπŸ”˜Name of the user’s bank. List of Dominican Republic Banks
userBankInformation
.accountType
stringπŸ”˜Type of bank account SAVINGS or CHECKING. Only required for the Dominican Republic.
userBankInformation
.documentIdentifier
stringπŸ”˜Unique identifier of the document linked to the bank account. Only required for the Dominican Republic.
userBankInformation
.documentType
stringπŸ”˜Document Type PASSPORT or RNC orCEDULA. Only Required for the Dominican Republic

πŸ“¨ Example Request MX

curl --request POST \
     --url https://staging-api.capa.fi/api/partner/v2/off-ramp \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'partner-api-key: API-KEY' \
     --data '
{
  "userBankInformation": {
    "accountIdentifier": "012345678912345678",
    "country": "MX"
  },
  "fiatCurrency": "MXN",
  "blockchainSymbol": "POL",
  "tokenSymbol": "USDC",
  "userId": "8374f327-38bd-4b0b-b8a7-2524599eb903",
  "fiatAmount": 10000,
  "premiumSpread": 0.01
}
'

πŸ“¨ Example Request DO

curl --request POST \
     --url https://staging-api.capa.fi/api/partner/v2/off-ramp \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'partner-api-key: API-KEY' \
     --data '
{
  "userBankInformation": {
    "accountIdentifier": "9605734495",
    "country": "DO",
    "bankName": "Banco BHD",
    "accountType": "SAVINGS",
    "documentIdentifier": "132753852",
    "documentType": "RNC",
  },
  "fiatCurrency": "DOP",
  "blockchainSymbol": "POL",
  "tokenSymbol": "USDC",
  "userId": "8374f327-38bd-4b0b-b8a7-2524599eb903",
  "fiatAmount": 10000,
  "premiumSpread": 0.01,
}
'

πŸ“€ Response Body

FieldTypeDescription
idstringUnique ID of the created transaction.
userIdstringUser ID associated with the transaction.
statusstringCurrent status of the transaction. Initially set to "PENDING".
cryptoAmountnumberAmount of cryptocurrency being converted.
fiatAmountnumberAmount of fiat currency received after conversion.
exchangeRatenumberExchange rate used for the crypto-to-fiat conversion.
tokenSymbolstringSymbol of the cryptocurrency used.
blockchainSymbolstringSymbol of the blockchain the cryptocurrency belongs to.
fiatCurrencystringCurrency code of the fiat currency received (e.g., "MXN").
createdAtstringISO timestamp indicating when the transaction was created.
completedAtstringISO timestamp indicating when the transaction was completed, or null if pending.
destinationWalletAddressstringWallet address where the user will need to send the crypto.
bankAccountobjectInformation about the user’s bank account.
bankAccount.isVerifiedbooleanIndicates whether the account has been verified and linked to the user.
bankAccount .accountIdentifierstringUnique identifier of the account (CLABE for Mexico, Account Number for DO).
bankAccount.countrystringCountry where the bank account is held.
bankAccount.accountTypestringType of bank account. Only required for the Dominican Republic.
bankAccount.bankNamestringName of the bank. Only required for the Dominican Republic.
bankAccount .documentIdentifierstringUnique identifier of the document linked to the account.
premiumSpreadnumberAdditional percentage applied for premium services.

πŸ“˜ Example Response

{
    "success": true,
    "data": {
        "id": "0483907e-ca31-432c-8234-fc401a921ef9",
        "userId": "d3127f5f-ff64-47f9-a9cc-ff603862eca6",
        "status": "PENDING",
        "cryptoAmount": 0.26,
        "fiatAmount": 4.728013,
        "exchangeRate": 18.184665,
        "tokenSymbol": "USDC",
        "blockchainSymbol": "POL",
        "fiatCurrency": "MXN",
        "createdAt": "2025-06-09T21:51:32.288Z",
        "completedAt": null,
        "destinationWalletAddress": "0x4cd63f6e9b8885dd502012f7b008b54d17a56e6f",
        "bankAccount": {
            "country": "MX",
            "accountIdentifier": "012345678902422382",
            "isVerified": true
        },
        "premiumSpread": 0.005
    }
}

⚠️ Important Notes & Requirements

  • Partner API Key is mandatory: All requests must include a valid PartnerApiKey in the header. Get your API key.
  • User must be verified: The user (userId) must have completed KYC. The verification is only made once.
  • Supported Countries: Only flows from MX (Mexico) and DO (Dominican Republic) are currently supported.
  • Amount Limits: Crypto amounts must respect the minimum and maximum thresholds defined in the partner agreement.
  • Valid Blockchain & Token name: Ensure blockchainSymbol and tokenSymbol are retrieved from valid sources. Contact support for available options.
  • Destination wallet: Each user have it’s own destination wallet, ensure you’re using the wallet from the response to send the crypto
  • Verification Bank Account in Mexico: If this is the first time a bank account is used there will be a penny test in Mexico to check that the KYC’d user is the actual owner. If it is not the transaction will be cancelled.
  • Account Identifier Validation in Mexico: Make sure to send a valid CLABE for Mexico using the following regex ^\d{18}$. This npm package could also be used for validation Clabe Validator

βœ… Use Cases

  • User Payout: Initiate a crypto-to-fiat payout to a verified user.
  • B2C Integration: Allow individual users to off-ramp from within your app or service.
  • B2B or Corporate Flows: Automate withdrawals to company bank accounts after receiving crypto payments.


Headers

partner-api-key
string
required

Api key for the affiliated partner that is performing the request

Body

application/json
userId
string
required

Identifier for the user who's submitting the off-ramp order

Example:

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

userBankInformation
object

User bank info to be saved

quoteId
string

Identifier for the quote to be used for the transaction.

fiatAmount
number

Amount of fiat currency to be received in conversion.

Example:

10200

cryptoAmount
number

Amount of crypto currency to be converted to fiat currency.

Example:

10200

fiatCurrency
enum<string>

Identifier for the fiat currency which the user will rec. Required when quoteId is not provided.

Available options:
MXN,
DOP,
USD,
EUR
Example:

"MXN"

blockchainSymbol
enum<string>

Identifier for the blockchain to token from which the conversion will be made. Required when quoteId is not provided.

Available options:
POL,
SOL,
BASE,
ARB,
BSC,
OP,
WLD,
STK,
ETH,
MTN,
CORE
Example:

"BASE"

tokenSymbol
enum<string>

Identifier for the token from which the conversion will be made. Required when quoteId is not provided.

Available options:
USDC,
USDT,
MXNe,
SOL,
ETH,
wBTC,
cbBTC,
PYSUD,
POL,
BNB,
WLD,
STK,
USDY,
CORE,
USDC.e,
wUSDL,
CoreBTC,
MATIC,
USDbC
Example:

"ETH"

premiumSpread
number

Spread percentage to be applied to the exchange rate

Example:

0.01

Response

201 - application/json
success
boolean
Example:

true

data
object
⌘I