### Get FX Rate using Curl Source: https://api.blindpay.com/reference/index This snippet demonstrates how to retrieve foreign exchange (FX) rates using a cURL command. It requires an instance ID, and specifies the currency types, amounts, and desired target currency. The response includes various quotation details and fees. ```shell curl https://api.blindpay.com/v1/instances/in_000000000000/quotes/fx \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \ --data '{ "from": "USDC", "to": "BRL", "request_amount": 1000, "currency_type": "sender" }' ``` -------------------------------- ### Create Quote API Request (Curl) Source: https://api.blindpay.com/reference/index This snippet demonstrates how to create a quote using the Blindpay API via a cURL request. It includes example JSON body parameters such as bank account ID, currency type, request amount, network, token, and optional transaction details. Ensure proper authentication is provided. ```curl curl -X POST https://api.blindpay.com/v1/instances/{instance_id}/quotes \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -d '{ "bank_account_id": "ba_000000000000", "currency_type": "sender", "cover_fees": true, "request_amount": 1000, "network": "sepolia", "token": "USDC", "description": "Memo code or description, only works with USD and BRL", "partner_fee_id": "pf_000000000000", "transaction_document_type": "invoice", "transaction_document_id": "1234567890", "transaction_document_file": "https://example.com/image.png" }' ``` -------------------------------- ### Create Quote API Source: https://api.blindpay.com/reference/index API endpoint for creating a new quote. ```APIDOC ## POST /v1/instances/{instance_id}/quotes ### Description Creates a new quote for a transaction with specified details. ### Method POST ### Endpoint /v1/instances/{instance_id}/quotes ### Parameters #### Path Parameters - **instance_id** (string) - Required - The ID of the instance. #### Request Body - **bank_account_id** (string) - Required - The ID of the bank account. - **currency_type** (string) - Required - The type of currency (e.g., "sender"). - **cover_fees** (boolean) - Required - Whether to cover fees. - **request_amount** (integer) - Required - The requested amount. - **network** (string) - Required - The network for the transaction (e.g., "sepolia"). - **token** (string) - Required - The token used (e.g., "USDC"). - **description** (string) - Optional - Memo code or description (only works with USD and BRL). - **partner_fee_id** (string) - Optional - The ID of the partner fee. - **transaction_document_type** (string) - Optional - The type of transaction document. - **transaction_document_id** (string) - Optional - The ID of the transaction document. - **transaction_document_file** (string) - Optional - URL to the transaction document file. ### Request Example ```json { "bank_account_id": "ba_000000000000", "currency_type": "sender", "cover_fees": true, "request_amount": 1000, "network": "sepolia", "token": "USDC", "description": "Memo code or description, only works with USD and BRL", "partner_fee_id": "pf_000000000000", "transaction_document_type": "invoice", "transaction_document_id": "1234567890", "transaction_document_file": "https://example.com/image.png" } ``` ### Response #### Success Response (200) (Details not provided in the source text) #### Response Example (Details not provided in the source text) ``` -------------------------------- ### POST /v1/instances/{instance_id}/quotes/fx Source: https://api.blindpay.com/reference/index Retrieves foreign exchange (FX) rates based on specified currency types, source and destination currencies, and the requested amount. ```APIDOC ## POST /v1/instances/{instance_id}/quotes/fx ### Description Retrieves foreign exchange (FX) rates based on specified currency types, source and destination currencies, and the requested amount. ### Method POST ### Endpoint /v1/instances/{instance_id}/quotes/fx ### Parameters #### Path Parameters - **instance_id** (string) - Required - The unique identifier for the instance. #### Query Parameters None #### Request Body - **currency_type** (string) - Required - Specifies whether the rate is for the sender or receiver. Enum: `sender`, `receiver`. - **from** (string) - Required - The source currency for the exchange. Enum: `USDC`, `USDT`, `USDB`. - **request_amount** (integer) - Required - The amount of currency to be exchanged. Minimum value is 100. (e.g., 1000 represents 10.00) - **to** (string) - Required - The destination currency for the exchange. Enum: `BRL`, `USD`, `MXN`, `COP`, `ARS`. ### Request Example ```json { "from": "USDC", "to": "BRL", "request_amount": 1000, "currency_type": "sender" } ``` ### Response #### Success Response (200) - **commercial_quotation** (integer) - The commercial quotation for the FX rate. - **blindpay_quotation** (integer) - The BlindPay quotation for the FX rate. - **result_amount** (integer) - The calculated amount after applying the FX rate. - **instance_flat_fee** (integer) - The flat fee charged for the transaction. - **instance_percentage_fee** (integer) - The percentage fee charged for the transaction. #### Response Example ```json { "commercial_quotation": 495, "blindpay_quotation": 485, "result_amount": 1, "instance_flat_fee": 50, "instance_percentage_fee": 0 } ``` ``` -------------------------------- ### Create Payout Quote using Shell Curl Source: https://api.blindpay.com/reference/index This snippet demonstrates how to create a payout quote using Shell Curl. It requires an instance ID and includes parameters for bank account details, currency, network, token, and fee coverage. The request body is formatted as JSON and includes an Authorization header for Bearer token authentication. ```shell curl https://api.blindpay.com/v1/instances/in_000000000000/quotes \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \ --data '{ "bank_account_id": "ba_000000000000", "currency_type": "sender", "cover_fees": true, "request_amount": 1000, "network": "sepolia", "token": "USDC", "description": "Memo code or description, only works with USD and BRL", "partner_fee_id": "pf_000000000000", "transaction_document_type": "invoice", "transaction_document_id": "1234567890", "transaction_document_file": "https://example.com/image.png" }' ``` -------------------------------- ### Terms of Service API Operations Source: https://api.blindpay.com/reference/index This section details the API operations for managing Terms of Service (TOS) for instances. It specifically includes an endpoint for accepting TOS. Instance ID is a required path parameter. ```api POST /v1/e/instances/{instance_id}/tos ``` -------------------------------- ### Partner Fees API Operations Source: https://api.blindpay.com/reference/index This section outlines the available operations for managing partner fees within an instance. It includes endpoints for creating, retrieving, and deleting partner fees. Proper authentication and instance ID are required for all operations. ```api POST /v1/instances/{instance_id}/partner-fees GET /v1/instances/{instance_id}/partner-fees GET /v1/instances/{instance_id}/partner-fees/{id} DELETE /v1/instances/{instance_id}/partner-fees/{id} ``` -------------------------------- ### Webhooks API Source: https://api.blindpay.com/reference/index Endpoints for managing and receiving webhook notifications for various events. ```APIDOC ## POST Webhook Events ### Description This section lists various webhook events that can be subscribed to. The actual endpoint for registering webhooks is not explicitly defined, but these are the event types. ### Method POST ### Endpoint (Not specified, presumed to be a general webhook registration endpoint) ### Event Types - `bankAccount.new` - `blockchainWallet.new` - `limitIncrease.new` - `limitIncrease.update` - `payin.new` - `payin.complete` - `payin.partnerFee` - `payin.update` - `payout.new` - `payout.complete` - `payout.partnerFee` - `payout.update` - `receiver.new` - `receiver.update` - `tos.accept ### Request Body (Details not provided in the source text) ### Response (Details not provided in the source text) ``` -------------------------------- ### Offramp Wallets API Operations Source: https://api.blindpay.com/reference/index This section outlines the API operations for managing offramp wallets. It includes endpoints for creating, retrieving, and retrieving specific offramp wallets. Instance ID, receiver ID, and bank account ID are required path parameters. ```api POST /v1/instances/{instance_id}/receivers/{receiver_id}/bank-accounts/{bank_account_id}/offramp-wallets GET /v1/instances/{instance_id}/receivers/{receiver_id}/bank-accounts/{bank_account_id}/offramp-wallets GET /v1/instances/{instance_id}/receivers/{receiver_id}/bank-accounts/{bank_account_id}/offramp-wallets/{id} ``` -------------------------------- ### POST /v1/instances/{instance_id}/quotes Source: https://api.blindpay.com/reference/index Creates a new quote for a payout transaction. This endpoint allows specifying details such as bank account, currency, network, amount, and fee preferences. ```APIDOC ## POST /v1/instances/{instance_id}/quotes ### Description Creates a new quote for a payout transaction. This endpoint allows specifying details such as bank account, currency, network, amount, and fee preferences. ### Method POST ### Endpoint `/v1/instances/{instance_id}/quotes` ### Parameters #### Path Parameters - **instance_id** (string) - Required - Unique identifier for the instance. Example: `in_000000000000` #### Query Parameters None #### Request Body - **bank_account_id** (string) - Required - The ID of the bank account for the payout. Example: `ba_000000000000` - **currency_type** (string) - Required - Type of currency, either `sender` or `receiver`. Example: `sender` - **network** (string) - Required - The blockchain network to use. Available options include `sepolia`, `base`, `arbitrum_sepolia`, etc. Example: `sepolia` - **request_amount** (integer) - Required - The amount to be paid. Minimum value is 100. Example: `1000` (represents 10.00) - **token** (string) - Required - The token to be used for the transaction. Available options include `USDC`, `USDT`, `USDB`. Example: `USDC` - **cover_fees** (boolean | null) - Optional - If true, the sender covers the fees. If false, the receiver covers the fees. Example: `true` - **description** (string | null) - Optional - A memo code or description, works only with USD and BRL. Max length: 128. Example: `Memo code or description, only works with USD and BRL` - **partner_fee_id** (string | null) - Optional - The ID of the partner fee. Example: `pf_000000000000` - **transaction_document_file** (string | null) - Optional - A URI pointing to the transaction document. Format: `uri`. Example: `https://example.com/image.png` - **transaction_document_id** (string | null) - Optional - The ID of the transaction document. Max length: 512. Example: `1234567890` - **transaction_document_type** (string | null) - Optional - The type of the transaction document. Enum: `invoice`, `purchase_order`, `delivery_slip`, `contract`, `customs_declaration`, `bill_of_lading`, `others`. Example: `invoice` ### Request Example ```json { "bank_account_id": "ba_000000000000", "currency_type": "sender", "cover_fees": true, "request_amount": 1000, "network": "sepolia", "token": "USDC", "description": "Memo code or description, only works with USD and BRL", "partner_fee_id": "pf_000000000000", "transaction_document_type": "invoice", "transaction_document_id": "1234567890", "transaction_document_file": "https://example.com/image.png" } ``` ### Response #### Success Response (200) Quote creation details. - **id** (string) - The unique identifier for the created quote. - **expires_at** (integer) - The timestamp when the quote expires. - **commercial_quotation** (integer) - The commercial quotation amount. - **blindpay_quotation** (integer) - The BlindPay quotation amount. - **receiver_amount** (integer) - The amount the receiver will get. - **sender_amount** (integer) - The amount the sender will pay. - **partner_fee_amount** (integer) - The amount of the partner fee. - **flat_fee** (integer) - The flat fee amount. - **contract** (object) - Details of the smart contract for the transaction. - **abi** (array) - The ABI of the contract. - **address** (string) - The address of the contract. - **functionName** (string) - The function name to be called. - **blindpayContractAddress** (string) - The BlindPay contract address. - **amount** (string) - The amount specified in the contract. - **network** (object) - Details of the network. - **name** (string) - The name of the network. - **chainId** (integer) - The chain ID of the network. - **receiver_local_amount** (integer) - The receiver's amount in local currency. - **description** (string) - The description provided for the quote. #### Response Example ```json { "id": "qu_000000000000", "expires_at": 1712958191, "commercial_quotation": 495, "blindpay_quotation": 485, "receiver_amount": 5240, "sender_amount": 1010, "partner_fee_amount": 150, "flat_fee": 50, "contract": { "abi": [ {} ], "address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", "functionName": "approve", "blindpayContractAddress": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", "amount": "1000000000000000000", "network": { "name": "Ethereum", "chainId": 1 } }, "receiver_local_amount": 1000, "description": "Memo code or description, only works with USD and BRL" } ``` ``` -------------------------------- ### Offramp Wallets API Source: https://api.blindpay.com/reference/index Operations for managing offramp wallets linked to bank accounts. ```APIDOC ## POST /v1/instances/{instance_id}/receivers/{receiver_id}/bank-accounts/{bank_account_id}/offramp-wallets ### Description Creates a new offramp wallet for a bank account. ### Method POST ### Endpoint /v1/instances/{instance_id}/receivers/{receiver_id}/bank-accounts/{bank_account_id}/offramp-wallets ### Parameters #### Path Parameters - **instance_id** (string) - Required - The ID of the instance. - **receiver_id** (string) - Required - The ID of the receiver. - **bank_account_id** (string) - Required - The ID of the bank account. ### Request Body (Details not provided in the source text) ### Response (Details not provided in the source text) ``` ```APIDOC ## GET /v1/instances/{instance_id}/receivers/{receiver_id}/bank-accounts/{bank_account_id}/offramp-wallets ### Description Retrieves a list of offramp wallets for a bank account. ### Method GET ### Endpoint /v1/instances/{instance_id}/receivers/{receiver_id}/bank-accounts/{bank_account_id}/offramp-wallets ### Parameters #### Path Parameters - **instance_id** (string) - Required - The ID of the instance. - **receiver_id** (string) - Required - The ID of the receiver. - **bank_account_id** (string) - Required - The ID of the bank account. ### Response (Details not provided in the source text) ``` ```APIDOC ## GET /v1/instances/{instance_id}/receivers/{receiver_id}/bank-accounts/{bank_account_id}/offramp-wallets/{id} ### Description Retrieves a specific offramp wallet by its ID. ### Method GET ### Endpoint /v1/instances/{instance_id}/receivers/{receiver_id}/bank-accounts/{bank_account_id}/offramp-wallets/{id} ### Parameters #### Path Parameters - **instance_id** (string) - Required - The ID of the instance. - **receiver_id** (string) - Required - The ID of the receiver. - **bank_account_id** (string) - Required - The ID of the bank account. - **id** (string) - Required - The ID of the offramp wallet. ### Response (Details not provided in the source text) ``` -------------------------------- ### Partner Fees API Source: https://api.blindpay.com/reference/index Operations related to managing partner fees within instances. ```APIDOC ## POST /v1/instances/{instance_id}/partner-fees ### Description Creates a new partner fee entry. ### Method POST ### Endpoint /v1/instances/{instance_id}/partner-fees ### Parameters #### Path Parameters - **instance_id** (string) - Required - The ID of the instance. ### Request Body (Details not provided in the source text) ### Response (Details not provided in the source text) ``` ```APIDOC ## GET /v1/instances/{instance_id}/partner-fees ### Description Retrieves a list of all partner fees for a given instance. ### Method GET ### Endpoint /v1/instances/{instance_id}/partner-fees ### Parameters #### Path Parameters - **instance_id** (string) - Required - The ID of the instance. ### Response (Details not provided in the source text) ``` ```APIDOC ## GET /v1/instances/{instance_id}/partner-fees/{id} ### Description Retrieves a specific partner fee by its ID. ### Method GET ### Endpoint /v1/instances/{instance_id}/partner-fees/{id} ### Parameters #### Path Parameters - **instance_id** (string) - Required - The ID of the instance. - **id** (string) - Required - The ID of the partner fee. ### Response (Details not provided in the source text) ``` ```APIDOC ## DELETE /v1/instances/{instance_id}/partner-fees/{id} ### Description Deletes a specific partner fee by its ID. ### Method DELETE ### Endpoint /v1/instances/{instance_id}/partner-fees/{id} ### Parameters #### Path Parameters - **instance_id** (string) - Required - The ID of the instance. - **id** (string) - Required - The ID of the partner fee. ### Response (Details not provided in the source text) ``` -------------------------------- ### Terms Of Service API Source: https://api.blindpay.com/reference/index Operations related to managing terms of service for instances. ```APIDOC ## POST /v1/e/instances/{instance_id}/tos ### Description Accepts or manages terms of service for an instance. ### Method POST ### Endpoint /v1/e/instances/{instance_id}/tos ### Parameters #### Path Parameters - **instance_id** (string) - Required - The ID of the instance. ### Request Body (Details not provided in the source text) ### Response (Details not provided in the source text) ``` -------------------------------- ### Virtual Accounts API Operations Source: https://api.blindpay.com/reference/index This section describes the API operations for managing virtual accounts associated with receivers. It covers creating, retrieving, and updating virtual accounts. Instance ID, receiver ID are required path parameters. ```api POST /v1/instances/{instance_id}/receivers/{receiver_id}/virtual-accounts GET /v1/instances/{instance_id}/receivers/{receiver_id}/virtual-accounts PUT /v1/instances/{instance_id}/receivers/{receiver_id}/virtual-accounts ``` -------------------------------- ### Virtual Accounts API Source: https://api.blindpay.com/reference/index Operations for managing virtual accounts associated with receivers. ```APIDOC ## POST /v1/instances/{instance_id}/receivers/{receiver_id}/virtual-accounts ### Description Creates a new virtual account for a receiver. ### Method POST ### Endpoint /v1/instances/{instance_id}/receivers/{receiver_id}/virtual-accounts ### Parameters #### Path Parameters - **instance_id** (string) - Required - The ID of the instance. - **receiver_id** (string) - Required - The ID of the receiver. ### Request Body (Details not provided in the source text) ### Response (Details not provided in the source text) ``` ```APIDOC ## GET /v1/instances/{instance_id}/receivers/{receiver_id}/virtual-accounts ### Description Retrieves a list of virtual accounts for a receiver. ### Method GET ### Endpoint /v1/instances/{instance_id}/receivers/{receiver_id}/virtual-accounts ### Parameters #### Path Parameters - **instance_id** (string) - Required - The ID of the instance. - **receiver_id** (string) - Required - The ID of the receiver. ### Response (Details not provided in the source text) ``` ```APIDOC ## PUT /v1/instances/{instance_id}/receivers/{receiver_id}/virtual-accounts ### Description Updates an existing virtual account for a receiver. ### Method PUT ### Endpoint /v1/instances/{instance_id}/receivers/{receiver_id}/virtual-accounts ### Parameters #### Path Parameters - **instance_id** (string) - Required - The ID of the instance. - **receiver_id** (string) - Required - The ID of the receiver. ### Request Body (Details not provided in the source text) ### Response (Details not provided in the source text) ``` -------------------------------- ### Webhook Event Types Source: https://api.blindpay.com/reference/index This section lists the available webhook event types that can be subscribed to. These events cover various states and updates for accounts, limits, payins, payouts, and receivers. Webhooks are essential for real-time notifications. ```webhook postbankAccount.new postblockchainWallet.new postlimitIncrease.new postlimitIncrease.update postpayin.new postpayin.complete postpayin.partnerFee postpayin.update postpayout.new postpayout.complete postpayout.partnerFee postpayout.update postreceiver.new postreceiver.update posttos.accept ``` -------------------------------- ### Payout Quote Creation Response Schema Source: https://api.blindpay.com/reference/index This JSON object represents the successful response schema for a payout quote creation request. It includes details such as quote ID, expiration time, various quotation amounts (commercial, BlindPay, receiver, sender), fees, and contract information for the transaction. ```json { "id": "qu_000000000000", "expires_at": 1712958191, "commercial_quotation": 495, "blindpay_quotation": 485, "receiver_amount": 5240, "sender_amount": 1010, "partner_fee_amount": 150, "flat_fee": 50, "contract": { "abi": [ {} ], "address": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", "functionName": "approve", "blindpayContractAddress": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", "amount": "1000000000000000000", "network": { "name": "Ethereum", "chainId": 1 } }, "receiver_local_amount": 1000, "description": "Memo code or description, only works with USD and BRL" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.