# Payment Initiation

Source: https://docs.formance.com/modules/payments/transfer-initiation

Stack: v3.2

A **payment initiation** is your stack's instruction to a connector to
move funds — either between two internal accounts at the provider
(`TRANSFER`) or out to an external account such as a bank account
(`PAYOUT`). The initiation is a Payments-side record with its own
lifecycle that the platform resolves against the connector's
`CreateTransfer` / `CreatePayout` workflow, then against the provider's
asynchronous status updates, until it links to a settled
[`Payment`](https://docs.formance.com/modules/payments/payments).

This page documents the v3 surface (`/api/payments/v3/payment-initiations`).
The legacy v2 transfer-initiation endpoints are still served for backward
compatibility on stacks that pin Payments < 3.0 — they use the same
state machine and a near-identical shape.

## Lifecycle

A payment initiation moves through six states:

```text
WAITING_FOR_VALIDATION ─── approve ──▶ PROCESSING ──▶ PROCESSED
        │                                  │
        │                                  ├── failure ──▶ FAILED ──▶ retry ──▶ PROCESSING
        │                                  │
        └── reject ──▶ REJECTED            └── reverse ──▶ REVERSE_PROCESSING ──▶ REVERSED
```

- **WAITING\_FOR\_VALIDATION** — initial state when the create request
  passes `validated: false`. The platform parks the initiation; nothing
  is sent to the connector yet.
- **PROCESSING** — either the platform sent the create request straight
  through (`validated: true` on create, or `approve` on a parked one),
  or it's retrying a previously failed one. The connector's
  `CreateTransfer` / `CreatePayout` workflow is in flight.
- **PROCESSED** — the connector returned a settled payment. The
  initiation is linked to a `Payment` via `v3ListPaymentInitiationRelatedPayments`.
- **FAILED** — the connector returned a terminal error. The full error
  body is on the latest [adjustment](#adjustments). Retryable per §Retrying.
- **REJECTED** — the initiation was rejected from `WAITING_FOR_VALIDATION`.
  Terminal.
- **REVERSE\_PROCESSING** / **REVERSED** — a `v3ReversePaymentInitiation`
  call is in flight or has been confirmed by the connector.

Listing initiations carries the current status; the full transition log
is on `v3ListPaymentInitiationAdjustments`.

## Listing payment initiations

curl

```bash
curl -X GET $FORMANCE_API_URL/api/payments/v3/payment-initiations
```

## Reading a single initiation

curl

```bash
curl -X GET "$FORMANCE_API_URL/api/payments/v3/payment-initiations/<PI_ID>"
```

The `id` is the platform-assigned UUID returned by `v3InitiatePayment`.
The `reference` is the caller-supplied idempotency key — typically
echoed downstream on the resulting `Payment` so you can resolve one from
the other (see [Correlation](#correlation)).

## Creating a payment initiation

curl

```bash
curl -X POST $FORMANCE_API_URL/api/payments/v3/payment-initiations \
  -H "Content-Type: application/json" \
  -d '{
    "reference": "payout-acmecorp-20260506-172725",
    "connectorID": "<CONNECTOR_ID>",
    "type": "PAYOUT",
    "amount": 50000,
    "asset": "USD/2",
    "sourceAccountID": "<INTERNAL_ACCOUNT_ID>",
    "destinationAccountID": "<EXTERNAL_ACCOUNT_ID>",
    "description": "Vendor payment",
    "metadata": {
      "invoice_id": "inv_123"
    },
    "validated": true
  }'
```

**Required fields**:

| Field                  | Type    | Purpose                                                                                                                                                                              |
| ---------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `reference`            | string  | Caller-supplied unique key. Sent to the connector as the upstream `Idempotency-Key` when the connector supports one; retries with the same reference return the original initiation. |
| `connectorID`          | string  | The connector instance to route through. Find it in the response of `v3ListConnectors` or in the Console under Connectors.                                                           |
| `type`                 | enum    | `TRANSFER` (internal → internal) or `PAYOUT` (internal → external).                                                                                                                  |
| `amount`               | integer | Minor units at the asset's precision. `100` of `USD/2` = $1.00.                                                                                                                      |
| `asset`                | string  | Asset code with precision suffix (`USD/2`, `EUR/2`, `BTC/8`). Must match the source account's currency.                                                                              |
| `sourceAccountID`      | string  | Internal account ID at the connector.                                                                                                                                                |
| `destinationAccountID` | string  | Internal account for `TRANSFER`, external for `PAYOUT`.                                                                                                                              |

**Optional**:

- `description` — propagated to the upstream payment when the connector supports a memo / description field.
- `metadata` — opaque map. Connectors that accept upstream metadata forward it where they can; otherwise it stays Payments-side only.
- `validated` — when `true`, skip the `WAITING_FOR_VALIDATION` step and go straight to `PROCESSING`. Default `false`.
- `scheduledAt` — RFC3339 timestamp. Defers the connector call until that wall-clock time (used for cut-off-aware ACH or wire submission windows).

### Connector-specific metadata

Some connectors accept extra metadata keys to control rail selection,
delivery method, or operator context. These live under
`com.<provider>.spec/<key>` and are documented on the per-connector
reference pages. Routable, for example, uses:

| Metadata key                           | Purpose                                                                   |
| -------------------------------------- | ------------------------------------------------------------------------- |
| `com.routable.spec/type`               | Routable payable rail (`ach`, `wire`, `check`, …).                        |
| `com.routable.spec/delivery_method`    | Specific delivery option compatible with `type`.                          |
| `com.routable.spec/acting_team_member` | Routable team member initiating the payable (required by Routable's API). |

See the [Routable reference](https://docs.formance.com/v3.2/modules/payments/connectors/psp/routable#initiating-payouts-and-transfers)
for the full list.

## Approving or rejecting

When the initiation is created with `validated: false`, the platform
parks it in `WAITING_FOR_VALIDATION` until your reviewer decides:

curl

```bash
curl -X POST "$FORMANCE_API_URL/api/payments/v3/payment-initiations/<PI_ID>/approve"
```

curl

```bash
curl -X POST "$FORMANCE_API_URL/api/payments/v3/payment-initiations/<PI_ID>/reject"
```

Approve transitions the initiation to `PROCESSING` and dispatches it to
the connector. Reject moves it to `REJECTED` terminally — the connector
is never called.

The approval step is the platform's hook for a four-eyes / RBAC gate.
Approval API access can be restricted independently of creation access
via [RBAC](https://docs.formance.com/v3.2/manage/identity/rbac).

## Retrying a failed initiation

curl

```bash
curl -X POST "$FORMANCE_API_URL/api/payments/v3/payment-initiations/<PI_ID>/retry"
```

`v3RetryPaymentInitiation` is valid only when the initiation is in
`FAILED`. It re-dispatches to the connector with the same `reference`,
which means a connector that uses the reference as an upstream
idempotency key will either return the failed payment as-is (no retry
actually attempted) or accept a fresh attempt — connector-dependent. See
each connector's reference page for the per-provider retry semantics.

## Reversing a settled initiation

curl

```bash
curl -X POST "$FORMANCE_API_URL/api/payments/v3/payment-initiations/<PI_ID>/reverse" \
  -H "Content-Type: application/json" \
  -d '{
    "reference": "rev-<PI_ID>-001",
    "description": "Reverse mistaken payout",
    "metadata": {}
  }'
```

Available on connectors that declare `ReverseTransfer` / `ReversePayout`.
The reversal carries its own reference and goes through
`REVERSE_PROCESSING` → `REVERSED` (or `FAILED`). The list of reversal
attempts is accessible via the same adjustment endpoint.

## Adjustments

Every state transition lands on the initiation's adjustment list:

curl

```bash
curl -X GET "$FORMANCE_API_URL/api/payments/v3/payment-initiations/<PI_ID>/adjustments"
```

Adjustments carry the timestamp, the new status, and the connector's
raw response when relevant — including the upstream error body on
failed transitions. This is the audit trail you'd surface in a
back-office UI.

## Correlation

Once the connector returns a settled payment, the initiation links to it
in two directions:

From the initiation reference: list linked payments

```bash
curl -s "$STACK/api/payments/v3/payment-initiations/$PI_ID/payments" \
  -H "Authorization: Bearer $TOKEN" | jq '.cursor.data[] | {reference, status}'
```

Returned by `v3ListPaymentInitiationRelatedPayments`. There can be more
than one — a retry that succeeded leaves both the original failed
payment and the successful one linked.

From a payment: read the initiation reference off metadata

Most connectors that initiated a payment carry the originating
initiation reference under their `com.<provider>.spec/` namespace. The
exact key varies by connector — Routable uses
`com.routable.spec/payment_initiation_reference`, Stripe uses
`com.stripe.spec/transfer_initiation_ref`, etc. See the per-connector
reference for the canonical key.

```bash
curl -s "$STACK/api/payments/v3/payments" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"$match": {"connectorID": "'$CONNECTOR_ID'"}}' \
  | jq '.cursor.data[] | { reference, pi_ref: .metadata."com.routable.spec/payment_initiation_reference" }'
```

## Deleting

curl

```bash
curl -X DELETE "$FORMANCE_API_URL/api/payments/v3/payment-initiations/<PI_ID>"
```

Only valid in `WAITING_FOR_VALIDATION`. Once an initiation has been
dispatched to the connector, it stays in the platform indefinitely so
the linked payment(s) and adjustment log remain queryable.

## Connector support matrix

Initiation requires `CAPABILITY_CREATE_TRANSFER` or
`CAPABILITY_CREATE_PAYOUT` on the target connector. See
[Capabilities](https://docs.formance.com/v3.2/modules/payments/capabilities) for the live matrix
— the columns light up per connector and per Payments version. Reversal
is available on connectors that additionally implement `ReverseTransfer`
or `ReversePayout`; that subset is smaller.
