### Off-ramp and On-ramp Example (USDC to BRL) Source: https://docs.transfero.com/reference/preview-a-swap This example demonstrates the structure for a transaction involving USDC and BRL, showing conditional fields for off-ramp and on-ramp operations. ```json { "taxId": "33821597035", "name": "José", //optional "email": "jose@bzr.group", //optional "externalId": "123", //optional "taxIdCountry": "BRA", // Conditional: Required for Off-ramp "DepositBlockchain": "Ethereum", "fiatWithdrawalInformation": { "Key": "valid@sandbox.com" }, // Conditional: Required for On-ramp // "cryptoWithdrawalInformation": { // "key": "0x636...", // "blockChain": "Ethereum" // }, // Optional: For Auto-Refunds on Off-ramp // "refundCryptoAddress": "0x...", // required "quoteRequest": { "Side": "Sell", "BaseAmount": 10, "QuoteAmount": 0, "BaseCurrency": "USDC", "QuoteCurrency": "BRL" } } ``` -------------------------------- ### Deposit Order Callback Request Example Source: https://docs.transfero.com/reference/deposit-order-callback This example shows a successful response from the deposit order callback endpoint. ```json { "subscriptionId": "646a7469-26ef-48cc-a7c5-8306ab903bc8", "accountId": "15", "notificationType": "Webhook" } ``` -------------------------------- ### Retrieve Account Balance Example Source: https://docs.transfero.com/reference/retrieve-the-account-balance This example shows the expected JSON response when successfully retrieving an account balance. It includes the amount, currency, account type, and the timestamp of the inquiry. ```json { "balance": { "amount": 5501, "currency": "BRL" }, "type": "Credit", "timeStamp": "2019-10-05T02:45:00Z" } ``` -------------------------------- ### Swap Order Response Example Source: https://docs.transfero.com/reference/create-a-swap-order This example demonstrates the structure of a successful response when creating a swap order. It includes details like the order ID, currency, blockchain, deposit amount, reference ID, expiration time, deposit address, and wallet address for off-ramp cases. ```json { "id": "b6a11cca-ef64-4292-8bbd-a78689bda16d", "currency": "BRL", "blockchain": "Bitcoin", "depositAmount": 101.1, "referenceId": "teste-reference01", "expireAt": "2020-07-30T18:00:00.000Z", "depositAddress": "pix-0123129442", "blockchainFee": 3, "walletAddress": "0xdasd15215w2344",//only for offramp cases "base64QRCode": "oijfvbgtrgoAAAANSUhEUgAAAW0AAAFtCAYAAADMATsiAAA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25RqJOiduKt2X8zj/wK+vHfUtROvDW7sNyts+p+3SfQ3WpFs1Kok2LpFiualQvX+8T9RqAPeUtRO/HW7MJyt86q+3WfQHerFc1KoU6KpVusaFYuXO8T9xuBPuQtRe3EW7MLy906q+ ``` -------------------------------- ### USDC to USD Swap Example Source: https://docs.transfero.com/reference/preview-a-swap This example defines a quote request for selling USDC to receive USD, including detailed fiat withdrawal information for international transfers. ```json { "quoteRequest": { "side": "Sell", "quoteAmount": 300, "baseAmount": 0, "baseCurrency": "USDC", "quoteCurrency": "USD" }, "taxId": "46356246172", "taxIdCountry": 76, "fiatWithdrawalInformation": { "ComplementaryInfos": { "senderType": "INDIVIDUAL" | "BUSINESS", "senderCountry": "BR", "recipientType": "INDIVIDUAL" | "BUSINESS", "destinationCountry": "US", "methodType": "WIRE" | "FEDWIRE", "beneficiaryAccountData": { "bankName": "Bank of America", "swiftCode": "BOFAUS3N", "bankCountry": "US", "accountNumber": "123456789012", "recipientLegalName": "Gabriela Souza" }, "travelRuleData": { "originatorName": "Josuel", "originatorAccountNumber": "test-account-12345", "originatorPhoneNumber": "5521987654321", "originatorAddress": { "street": "123 Main St", "city": "New York", "stateProvince": "NY", "postalCode": "10001", "country": "US" }, "beneficiaryName": "Gabriela Souza", "beneficiaryAddress": { "street": "742 Evergreen Terrace", "city": "Springfield", "stateProvince": "IL", "postalCode": "62704", "country": "US" } }, "useCase": "C2B" | "B2C" | "C2C" | "B2B", "reasonForPaymentType": "PMT001", "customerRefId": "CUST-BR123456" //optional } } } ``` -------------------------------- ### Swap Order Callback Message Example Source: https://docs.transfero.com/reference/swap-order-callback This is an example of the JSON message structure that will be sent to your provided callback URL for critical status changes in the swap order flow. ```json { "id": "123456789-0e9c-492e-8815-10ef81964f87", "externalId": "TESTETESTE99D6f3521dF211DcC3EE1Ca62dC9d559", "clientId": "testetes-24f9-4f7e-afe9-16ac09e8787a", "referenceId": "TESTESTES1517571431075858", "name": "Phineas", "taxId": "12345678910", "taxIdCountry": "BRA", "status": "SwapOrderCreated", "from": { "accountId": "0000", "amount": 10.00, "currency": "BRL" }, "to": { "accountId": "0000", "amount": 10.0000, "currency": "BRZ" }, "depositInformation": { "blockchain": "None" }, "withdrawalInformation": { "blockchain": "Polygon", "accountKey": "TESTETESTE99D6f3521dF211DcC3EE1Ca62dC9d559" } } ``` -------------------------------- ### Successful Response Example Source: https://docs.transfero.com/reference/retrieve-payment-groups-by-taxid This example shows the structure of a successful response when retrieving payment groups. It includes details like payment group ID, total amounts, and payment counts. ```json [ { "paymentGroupId": "86571dbd-e97f-4552-ae9c-22f0e81abfba", "totalAmount": 4000, "totalAmountPaymentsCompletedWithSuccess": 0, "numberOfPayments": 2, "numberOfPaymentsPending": 1, "numberOfPaymentsProcessing": 1, "numberOfPaymentsCompletedWithSuccess": 0, "numberOfPaymentsCompletedWithError": 0, "createdAt": "2020-05-14", "createdAtDetailed": "0001-01-01T12:00:00Z" }, { "paymentGroupId": "3801bdda-22f1-44e6-99dc-5673fc540a40", "totalAmount": 2513.5, "totalAmountPaymentsCompletedWithSuccess": 13.5, "numberOfPayments": 2, "numberOfPaymentsPending": 0, "numberOfPaymentsProcessing": 0, "numberOfPaymentsCompletedWithSuccess": 1, "numberOfPaymentsCompletedWithError": 1, "createdAt": "2020-05-14", "createdAtDetailed": "0001-01-01T12:00:00Z" }] ``` -------------------------------- ### Preview Swap Request Source: https://docs.transfero.com/reference/preview-a-swap This example demonstrates how to preview a swap with an off-ramp using a QR code without an embedded value. You must provide either BaseAmount or QuoteAmount in the quoteRequest. ```APIDOC ## POST /v1/swap/preview ### Description Simulates a ramp process to generate a quote, validates the payload, calculates the exchange rate, and estimates blockchain fees. ### Method POST ### Endpoint /v1/swap/preview ### Parameters #### Request Body - **taxId** (string) - Required - Tax ID of the user. - **name** (string) - Required - Name of the user. - **email** (string) - Required - Email of the user. - **externalId** (string) - Required - External ID for the transaction. - **taxIdCountry** (string) - Required - Country code for the tax ID. - **DepositBlockchain** (string) - Required - The blockchain network for deposit. - **fiatWithdrawalInformation** (object) - Optional - Information for fiat withdrawal. - **Key** (string) - Required if QrCode is not present - PIX Key for withdrawal. - **QrCode** (string) - Required if Key is not present - QR Code for withdrawal. - **cryptoWithdrawalInformation** (object) - Optional - Information for cryptocurrency withdrawal. - **address** (string) - Required - The cryptocurrency withdrawal address. - **network** (string) - Required - The blockchain network for withdrawal. - **quoteRequest** (object) - Required - Details for the quote request. - **Side** (string) - Required - 'Buy' or 'Sell'. - **BaseAmount** (number) - Required - The amount in the base currency. - **QuoteAmount** (number) - Required - The amount in the quote currency. - **BaseCurrency** (string) - Required - The base currency symbol. - **QuoteCurrency** (string) - Required - The quote currency symbol. - **refundCryptoAddress** (string) - Optional - Address for automatic refunds. ### Request Example ```json { "taxId": "33821597035", "name": "José", "email": "jose@bz.group", "externalId": "123", "taxIdCountry": "BRA", "DepositBlockchain": "Polygon", "fiatWithdrawalInformation": { "QrCode": "000201..." }, "quoteRequest": { "Side": "Sell", "BaseAmount": 10, "QuoteAmount": 0, "BaseCurrency": "USDC", "QuoteCurrency": "BRL" } } ``` ### Response #### Success Response (200) - **previewId** (string) - ID required to create a swap order. - **blockchainFee** (number) - Estimated blockchain network fee. #### Response Example ```json { "previewId": "pre_12345abcde", "blockchainFee": 0.0005 } ``` ``` -------------------------------- ### Accept Swap Order Request Source: https://docs.transfero.com/reference/create-swap-order-accept Use this example to accept a swap order. Ensure you have a valid previewId from the Preview endpoint. An externalId can be provided for your own tracking. ```json { "previewId": "97fe5691-3473-43cd-a047-e965fe7005fa", "externalId": "kl122ml2-0667-45ml-6a48-332a52b1559" } ``` -------------------------------- ### New Payment Request (Alias) Source: https://docs.transfero.com/reference/new-payment This example shows how to initiate a payment using an alias. The alias field replaces the CBU/CVU for recipient identification. ```json { "paymentGroupId": "6a08ae9f-2e88-408d-b95d-85e6dad6389e", "totalAmount": 10000, "totalAmountPaymentsCompletedWithSuccess": 0, "numberOfPayments": 1, "numberOfPaymentsPending": 1, "numberOfPaymentsProcessing": 0, "numberOfPaymentsCompletedWithSuccess": 0, "numberOfPaymentsCompletedWithError": 0, "createdAt": "2020-05-14", "payments": [{ "paymentId": "754bd72a-3b72-4c3a-a511-315ca44ed151", "amount": 10000, "currency": "ARS", "name": "Maria Oliveira", "taxIdCountry": 32, "taxId": "27870613097", "alias": "12a345a6789" }] } ``` -------------------------------- ### USDC to MXN Swap Example Source: https://docs.transfero.com/reference/preview-a-swap This example defines a quote request for selling USDC to receive MXN, including specific fiat withdrawal information for Mexican bank transfers via SPEI. ```json { "quoteRequest": { "side": "Sell", "quoteAmount": 300, "baseAmount": 0, "baseCurrency": "USDC", "quoteCurrency": "MXN" }, "taxId": "46356246172", "taxIdCountry": 76, "fiatWithdrawalInformation": { "ComplementaryInfos": { "senderType": "INDIVIDUAL" | "BUSINESS", "senderCountry": "US", "recipientType": "INDIVIDUAL" | "BUSINESS", "destinationCountry": "MX", "methodType": "SPEI", "beneficiaryAccountData": { "clabe": "46356246172" }, "travelRuleData": { "originatorName": "Josuel", "originatorAccountNumber": "test-account-12345", "originatorAddress": { "street": "123 Main St", "city": "New York", "stateProvince": "NY", "postalCode": "10001", "country": "US" }, "beneficiaryName": "Gabriela Souza", "beneficiaryNationalIdentificationNumber": "1234567890", "beneficiaryAddress": { "street": "Av. Paseo de la Reforma 350", "city": "Ciudad de México", "stateProvince": "CDMX", "postalCode": "06600", "country": "MX" } }, "useCase": "C2B" | "B2C" | "C2C" | "B2B", "reasonForPaymentType": "PMT001", "refCode": "TRANSFERENCIA CLIENTE 1 PARA CLIENTE 2" } } } ``` -------------------------------- ### Nigerian Payment Request Example Source: https://docs.transfero.com/reference/new-payment Example of a payment request for Nigerian currency. Requires details like amount, currency, name, tax ID, and bank account information. ```json [ { "amount": 1.50, "currency": "USDT", "name": "Nigerian Example", "taxIdCountry": "NGN", "taxId": "7654444432", "outputCurrency": "NGN", "emailAddress": "teste@transfero.com", "phoneNumber": "+9877776645", "bankAccount": "0987654332", "bankCode": "011", "bankBranch": "Lagos" } ] ``` -------------------------------- ### Preview Swap Request with QR Code with Value Source: https://docs.transfero.com/reference/preview-a-swap This example shows how to preview a swap when the QR code has an embedded value. Both BaseAmount and QuoteAmount must be set to 0 in the quoteRequest. ```APIDOC ## POST /v1/swap/preview ### Description Simulates a ramp process to generate a quote, validates the payload, calculates the exchange rate, and estimates blockchain fees. ### Method POST ### Endpoint /v1/swap/preview ### Parameters #### Request Body - **taxId** (string) - Required - Tax ID of the user. - **name** (string) - Required - Name of the user. - **email** (string) - Required - Email of the user. - **externalId** (string) - Required - External ID for the transaction. - **taxIdCountry** (string) - Required - Country code for the tax ID. - **DepositBlockchain** (string) - Required - The blockchain network for deposit. - **fiatWithdrawalInformation** (object) - Optional - Information for fiat withdrawal. - **Key** (string) - Required if QrCode is not present - PIX Key for withdrawal. - **QrCode** (string) - Required if Key is not present - QR Code for withdrawal. - **cryptoWithdrawalInformation** (object) - Optional - Information for cryptocurrency withdrawal. - **address** (string) - Required - The cryptocurrency withdrawal address. - **network** (string) - Required - The blockchain network for withdrawal. - **quoteRequest** (object) - Required - Details for the quote request. - **Side** (string) - Required - 'Buy' or 'Sell'. - **BaseAmount** (number) - Required - The amount in the base currency. - **QuoteAmount** (number) - Required - The amount in the quote currency. - **BaseCurrency** (string) - Required - The base currency symbol. - **QuoteCurrency** (string) - Required - The quote currency symbol. - **refundCryptoAddress** (string) - Optional - Address for automatic refunds. ### Request Example ```json { "taxId": "33821597035", "name": "José", "email": "jose@bz.group", "externalId": "123", "taxIdCountry": "BRA", "DepositBlockchain": "Polygon", "fiatWithdrawalInformation": { "QrCode": "000201..." }, "quoteRequest": { "Side": "Sell", "BaseAmount": 0, "QuoteAmount": 0, "BaseCurrency": "USDC", "QuoteCurrency": "BRL" } } ``` ### Response #### Success Response (200) - **previewId** (string) - ID required to create a swap order. - **blockchainFee** (number) - Estimated blockchain network fee. #### Response Example ```json { "previewId": "pre_12345abcde", "blockchainFee": 0.0005 } ``` ``` -------------------------------- ### Preview USDC to EUR Swap Source: https://docs.transfero.com/reference/preview-a-swap This example demonstrates the JSON payload for previewing a USDC to EUR swap. It specifies SEPA as the withdrawal method and includes travel rule data. ```json { "quoteRequest": { "side": "Sell", "quoteAmount": 300, "baseAmount": 0, "baseCurrency": "USDC", "quoteCurrency": "EUR" }, "taxId": "46356246172", "taxIdCountry": 76, "fiatWithdrawalInformation": { "ComplementaryInfos": { "senderType": "INDIVIDUAL", "senderCountry": "BR", "recipientType": "INDIVIDUAL", "destinationCountry": "PT", "methodType": "SEPA", "beneficiaryAccountData": { "iban": "PT50003300004512345678901", "recipientLegalName": "João Miguel Pereira" }, "travelRuleData": { "originatorName": "Josuel", "originatorAccountNumber": "test-account-12345", "originatorAddress": { "street": "123 Main St", "city": "New York", "stateProvince": "NY", "postalCode": "10001", "country": "US" }, "beneficiaryName": "João Miguel Pereira", "beneficiaryNationalIdentificationNumber": "1234567890", "beneficiaryAddress": { "street": "Av. da Liberdade 245", "city": "Lisboa", "stateProvince": "Lisboa", "postalCode": "1250-096", "country": "PT" } }, "useCase": "C2C", "reasonForPaymentType": "PMT001", "refCode": "TRANSFERENCIA CLIENTE 1 PARA CLIENTE 2" } } } ``` -------------------------------- ### New Payment Request (Pix Key) Source: https://docs.transfero.com/reference/new-payment This example demonstrates creating a payment request using a Pix key for recipient identification. The currency is set to BRL. ```json { "paymentGroupId": "6a08ae9f-2e88-408d-b95d-85e6dad6389e", "totalAmount": 370, "totalAmountPaymentsCompletedWithSuccess": 0, "numberOfPayments": 1, "numberOfPaymentsPending": 1, "numberOfPaymentsProcessing": 0, "numberOfPaymentsCompletedWithSuccess": 0, "numberOfPaymentsCompletedWithError": 0, "createdAt": "2020-05-14", "payments": [{ "paymentId": "754bd72a-3b72-4c3a-a511-315ca44ed151", "amount": 370, "currency": "BRL", "name": "Maria Oliveira", "taxIdCountry": 76, "taxId": "85517053009", "pixKey": "maria_oliveira@gmail.com" }] } ``` -------------------------------- ### Error: Account ID Null Source: https://docs.transfero.com/reference/retrieve-the-account-balance This example illustrates the plain text error response when the provided AccountId is null or empty. ```text AccountId cannot be null or empty ``` -------------------------------- ### Euro Withdrawal Request Example Source: https://docs.transfero.com/reference/new-payment Example of a payment request for Euro withdrawal. Requires amount, currency, name, tax ID country, tax ID, and IBAN. ```json [ { "amount": 150, "currency": "EUR", "name": "Napoleão Bonaparte", "taxIdCountry": 250, "taxId": "27870613097", "iban": "FR1420041010050500013M02606" } ] ``` -------------------------------- ### Crypto Withdrawal Request Example Source: https://docs.transfero.com/reference/new-payment Example of a payment request for cryptocurrency withdrawal. Requires amount, currency, tax ID country, tax ID, wallet address, and blockchain network. ```json [ { "amount": 100, "currency": "USDT", "taxIdCountry": "BRA", "taxId": "89953635099", "wallet": "0x7756aD1a21b3648f747FFeB937017034B02A9620", "blockchain": "Ethereum" } ] ``` -------------------------------- ### Get Account Information Source: https://docs.transfero.com/reference/retrieve-account-informations Retrieve the details of a specific account using its unique identifier. ```APIDOC ## GET /accounts/{accountId} ### Description Retrieves the details for a specific account based on the provided account ID. ### Method GET ### Endpoint /accounts/{accountId} ### Parameters #### Path Parameters - **accountId** (string) - Required - The unique identifier of the account. ### Response #### Success Response (200) - **accountDetails** (object) - Contains the detailed information of the account. - **accountId** (string) - The unique identifier of the account. - **accountName** (string) - The name of the account. - **balance** (number) - The current balance of the account. - **currency** (string) - The currency of the account balance. #### Response Example ```json { "accountId": "acc_12345", "accountName": "John Doe's Checking", "balance": 1500.75, "currency": "USD" } ``` #### Error Responses - **400 Bad Request**: Returned if the provided accountId is invalid. - **Response Example**: ``` Invalid accountId {accountId} ``` - **404 Not Found**: Returned if no account is found with the specified accountId. - **Response Example**: ``` No accounts were found. ``` - **500 Internal Server Error**: Returned if there is an unexpected server error. - **Response Example**: ``` Internal Server Error ``` ``` -------------------------------- ### Error Case: Missing TaxId Source: https://docs.transfero.com/reference/new-payment Example of a payment request missing the mandatory TaxId field. This will result in an error. ```json [ { "amount": 370, "currency": "BRL", "name": "Irmao do Jorel", "taxIdCountry": "BRA", "pixKey": "12345678910" } ] ``` -------------------------------- ### Configure Cursor for Transfero BaaSiC MCP Source: https://docs.transfero.com/reference/mcp Add this configuration to `~/.cursor/mcp.json` to enable Cursor to connect to the Transfero BaaSiC MCP server. ```json { "mcpServers": { "transfero-baasic": { "serverUrl": "https://docs.transfero.com/mcp" } } } ``` -------------------------------- ### Staging Environment URL Source: https://docs.transfero.com/reference/getting-started-with-baasic-api Use this URL to access the staging environment for testing and integration. ```json https://sandbox-api-baasic.transfero.com ``` -------------------------------- ### GET /deposit-orders Source: https://docs.transfero.com/reference/retrieve-deposit-orders Retrieves a list of deposit orders. Supports filtering by status, transaction ID, external ID, and pagination. ```APIDOC ## GET /deposit-orders ### Description Retrieves a list of deposit orders. Supports filtering by status, transaction ID, external ID, and pagination. ### Method GET ### Endpoint /deposit-orders ### Parameters #### Query Parameters - **status** (string) - Optional - Current searched status - **transactionId** (string) - Optional - Unique identifier for credit transaction - **externalId** (string) - Optional - A unique identifier generated after the creation of the deposit flow. - **pageNumber** (integer) - Optional - As a paginated endpoint, It's possible to define which page to get information - **pageSize** (integer) - Optional - As a paginated endpoint, It's possible to select how many responses the page can have #### Header Parameters - **Authorization** (string) - Required - The personal authentication token obtained by each user from the token authentication endpoint ### Response #### Success Response (200) - **referenceId** (string) - Description - **amount** (number) - Description - **taxId** (string) - Description - **createdAt** (string) - Description - **status** (string) - Description - **transactionId** (string) - Description - **expirationDate** (string) - Description - **externalId** (string) - Description #### Response Example (200) ```json [ { "referenceId": "22042666F87D165497CE", "amount": 10, "taxId": null, "createdAt": "2022-04-26T06:33:24Z", "status": "Confirmed", "transactionId": "f8b663aa-fb96-425e-aa13-01e6b179aecc", "expirationDate": "2025-10-15T15:53:11.279198Z", "externalId": "2d2093e0-fae7-4281-bf50-9ac3d0e93e7a" }, { "referenceId": "2204261379BBDB64B3C2", "amount": 0.01, "taxId": null, "createdAt": "2022-04-26T06:53:55Z", "status": "Pending", "expirationDate": "2025-10-15T15:53:11.279198Z", "transactionId": null, "externalId": null } ] ``` #### Success Response (204) No deposit found. #### Response Example (204) "" #### Error Response (400) - **Null AccountId** - "AccountId can't be null" - **inexistente status** - "Invalid status value" #### Response Example (400) "AccountId can't be null" "Invalid status value" #### Error Response (404) - **Not found Account** - "Account not found" #### Response Example (404) "Account not found" #### Error Response (500) - **Result** - "" #### Response Example (500) "" ``` -------------------------------- ### Error Case: Invalid Pix Key (CNPJ) Source: https://docs.transfero.com/reference/new-payment Example of an invalid Pix Key format for a CNPJ, containing non-numeric characters. ```json [ { "amount": 370, "currency": "BRL", "name": "Irmao do Jorel", "taxIdCountry": "BRA", "taxId": "12345678910", "pixKey": "12.345.678/0001-90" } ] ``` -------------------------------- ### Preview USDC to HKD Swap Source: https://docs.transfero.com/reference/preview-a-swap This example shows the JSON payload for previewing a USDC to HKD swap. It includes details for fiat withdrawal, sender/recipient information, and travel rule data. ```json { "quoteRequest": { "side": "Sell", "quoteAmount": 300, "baseAmount": 0, "baseCurrency": "USDC", "quoteCurrency": "HKD" }, "taxId": "46356246172", "taxIdCountry": 76, "fiatWithdrawalInformation": { "ComplementaryInfos": { "senderType": "INDIVIDUAL" | "BUSINESS", "senderCountry": "BR", "recipientType": "INDIVIDUAL" | "BUSINESS", "destinationCountry": "HK", "methodType": "WIRE" | "CHATS" | "FPS", "beneficiaryAccountData": { "bankName": "HSBC Hong Kong", "swiftCode": "HSBCHKHHHKH", "bankCountry": "HK", "accountNumber": "123456789012", "recipientLegalName": "Gabriela Souza" }, "travelRuleData": { "originatorName": "Josuel", "originatorNationalIdentificationNumber": "1234567890", "originatorAccountNumber": "test-account-12345", "originatorAddress": { "street": "123 Main St", "city": "New York", "stateProvince": "NY", "postalCode": "10001", "country": "US" }, "beneficiaryName": "Gabriela Souza", "beneficiaryAddress": { "street": "123 Queen's Road Central", "city": "Hong Kong", "stateProvince": "Hong Kong", "postalCode": "00000", "country": "HK" } }, "useCase": "C2B" | "B2C" | "C2C" | "B2B", "reasonForPaymentType": "PMT001", "refCode": "TRANSFERENCIA CLIENTE 1 PARA CLIENTE 2" } } } ``` -------------------------------- ### Error Case: Invalid Pix Key (CPF) Source: https://docs.transfero.com/reference/new-payment Example of an invalid Pix Key format for a CPF, containing non-numeric characters. ```json [ { "amount": 370, "currency": "BRL", "name": "Irmao do Jorel", "taxIdCountry": "BRA", "taxId": "12345678910", "pixKey": "123.456.789-10" } ] ``` -------------------------------- ### POST /api/ramp/v2/swaporder/preview Source: https://docs.transfero.com/reference/preview-a-swap This endpoint allows you to preview a swap order. You need to provide authentication details and the swap parameters in the request body. ```APIDOC ## POST /api/ramp/v2/swaporder/preview ### Description Allows users to preview a swap order and get quote information. ### Method POST ### Endpoint /api/ramp/v2/swaporder/preview ### Parameters #### Header Parameters - **Authorization** (string) - Required - Authentication token. #### Request Body - **taxId** (string) - Required - Field that uniquely identifies the individual or country. Only numbers accepted, all numbers should be sent, including leading zeros when applicable. - **taxIdCountry** (string) - Required - Country code for the tax ID. ### Request Example ```json { "taxId": "1234567890", "taxIdCountry": "USA" } ``` ### Response #### Success Response (200) - **previewId** (string) - Unique identifier for the preview. - **quoteInformation** (object) - Contains details about the swap quote. - **side** (string) - The side of the swap (e.g., "Sell"). - **quoteId** (string) - Unique identifier for the quote. - **baseCurrency** (string) - The base currency of the swap. - **quoteCurrency** (string) - The quote currency of the swap. - **baseAmount** (number) - The amount of the base currency. - **quoteAmount** (number) - The amount of the quote currency. - **price** (number) - The exchange rate. - **expireAt** (string) - The expiration date and time of the quote. - **blockchainFee** (number) - The estimated blockchain transaction fee. #### Response Example ```json { "previewId": "6294e109-35c2-442e-943d-3ef0204f2fe0", "quoteInformation": { "side": "Sell", "quoteId": "c5757347-fc16-4e68-a0f4-0ade57ab84eb", "baseCurrency": "USDC", "quoteCurrency": "MXN", "baseAmount": 0, "quoteAmount": 300, "price": 17.203439, "expireAt": "2025-12-15T21:50:32.415939+00:00" }, "blockchainFee": null } ``` #### Error Response (400) Bad Request #### Error Response (401) Unauthorized ``` -------------------------------- ### Error Case: Invalid Pix Key (Email) Source: https://docs.transfero.com/reference/new-payment Example of an invalid Pix Key format for an email address. This will likely result in an error. ```json [ { "amount": 370, "currency": "BRL", "name": "Irmao do Jorel", "taxIdCountry": "BRA", "taxId": "12345678910", "pixKey": "anacatarinas2gmail.com" } ] ``` -------------------------------- ### Create Payment via QR Code Source: https://docs.transfero.com/reference/new-payment Use this snippet to create a payment using a QR code. It is recommended to use the payment preview endpoint before creating the payment contract. ```json [ { "amount": 1500, "currency": "BRL", "name": "Timmy Turner", "taxIdCountry": "BRA", "taxId": "12345678910", "qrCode": "00012345671226890014br.gov.bcb.pix2567brcode-h.sandbox.fakeinfra.com/v2/c3957f884d7542ac8ef5b4a1a2da265d5204000053039865802BR5925Fake Ltd6014Rio de Janeiro62070503***630412F5" } ] ```