Operation IDs and Movements

Which ID each operation returns, how it relates to the movement ID on your account statement, and when that movement appears.

Two kinds of ID

Every operation on a virtual account can be identified in two different ways. They are not interchangeable, so it is worth knowing which one you are storing or showing to your team.

IDWhat it identifiesFormatExample
Operation IDA payin, payout or refund. It is returned when you create the operation and you use it to retrieve the operation and match its callbacks.UUID3f2c9a1e-7b4d-4e8a-9c21-5d6f0e8b7a14
Movement IDOne entry on an account's statement: a credit or a debit that changed the balance. It is the id returned by List Account Movements and by the movement webhook.Integer7643753

Each type of operation writes its movement at a different point in its lifecycle. The table in the next section shows when.

Each movement points back to the operation that produced it through its operation object:

{
  "id": "7643810",
  "amount": -5000.0,
  "operation": {
    "type": "PAYOUT",
    "operation_id": "3f2c9a1e-7b4d-4e8a-9c21-5d6f0e8b7a14",
    "product": "PAYOUTS"
  }
}

IDs by operation

OperationID you getMovementoperation.typeoperation.operation_id
DepositNone. The deposit is the movement itself, so its movement ID is the only Infinia ID.One credit, written when the deposit is credited.CREDITEmpty
PayinPayin idOne credit, written only when the payin reaches COMPLETED.PAYINPayin id
PayoutPayout id, plus the originId you sentOne debit, written only when the payout reaches COMPLETED. If the payout is later returned, a second movement credits the funds back.PAYOUT, then PAYOUT_REFUND if returnedPayout id
Deposit refundRefund id, plus the idempotency_key you sentOne debit, written when the refund is created. If the refund fails, a second movement credits the funds back.CREDIT_REFUND, then CREDIT_REFUND_BOUNCE if it failsRefund id
Payin refundRefund id, plus the idempotency_key you sentOne debit, written when the refund is created. If the refund fails, a second movement credits the funds back.PAYIN_REFUND, then PAYIN_REFUND_BOUNCE if it failsRefund id
📘

Fees and taxes charged on an operation are separate movements with their own movement IDs. They do not replace the movement of the operation itself.


Finding the movement of an operation

Deposits. The movement ID is the deposit's ID. You receive it in the movement webhook as soon as the deposit is credited.

Payins and payouts. The payin and payout responses and callbacks do not include a movement ID. Once the operation is COMPLETED, look the movement up by the operation ID:

curl -u "$API_KEY_USER:$API_KEY_PASSWORD" \
  "https://app2test.infiniaweb.com/infinia_api/v1/accounts/movements/?operation_id=3f2c9a1e-7b4d-4e8a-9c21-5d6f0e8b7a14"

You also receive the movement in the movement webhook, where operation.operation_id holds the payin or payout ID.

Refunds. The refund response and callback include the movement IDs directly:

FieldMeaning
movement_idDeposit refunds only. The deposit that was refunded.
payment_idPayin refunds only. The payin that was refunded. This is a payin ID, not a movement ID.
debit_movement_idThe debit that took the refunded amount out of the account.
bounce_movement_idThe credit that returned the funds after the refund failed. Empty unless the refund failed.

Which ID to show your team

Use the movement ID when you need one reference per line of the account statement, for example to reconcile balances. Every credit and debit has one, whatever the operation.

Use the operation ID when you need to follow an operation through its lifecycle, for example a payout that is still IN_PROGRESS. It exists from the moment the operation is created.

When a single "transaction ID" column has to cover several operation types, keep in mind that deposits only have a movement ID, while payins, payouts and refunds have an operation ID and, once their movement is written, a movement ID. Storing both, and the operation.type, avoids mixing the two kinds of ID.

📘

The rail reference of a transfer, such as the Pix end-to-end ID, is neither of these. It is returned as voucherId on payins and payouts, as voucher_id on refunds, and as third_party.voucher_id on movements. You can filter movements by it with the voucher_id parameter.


Did this page help you?