ATTRUS API

Creating Transactions

All transaction types — pay-ins, pay-outs, conversions, and settlements — use the same endpoint. Country-specific payment methods (Dynamic Pix, Boleto, Dynamic Clabe, PSE, cards) are covered in the country and card docs; this page covers the common create payload, idempotency, and meta.

HTTP Request

POST /transactions

For Pay-in transactions this endpoint will be used for payment methods that require more information than of the mandatory customer registration. For example, a Pix payment done directly for the Pix key shared with the customer does not require to be created on your side, you only need to have the customer registered for us to reconcile the payment. The same with normal SPEI transactions, where you only share your bank details and the customer pays directly to that CLABE.

However, if you intend to use Credit Card, Boleto, Dynamic Pix, Dynamic Clabe and PSE this endpoint must be called.

Example 1: Pay-In - BRL to USD

curl -X POST "https://api.sandbox.attrus.com/api/v1/transactions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -d '{
  "transaction": {
    "currency": "BRL",
    "exchange_currency": "USD",
    "value": "1000.00",
    "from_bank_account_id": "97313a02-bbbb-4341-bb2c-3602d185d926",
    "to_bank_account_id": "766eadfc-f020-4d2a-bed3-c9a95623ed24",
    "subject_id": "deb1a9eb-39d0-4d3d-ab30-bee5406d8e21"
  }
}'

Solution: Provide a valid UUID v4 in transaction.id, or omit the field to let Attrus generate the ID.

Example 2: Pay-Out - USD to BRL

curl -X POST "https://api.sandbox.attrus.com/api/v1/transactions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -d '{
  "transaction": {
    "currency": "USD",
    "exchange_currency": "BRL",
    "value": "500.00",
    "from_bank_account_id": "a2474d90-eca9-47ac-90f2-0487d51b4bef",
    "to_bank_account_id": "c41b7cf3-455c-46c1-bb6d-7fd0e1b83799",
    "subject_id": "deb1a9eb-39d0-4d3d-ab30-bee5406d8e21",
    "meta": {
      "pix_out_message": "Payment for order 123"
    }
  }
}'

Solution: Provide accounts with matching currencies as in the request.

Was this helpful?