POST
/
transactions
/
off-ramp
curl --request POST \
  --url https://api-sandbox.lumx.io/transactions/off-ramp \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "sourceCurrency": "USDC",
  "targetCurrency": "BRL",
  "amount": "100.123456",
  "payment": {
    "rail": "pix",
    "keyValue": "<string>",
    "keyType": "phone"
  }
}'
{
  "id": "123e4567-e89b-12d3-a456-426614174002",
  "customerId": "123e4567-e89b-12d3-a456-426614174001",
  "type": "off_ramp",
  "request": {
    "sourceCurrency": "USDC",
    "targetCurrency": "BRL",
    "amount": "1000.00",
    "payment": {
      "rail": "pix",
      "keyValue": "user@email.com",
      "keyType": "email"
    }
  },
  "state": {
    "status": "success",
    "payment": {
      "rail": "pix"
    },
    "receipt": {
      "rate": "6.0066",
      "sourceAmount": "1000.00",
      "targetAmount": "5925.55",
      "sourceCurrency": "USDC",
      "targetCurrency": "BRL",
      "fees": {
        "currency": "USDC",
        "lumx": {
          "percentage": "10.000000",
          "flat": "1"
        },
        "developer": {
          "percentage": "1.000000",
          "flat": "0.1"
        }
      },
      "blockchain": {
        "transactionHash": "0x0bf375d559848032092823fc6b821cc72426b890e91ab1a5d2acc7183c325832",
        "blockExplorerUrl": "https://polygonscan.com/"
      }
    }
  },
  "createdAt": "2024-03-20T15:30:00Z",
  "updatedAt": "2024-03-20T15:30:10Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <API_KEY>.

Body

application/json
customerId
string
required

The customer performing the operation.

sourceCurrency
enum<string>
required

The stablecoin to convert from.

Available options:
USDC,
USDT
targetCurrency
enum<string>
required

The fiat currency to convert to.

Available options:
BRL
amount
string
required

The amount to be converted from stablecoin to fiat.

Example:

"100.123456"

payment
object
required

The definition of how and where the funds from the off ramp transaction will be sent.

Response

201 - application/json
Off-ramp operation created successfully.
id
string

The id of the transaction.

customerId
string

The customer performing the operation.

type
enum<string>

The type of this transaction

Available options:
off_ramp
request
object

An object containing the parameters used for this off-ramp.

state
object

The transaction's results.

createdAt
string

The timestamp from when the transaction was submitted.

updatedAt
string

The timestamp from when the transaction was last updated.