### Querying Documentation with GET Request Source: https://docs.velafi.com/api-reference/basic-configuration/get-fiat-fiat-pairs.md This example shows how to query the documentation dynamically using an HTTP GET request. It includes the `ask` parameter for a specific question and an optional `goal` parameter for broader context. ```http GET https://docs.velafi.com/api-reference/basic-configuration/get-fiat-fiat-pairs.md?ask=&goal= ``` -------------------------------- ### Example GET Request for Active Webhooks Source: https://docs.velafi.com/api-reference/webhooks/get-webhook-endpoints.md This example demonstrates how to make a GET request to the /v2/webhooks endpoint to retrieve only active webhook configurations. ```http GET /v2/webhooks?status=10 ``` -------------------------------- ### Example Account Details Response Source: https://docs.velafi.com/api-reference/account/get-account-details.md An example of a successful response from the Get Account Details API, showing populated fields for a user. ```json { "code": 200, "msg": "SUCCESS", "data": { "userId": 1, "country": "Argentina", "companyName": "velafi", "kycPassed": true, "monthLimit": 250000.0, "monthUsed": 0.0 } } ``` -------------------------------- ### Querying Documentation with GET Request Source: https://docs.velafi.com/api-reference/basic-configuration/upload-file.md Demonstrates how to query the documentation dynamically using a GET request with 'ask' and optional 'goal' parameters. ```http GET https://docs.velafi.com/api-reference/basic-configuration/upload-file.md?ask=&goal= ``` -------------------------------- ### Example Response Source: https://docs.velafi.com/api-reference/basic-configuration/get-fiat-crypto-pairs.md This example demonstrates a typical response from the Get Fiat/Crypto Pairs API, showing multiple trading pairs with their associated country, fiat currency, cryptocurrency, and trade accuracy. ```json { "code": 200, "msg": "SUCCESS", "data": [ { "country": "Mexico", "fiat": "MXN", "crypto": "BTC", "accuracy": 2 }, { "country": "United States", "fiat": "USD", "crypto": "ETH", "accuracy": 2 } // Additional trading pairs may be included ] } ``` -------------------------------- ### Querying Documentation with GET Request Source: https://docs.velafi.com/api-reference/basic-configuration/get-crypto-fiat-payment-methods.md Use this GET request format to query the documentation dynamically with 'ask' and optional 'goal' parameters. ```http GET https://docs.velafi.com/api-reference/basic-configuration/get-crypto-fiat-payment-methods.md?ask=&goal= ``` -------------------------------- ### Example Payment Methods Response Source: https://docs.velafi.com/api-reference/basic-configuration/get-fiat-crypto-payment-methods.md An example of the response when retrieving payment methods, showing multiple payment options. ```json { "code": 200, "msg": "SUCCESS", "data": { "country": "Mexico", "fiat": "USD", "crypto": "USDT", "paymentList": [ { "paymentId": 1, "fiatFee": "2.00", "paymentType": 1 }, { "paymentId": 2, "fiatFee": "1.50", "paymentType": 0 } ] } } ``` -------------------------------- ### Query Crypto Transfers Request Example Source: https://docs.velafi.com/api-reference/merchant/query-crypto-transfers.md Example of a GET request to query internal transfer orders. Parameters like tokenId, clientId, startTime, endTime, pageSize, and merchantId can be included. ```http GET /v2/assets/internalTransferOrders?tokenId=&clientId=&startTime=0&endTime=0&pageSize=10&merchantId= ``` -------------------------------- ### Example Response Source: https://docs.velafi.com/api-reference/basic-configuration/get-list-of-countries.md An example of a successful response containing a list of countries and their ISO codes. ```json { "code": 200, "msg": "SUCCESS", "data": [ { "country": "Mexico", "abbr": "MX" }, { "country": "Argentina", "abbr": "AR" }, { "country": "Brazil", "abbr": "BR" } // Additional countries may be included ] } ``` -------------------------------- ### Querying Documentation with GET Request Source: https://docs.velafi.com/api-reference/basic-configuration/get-crypto-fiat-pairs.md Demonstrates how to query the documentation dynamically using an HTTP GET request with 'ask' and optional 'goal' query parameters. ```http GET https://docs.velafi.com/api-reference/basic-configuration/get-crypto-fiat-pairs.md?ask=&goal= ``` -------------------------------- ### Example Response Body Source: https://docs.velafi.com/api-reference/payment-method/set-refund-account.md An example of a successful response when setting a refund account, indicating the operation was successful. ```json { "code": 200, "msg": "SUCCESS", "data": true } ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.velafi.com/api-reference/basic-configuration.md To get information not directly present on a page, make an HTTP GET request to the page URL with the 'ask' query parameter. An optional 'goal' parameter can be included to tailor the response. ```http GET https://docs.velafi.com/api-reference/basic-configuration.md?ask=&goal= ``` -------------------------------- ### Automated Pix Example Source: https://docs.velafi.com/api-reference/merchant/get-pending-fund-account.md This example shows the response structure for a pending fund account associated with Automated Pix. ```APIDOC ## GET /api-reference/merchant/get-pending-fund-account.md ### Description Retrieves details for a pending fund account, including payment method and associated fields. ### Method GET ### Endpoint /api-reference/merchant/get-pending-fund-account.md ### Query Parameters - **ask** (string) - Required - The question to ask about the documentation. - **goal** (string) - Optional - The broader end goal for the query. ### Response #### Success Response (200) - **code** (integer) - The status code of the response. - **msg** (string) - The message indicating the success or failure of the request. - **data** (object) - Contains the details of the pending fund account. - **fiat** (string) - The fiat currency of the payment. - **paymentMethodName** (string) - The name of the payment method. - **fieldList** (object) - Contains fields relevant to the payment method. - **Chave Pix - Random Pix** (string) - The Pix key. - **Pix copia e cola** (string) - The Pix copy and paste string. - **Pix QR Code** (string) - The URL for the Pix QR code. #### Response Example ```json { "code": 200, "msg": "SUCCESS", "data": { "fiat": "BRL", "paymentMethodName": "Automated Pix", "fieldList": { "Chave Pix - Random Pix": "09a3b1d1-49d6-4820-bd19-53e7f50ee13c", "Pix copia e cola": "00020101021126580014br.gov.bcb.pix013865755...", "Pix QR Code": "https://links.qrcode.co/zAOCe/3471397f291c28d19.png" } } } ``` ``` -------------------------------- ### Example Response for Crypto List Source: https://docs.velafi.com/api-reference/basic-configuration/get-list-of-crypto-currencies.md An example of a successful response from the crypto list API, showing multiple cryptocurrencies with their respective trade accuracies. ```json { "code": 200, "msg": "SUCCESS", "data": [ { "crypto": "USDT", "accuracy": 6 }, { "crypto": "BTC", "accuracy": 8 } // Additional cryptocurrencies may be included ] } ``` -------------------------------- ### Example Response for Active Webhooks Source: https://docs.velafi.com/api-reference/webhooks/get-webhook-endpoints.md This is an example of a successful response when querying for active webhooks. It shows the structure of the returned data, including a sample webhook entry. ```json { "code": 200, "msg": "SUCCESS", "data": [ { "webhookId": "ebab8a9663704e7cbbebe672c7c67912", "eventType": "ORDER_WEBHOOK", "url": "https://localhost/callback", "status": 1, "publicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAp/6GRTIrl+kQb9u27cGzXcqXbx6uA9PHQ3wGFgeBVEq0YpJxOSWpy4UmgBZ+fTOANiFyrODECWJoWIeJPOWkKR5VUseJTg57js3rgu/2Wn6Ihq1h+n6wCJEMCjK0Ia5brbQXtPcXCHK0J53hrt4YbxTzZuKUi7KIWO/Ply6xzYaTJeKzkaWlNDXF2VWBlutG+Pun3yXdWl7kTRENYA4mxXayaW0ELpnnLXF9qO01bAHPc2G8n0snqDiPMtz8Irw5MqlQ3YMjDiEDFLSb2aP9grae/o/LXZVNv0dJhV5IHgTJctDyFGz837BRiJZsBsodJK+3BTJhLsHqh6VAO8CSdQIDAQAB" } ] } ``` -------------------------------- ### Example Response for General Payment Methods Source: https://docs.velafi.com/api-reference/payment-method/get-payment-templates.md This is a general example response structure for payment methods. It includes fields for bank details, identification, and contact information. ```json { "code": 200, "msg": "SUCCESS", "data": { "Bank Name": "", "Account Type": "", "Account Number": "", "CCI Number": "", "Email": "", "Identification Type": "", "Identification Number": "", "Name": "", "Phone Number": "" } } ``` -------------------------------- ### Example Request for PEN Fund Transfer Source: https://docs.velafi.com/api-reference/merchant/transfer-pending-funds.md Illustrates a sample request body for transferring funds in PEN currency. This example shows the necessary parameters for a PEN transaction. ```json { "clientId": "test-pen", "fromMerchantId": 15127301, "toMerchantId": 15127302, "fiat": "PEN", "paymentId": 95, "fiatAmount": 10 } ``` -------------------------------- ### Example Response: USDT to MXN Source: https://docs.velafi.com/api-reference/quote/get-user-quote-for-crypto-fiat.md Example response showing the price of USDT in Mexican Pesos (MXN). Includes price but no quoteId as createQuoteId was not specified. ```json { "code": 200, "msg": "SUCCESS", "data": { "price": "21.3707" } } ``` -------------------------------- ### Querying Documentation Dynamically Source: https://docs.velafi.com/api-reference/webhooks/get-webhook-endpoints.md This example shows how to use the GitBook query mechanism to ask questions about the documentation. It includes the base URL and parameters for 'ask' and 'goal'. ```http GET https://docs.velafi.com/api-reference/webhooks/get-webhook-endpoints.md?ask=&goal= ``` -------------------------------- ### Example Get Payment Method Response Source: https://docs.velafi.com/api-reference/payment-method/get-payment-method.md This is an example of a successful response from the Get Payment Method API, illustrating the structure and typical values for a payment method record. ```json { "code": 200, "msg": "SUCCESS", "data": { "record": [ { "id": 228, "merchantId": 67, "country": "Hong Kong", "fiat": "USD", "paymentId": 529, "paymentMethodName": "CHATS", "realName": "test", "remark": "11", "createTime": 0, "fieldList": { "Account Owner Type": "Business", "Account Number": "390202731", "Bank Name": "Citibank, N.A., Hong Kong Branch", "Bank Country/Region": "HK", "Bank Identifier": "CITIHKHX", "Remarks": "111", "Street": "UNIT E, 36/F., E-TRADE PLAZA, 24 LEE CHUNG STREET, CHAIWAN, HONG KONG", "City": "Hong Kong", "State": "HK-HK", "Country/Region": "HK", "Postal Code": "00000" }, "status": 1, "hasRefundAccount": 0 } ], "size": 10, "currentPage": 1, "total": 1 } } ``` -------------------------------- ### Example Request: USDT to MXN Source: https://docs.velafi.com/api-reference/quote/get-user-quote-for-crypto-fiat.md Example of a request to get the price of USDT in Mexican Pesos (MXN). Requires country, from, and to parameters. ```text * **country**: Mexico * **from**: USDT * **to**: MXN ``` -------------------------------- ### Querying Documentation with `ask` Parameter Source: https://docs.velafi.com/api-reference/merchant/crypto-transfer.md Demonstrates how to query the documentation dynamically using an HTTP GET request with `ask` and optional `goal` query parameters. ```http GET https://docs.velafi.com/api-reference/merchant/crypto-transfer.md?ask=&goal= ``` -------------------------------- ### Querying Documentation Source: https://docs.velafi.com/api-reference/basic-configuration/get-list-of-countries.md Demonstrates how to query the documentation dynamically using HTTP GET requests with 'ask' and 'goal' parameters. ```http GET https://docs.velafi.com/api-reference/basic-configuration/get-list-of-countries.md?ask=&goal= ``` -------------------------------- ### Example Fiat Currency Response Source: https://docs.velafi.com/api-reference/basic-configuration/get-list-of-fiat-currencies.md An example of the JSON response from the Get List of Fiat Currencies API. This shows multiple currency entries with their respective country, fiat name, and accuracy. ```json { "code": 200, "msg": "SUCCESS", "data": [ { "country": "Mexico", "fiat": "MXN", "accuracy": 2 }, { "country": "United States", "fiat": "USD", "accuracy": 2 } // Additional fiat currencies may be included ] } ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.velafi.com/api-reference/webhooks.md Use this GET request to ask questions about the documentation. Include an 'ask' parameter for your question and an optional 'goal' parameter for broader context. ```http GET https://docs.velafi.com/api-reference/webhooks.md?ask=&goal= ``` -------------------------------- ### Example Request: MXN to USDT with Quote ID Source: https://docs.velafi.com/api-reference/quote/get-user-quote-for-crypto-fiat.md Example of a request to get the price of Mexican Pesos (MXN) in USDT, with the option to create a quote ID. Requires country, from, to, and createQuoteId parameters. ```text * **country**: Mexico * **from**: MXN * **to**: USDT * **createQuoteId**: true ``` -------------------------------- ### Querying Documentation with GET Request Source: https://docs.velafi.com/api-reference/basic-configuration/get-list-of-fiat-currencies.md Demonstrates how to query this documentation page dynamically using a GET request with 'ask' and optional 'goal' parameters. This is useful for retrieving information not explicitly present on the page. ```http GET https://docs.velafi.com/api-reference/basic-configuration/get-list-of-fiat-currencies.md?ask=&goal= ``` -------------------------------- ### Query Documentation with Ask and Goal Parameters Source: https://docs.velafi.com/api-reference/webhooks/fiat-fiat-order-message-push.md Use this GET request to ask specific questions about the documentation or to retrieve broader context for a particular goal. The 'ask' parameter is mandatory for posing a question, while 'goal' is optional for tailoring the response. ```http GET https://docs.velafi.com/api-reference/webhooks/fiat-fiat-order-message-push.md?ask=&goal= ``` -------------------------------- ### Get Crypto Assets Balance - Aggregated Across All Merchants Source: https://docs.velafi.com/api-reference/merchant/get-crypto-assets-balance.md Use this example to get aggregated crypto asset balances across all merchants linked to the user's account by setting merchantId to 0. The X-BH-TOKEN is required for authentication. ```http GET /v2/assets/account/assets?merchantId=0 X-BH-TOKEN: ****** ``` ```json { "code": 200, "msg": "SUCCESS", "data": { "canDeposit": true, "balances": [ { "asset": "USDT", "assetId": "USDT", "assetName": "USDT", "total": "5000", "free": "4000", "locked": "1000" }, { "asset": "BTC", "assetId": "BTC", "assetName": "BTC", "total": "2", "free": "1.5", "locked": "0.5" } ] } } ``` -------------------------------- ### Webhook Setup Source: https://docs.velafi.com/api-reference Provides guidance on setting up webhooks to receive real-time event notifications from the Velafi system. This is essential for event-driven integrations. ```APIDOC ## Webhook Setup This section details how to configure and manage webhook endpoints to receive event notifications. ### Create Webhook Endpoints Use the `POST /webhooks` endpoint to create new webhook subscriptions. ### Get Webhook Endpoints Use the `GET /webhooks` endpoint to retrieve a list of your active webhook subscriptions. ### Update a Webhook Use the `PUT /webhooks/{webhook_id}` endpoint to modify an existing webhook subscription. ### Delete a Webhook Use the `DELETE /webhooks/{webhook_id}` endpoint to remove a webhook subscription. ``` -------------------------------- ### Get Crypto Assets Balance - Specific Merchant Source: https://docs.velafi.com/api-reference/merchant/get-crypto-assets-balance.md Use this example to retrieve the crypto asset balances for a specific merchant by providing their merchant ID. Ensure the X-BH-TOKEN is included in the request header for authentication. ```http GET /v2/assets/account/assets?merchantId=12345 X-BH-TOKEN: ****** ``` ```json { "code": 200, "msg": "SUCCESS", "data": { "canDeposit": true, "balances": [ { "asset": "USDT", "assetId": "USDT", "assetName": "USDT", "total": "1000", "free": "800", "locked": "200" }, { "asset": "BTC", "assetId": "BTC", "assetName": "BTC", "total": "0.5", "free": "0.3", "locked": "0.2" } ] } } ``` -------------------------------- ### Example Response (USD / EUR) Source: https://docs.velafi.com/api-reference/merchant/activate-merchant-account-for-individual.md This is a sample success response for merchant account activation when using USD or EUR. It includes a verification link for further steps if the status indicates it. ```json { "code": 200, "msg": "SUCCESS", "data": { "fiat": "USD", "status": 4, "verifyLink": "https://www.vealfi-test.com/business/channel/verify?token=12ceff08f9621808b5a573972cdfb10f", "failReason": "" } } ``` -------------------------------- ### Query Documentation with GET Request Source: https://docs.velafi.com/api-reference/merchant/get-a-list-merchant-fiat-flow.md Use this method to ask specific questions about the documentation. Include your question in the 'ask' parameter and an optional broader goal in the 'goal' parameter. ```http GET https://docs.velafi.com/api-reference/merchant/get-a-list-merchant-fiat-flow.md?ask=&goal= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.velafi.com/api-reference/order/create-a-fiat-to-crypto-order.md Use this GET request to query the documentation dynamically. Include your specific question in the 'ask' parameter and an optional broader goal in the 'goal' parameter. ```bash GET https://docs.velafi.com/api-reference/order/create-a-fiat-to-crypto-order.md?ask=&goal= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.velafi.com/api-reference Use this endpoint to ask questions about the documentation dynamically. Include your specific question in the `ask` parameter and an optional broader goal in the `goal` parameter. ```http GET https://docs.velafi.com/api-reference.md?ask=&goal= ``` -------------------------------- ### Example Request: ARS to MXN Source: https://docs.velafi.com/api-reference/quote/get-user-quote-for-fiat-fiat.md Example of how to request the exchange rate from Argentine Pesos (ARS) to Mexican Pesos (MXN). ```text onRampCountry: Argentina onRampFiat: ARS offRampCountry: Mexico offRampFiat: MXN ``` -------------------------------- ### Query Documentation with GET Request Source: https://docs.velafi.com/guides/step-by-step-guide.md Use this method to ask specific questions or retrieve broader context from the documentation. The 'ask' parameter is mandatory for specifying your query, while 'goal' is optional for tailoring the response. ```http GET https://docs.velafi.com/guides/step-by-step-guide.md?ask=&goal= ``` -------------------------------- ### Example Request: MXN to ARS Source: https://docs.velafi.com/api-reference/quote/get-user-quote-for-fiat-fiat.md Example of how to request the exchange rate from Mexican Pesos (MXN) to Argentine Pesos (ARS). ```text onRampCountry: Mexico onRampFiat: MXN offRampCountry: Argentina offRampFiat: ARS ``` -------------------------------- ### Example Response for Order Message Push Source: https://docs.velafi.com/api-reference/webhooks/fiat-crypto-order-message-push.md An example of the JSON response received after the webhook notification is processed, indicating a successful callback. ```json { "callbackStatus": "SUCCESS" } ``` -------------------------------- ### Query Documentation API Source: https://docs.velafi.com/api-reference/account/get-account-details.md Demonstrates how to query the documentation dynamically using an HTTP GET request with 'ask' and optional 'goal' parameters. This is useful for retrieving information not explicitly present on the page. ```http GET https://docs.velafi.com/api-reference/account/get-account-details.md?ask=&goal= ``` -------------------------------- ### Example Response: ARS to MXN Source: https://docs.velafi.com/api-reference/quote/get-user-quote-for-fiat-fiat.md Example response showing the exchange rate from Argentine Pesos (ARS) to Mexican Pesos (MXN). ```json { "code": 200, "msg": "SUCCESS", "data": { "price": "0.0160686" } } ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.velafi.com/api-reference/merchant/retrieve-funding-records.md Use this method to ask questions about the documentation when the answer is not explicitly present on the current page. The `ask` parameter contains the specific question, and the optional `goal` parameter describes the broader objective. ```bash GET https://docs.velafi.com/api-reference/merchant/retrieve-funding-records.md?ask=&goal= ``` -------------------------------- ### Querying Documentation with 'ask' and 'goal' Parameters Source: https://docs.velafi.com/guides/currencies.md Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter. ```http GET https://docs.velafi.com/guides/currencies.md?ask=&goal= ``` -------------------------------- ### Example Response: MXN to ARS Source: https://docs.velafi.com/api-reference/quote/get-user-quote-for-fiat-fiat.md Example response showing the exchange rate from Mexican Pesos (MXN) to Argentine Pesos (ARS). ```json { "code": 200, "msg": "SUCCESS", "data": { "price": "56.14266017" } } ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.velafi.com/api-reference/merchant/get-a-list-of-merchants.md Use this method to ask questions about the documentation when the answer is not explicitly present. The 'ask' parameter contains the specific question, and the optional 'goal' parameter describes the broader objective. ```http GET https://docs.velafi.com/api-reference/merchant/get-a-list-of-merchants.md?ask=&goal= ``` -------------------------------- ### Example Response for BRL Fund Transfer Source: https://docs.velafi.com/api-reference/merchant/transfer-pending-funds.md Presents an example of the successful response for a BRL fund transfer, detailing the transaction specifics. ```json { "code": 200, "msg": "SUCCESS", "data": { "clientId": "test-brl", "fromId": 521006138624569348, "toId": 521006138624569349, "fiat": "BRL", "fiatAmount": "10", "totalFiatAmount": "10", "fee": "0", "createTime": 1746694343261 } } ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.velafi.com/api-reference/basic-configuration/get-fiat-fiat-payment-methods.md Use this method to ask questions about the documentation when the answer is not directly available on the current page. The 'ask' parameter specifies the question, and the optional 'goal' parameter provides context for the desired outcome. ```http GET https://docs.velafi.com/api-reference/basic-configuration/get-fiat-fiat-payment-methods.md?ask=&goal= ``` -------------------------------- ### Example Response for COP Fund Transfer Source: https://docs.velafi.com/api-reference/merchant/transfer-pending-funds.md Provides an example of the successful response for a COP fund transfer, including transaction details. ```json { "code": 200, "msg": "SUCCESS", "data": { "clientId": "test-cop", "fromId": 521006138624569346, "toId": 521006138624569347, "fiat": "COP", "fiatAmount": "10", "totalFiatAmount": "10", "fee": "0", "createTime": 1746694343261 } } ``` -------------------------------- ### Example Response for ARS Fund Transfer Source: https://docs.velafi.com/api-reference/merchant/transfer-pending-funds.md Presents an example of the successful response for an ARS fund transfer. It details the transaction specifics. ```json { "code": 200, "msg": "SUCCESS", "data": { "clientId": "test-ars", "fromId": 521006138624569345, "toId": 521006138641346561, "fiat": "ARS", "fiatAmount": "10", "totalFiatAmount": "10", "fee": "0", "createTime": 1746694343261 } } ```