Skip to main content

Receive Mock Funds

This operation simulates receiving funds through PIX payment to fill your Avenia balance with any currency.

Quote

Endpoint

GET /v2/account/quote/fixed-rate

Parameters

FieldValueTypeDescription
inputCurrencyBRLstringThe currency you are paying with
inputPaymentMethodPIXstringThe payment method you are using
outputCurrencyBRLAstringThe currency you want to receive
outputPaymentMethodINTERNALstringThe method you want to receive funds
inputAmount1000decimal.DecimalThe amount you want to pay/deposit. Required if outputAmount is not provided.
outputAmount-decimal.DecimalThe amount you want to receive. Required if inputAmount is not provided.
inputThirdPartyfalseboolSpecifies whether the input is coming from a third party. true or false.
outputThirdPartyfalseboolSpecifies whether the output is going to a third party. true or false.
blockchainSendMethodPERMITstringDefines the blockchain transaction type. Can be TRANSFER or PERMIT. Required for blockchain inputs.

Example

curl -X GET "https://api.sandbox.avenia.io:10952/v2/account/quote/fixed-rate?inputCurrency=BRL&inputPaymentMethod=PIX&inputAmount=1000&outputCurrency=BRLA&outputPaymentMethod=INTERNAL&inputThirdParty=false&outputThirdParty=false&blockchainSendMethod=PERMIT"
info

The outputCurrency and outputPaymentMethod can be any valid combination. See Supported Assets Table for valid options.

Ticket

To complete the operation, create a ticket with the quoteToken from the quote response:

{
"quoteToken": "eyJhdXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"ticketBlockchainOutput": {
"beneficiaryWalletId": "00000000-0000-0000-0000-000000000000"
}
}
info

The nil UUID (00000000-0000-0000-0000-000000000000) represents the current operating account. The operating account is resolved at quote time based on the subAccountId parameter.

Sub-Account Operations

To execute this operation on behalf of a sub-account, you must pass ?subAccountId={uuid} in both the quote request and the ticket request, using the same UUID:

GET /v2/account/quote/fixed-rate?subAccountId={uuid}   ← required here
POST /v2/account/tickets/?subAccountId={uuid} ← and here (same UUID)

Omitting subAccountId from the quote causes the operation to resolve to the main account — passing it only in the ticket has no effect.

info

For different outputCurrency and outputPaymentMethod combinations, additional ticket parameters may be required. See Operations Combinations for details.