# Collect and settle a payment end to end

This guide follows a payment from partner and account setup through receipt, conversion, and
payout. Each step names the identifier that carries into the next request. A second payment
joins the example to show how a settlement can bundle multiple receipts.

Steps 1 to 3 create the collection setup. Steps 4 to 6 check receipt and available funds.
Step 7 requests a payout and verifies its completion. Each step breaks into short tasks, and
ends with a troubleshooting table for the errors you are most likely to see.

## Before you start

You need an access token, described in [Authentication](/pt-br/products/collections/guides/authentication). The guide assumes
general REST familiarity and no knowledge of the Collections data model—it links each
[concept page](/pt-br/products/collections/concepts/partners) at first mention.

Examples use the UAT host, `https://api.test.ripple.com`, and assume:

- Automatic conversion from USDT to USD, with customer-initiated payout. Confirm this setup
with Ripple before following the example. Automatic conversion and automatic payout are
separate settings. Ripple also configures the conversion venue for your organization. Without
that setup, a released payment stays `PROCESSING` and is not converted.
- An active, pre-provisioned USD `CUSTOMER` account and a configured USD payout destination.
Discover the account with `GET /v1/collections/accounts?ownership_level=CUSTOMER&currency=USD`,
reading every page. Contact Ripple if it is missing or the payout destination is not ready.
The account must exist before Ripple releases your first payment. If it does not, Ripple cannot
convert the payment, and the payment stays `PROCESSING`.
- For the example totals only, two converted payments, no other unsettled trades or balance
movements, and enough available balance to fund both. Their total must meet the configured
settlement minimum and fit within the bundle-size limit.


**Save:** the customer account's `id`. Steps 6 and 7 use it. The examples use
`c3d4e5f6-a7b8-9012-cdef-234567890123`. Use your own
returned identifiers, actual conversion amounts, and configured limits.

Example responses in this guide show only the fields the step uses. Each
operation's page in the API reference lists every field.

### Arrange the UAT exercise with Ripple

UAT uses test assets and simulated payouts. Before starting, ask Ripple to confirm:

- The business test identities and complete metadata to use for screening the payer and
beneficiary, and the expected screening time.
- How to fund two USDT deposits on `ETHEREUM_SEPOLIA_TESTNET`: either a supported test-token
source and enough Sepolia ETH for gas in the sending wallet, or Ripple-assisted deposits.
Confirm the supported token contract; the ticker `USDT` alone does not identify a test token.
- How to arrange simulated payout completion for your tenant, who performs any assisted action,
and the expected processing time. Agree which test record and references, if available, you
will use to verify the settlement ID, amount, currency, and simulated outcome.


Have that funding and completion procedure ready before proceeding. The API requests below
observe a deposit and request a settlement; they do not fund your sending wallet or trigger an
assisted payout completion. UAT does not produce a real bank credit. The bank-statement checks
later in this guide apply to production.

## How the objects connect

The identifiers connect the objects; conversion and release also move the funds:

![Object diagram: the beneficiary partner's id is the PARTNER account's beneficiary_id. The payer partner's id and the PARTNER account's id are the channel's payer_id and account_id. Each payment through the channel is a transaction whose parent_id is the channel id. Conversion and release move the funds from the PARTNER account to the CUSTOMER account, and a settlement draws from the CUSTOMER account through source_account_id. Each included transaction's settlement_id is the settlement id. Each box lists the fields this guide uses.](/assets/collect-and-settle-objects.8d53206aff129f3854acb58783bae30dbab0f599b49a0b92ff320ecdb26242e7.ad994c87.svg)

Five properties of that shape govern everything below.

- **A partner is a payer or a beneficiary according to which field holds its identifier.** There
is no payer resource and no beneficiary resource. Both are
[partners](/pt-br/products/collections/concepts/partners) created with [Create partner](/products/collections/api/collections/partners/createpartnerv1), and nothing on the
partner record marks which role it plays.
- **The [account](/pt-br/products/collections/concepts/accounts) you create belongs to one beneficiary and one
currency**, and it is `PARTNER`-owned. The pre-provisioned customer account funds payouts.
- **A [channel](/pt-br/products/collections/concepts/channels) is where deposit instructions live.** An account on its
own has nowhere to receive money.
- **A [transaction](/pt-br/products/collections/concepts/transactions) appears when funds arrive.** No operation
creates one.
- **A [settlement](/pt-br/products/collections/concepts/settlements) draws from a `CUSTOMER`-owned account.** In this
auto-convert flow, conversion and compliance release move funds there automatically. You do
not create a separate Transfer object for that movement.


## Step 1: Create the payer and the beneficiary

The payer sends the money, and the beneficiary receives it. Both are partners, so you create
them with the same operation, [Create partner](/products/collections/api/collections/partners/createpartnerv1),
called twice. Ripple then screens each one before you can use it.

### Create the payer

Replace the illustrative identity details with the UAT test identities agreed with Ripple.

```http
POST /v1/collections/partners
Authorization: Bearer {access_token}
Content-Type: application/json

{
  "name": "Nigerian Imports Ltd.",
  "email": "nigerian@imports.com",
  "external_reference_id": "Ref-NG-001",
  "data": {
    "type": "BUSINESS",
    "legal_entity": "Nigerian Imports Ltd.",
    "registration_number": "TEST-NG-001",
    "registration_type": "TXID",
    "country": "NG",
    "address": "15 Marina Street",
    "city": "Lagos",
    "postal_code": "100001"
  }
}
```

Send `name`, `email`, and a complete `data` object. Screening starts only when `data` is
present. A `BUSINESS` partner needs these `data` fields together:

- `type`, `legal_entity`, `country`, and `address`
- `registration_number` and `registration_type`


`city` and `postal_code` are optional, but send them when you have them.

Example response:

```json
{
  "id": "0c5479ff-3772-4123-b2b7-e679e71eb570",
  "name": "Nigerian Imports Ltd.",
  "email": "nigerian@imports.com",
  "external_reference_id": "Ref-NG-001",
  "status": "PENDING",
  "reason": null,
  "created_at": "2026-08-09T22:54:00.542Z",
  "updated_at": "2026-08-09T22:54:00.542Z"
}
```

**Save:** `id` as the payer ID. Step 3 uses it.

### Create the beneficiary

Send the same request with the beneficiary's own complete details:

```http
POST /v1/collections/partners
Authorization: Bearer {access_token}
Content-Type: application/json

{
  "name": "Hong Kong Exports Ltd.",
  "email": "hongkong@exports.com",
  "external_reference_id": "Ref-HK-001",
  "data": {
    "type": "BUSINESS",
    "legal_entity": "Hong Kong Exports Ltd.",
    "registration_number": "TEST-HK-001",
    "registration_type": "TXID",
    "country": "HK",
    "address": "1 Example Road",
    "city": "Hong Kong"
  }
}
```

**Save:** the returned `id` as the beneficiary ID. Step 2 uses it. The examples that follow use
`291ecf34-a01d-466a-b0fd-662a88b7a1bb`.

### Wait for both partners to activate

Both partners start as `PENDING` while Ripple screens them. You can go on to Step 2 while you
wait, but you cannot create a channel in Step 3 until both partners are `ACTIVATED` and the
account from Step 2 is `ACTIVE`. To check:

1. Read each partner with [Get partner](/products/collections/api/collections/partners/getpartnerbyidv1)
until its `status` is `ACTIVATED`. Start with the beneficiary:

```http
GET /v1/collections/partners/291ecf34-a01d-466a-b0fd-662a88b7a1bb
Authorization: Bearer {access_token}
```
Then repeat the request with the payer's ID. Instead of polling, you can subscribe to the
`PARTNER_STATUS_CHANGED` [webhook](/pt-br/products/collections/concepts/webhooks) event.
2. If a partner is still `PENDING` after the screening time you agreed with Ripple, contact Ripple
with the partner's ID and status. You cannot activate a partner yourself: polling and webhooks
only report the status, and the API has no way to set it.


Keep these points in mind while you wait:

- **Partners and accounts use different words for ready.** A partner is ready when it is
`ACTIVATED`. An account is ready when it is `ACTIVE`.
- **You can create the account early.** If the beneficiary is still `PENDING`, Step 2 returns
`201` and an account with status `PENDING`. The account becomes `ACTIVE` on its own when the
beneficiary activates. Keep the account ID, and before Step 3 read it with
`GET /v1/collections/accounts/{account_id}` to confirm it is `ACTIVE`. Do not create a second
account. If the beneficiary is in any other inactive status, such as `ON_HOLD` or `FAILED`,
Step 2 returns `422` with code `BENEFICIARY_NOT_ACTIVE`.
- **Updating a partner restarts screening.** The partner goes back to `PENDING` until Ripple
screens it again. Wait for it to return to `ACTIVATED` before you continue.


### Troubleshoot step 1

| What you see | Cause | What to do |
|  --- | --- | --- |
| `401` or `403` | Your access token is missing, expired, or lacks the scope for this operation. | Get a new token, as described in [Authentication](/pt-br/products/collections/guides/authentication). If it persists, ask Ripple to check your credential's scopes. |
| `400` with code `INVALID_PARTNER_METADATA` | `data` is missing a required field or has an invalid value. | Send every `data` field listed in [Create the payer](#create-the-payer). The message names the problem. |
| `409` with code `DUPLICATE_PARTNER` | A partner with this email already exists. | Find the existing partner with [List partners](/products/collections/api/collections/partners/listpartnersv1) and use its `id`. Don't create it again. |
| The partner stays `PENDING`, and its record has no `data` | You created it without `data`, so screening never started. | Send the complete `data` with [Update partner](/products/collections/api/collections/partners/updatepartnerv1), then wait again. |
| The partner has `data` but stays `PENDING` past the agreed screening time | Screening is slow or held for review. | Contact Ripple with the partner ID and its current status. |
| The partner is `ON_HOLD`, `FAILED`, or `DEACTIVATED` | Screening did not release it. | Read `reason`, then contact Ripple. Polling does not change the result. |


## Step 2: Open an account for the beneficiary

An account holds the beneficiary's funds in one currency. The account you create is
`PARTNER`-owned. Payouts come from the separate `CUSTOMER` account described in
[Before you start](#before-you-start).

### Create the account

Call [Create account](/products/collections/api/collections/accounts/createaccountv1):

```http
POST /v1/collections/accounts
Authorization: Bearer {access_token}
Content-Type: application/json

{
  "beneficiary_id": "291ecf34-a01d-466a-b0fd-662a88b7a1bb",
  "currency": "USD"
}
```

Send both fields:

- **`beneficiary_id`** is the beneficiary's partner `id` from Step 1. The field is not called
`partner_id`.
- **`currency`** sets the account type and its rails, so choose it on purpose:
| `currency` | Account `type` | `rails` |
|  --- | --- | --- |
| `RLUSD`, `USDC`, or `USDT` | `CRYPTO` | `BLOCKCHAIN` |
| `USD` | `FIAT` | `FEDWIRE`, `ACH`, and `RTP` |
| `BRL` | `FIAT` | `PIX` |


Example response:

```json
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "customer_id": "d4e5f6a7-b8c9-4012-8def-345678901234",
  "beneficiary": {
    "id": "291ecf34-a01d-466a-b0fd-662a88b7a1bb",
    "name": "Hong Kong Exports Ltd.",
    "email": "hongkong@exports.com"
  },
  "currency": "USD",
  "type": "FIAT",
  "rails": ["FEDWIRE", "ACH", "RTP"],
  "balances": {
    "account_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "balances": {
      "available": { "amount": "0.00" },
      "pending": {
        "inbound": { "amount": "0.00" },
        "outbound": { "amount": "0.00" }
      }
    },
    "updated_at": "2026-08-09T23:01:14.208Z"
  },
  "ownership_level": "PARTNER",
  "status": "ACTIVE",
  "created_at": "2026-08-09T23:01:14.208Z",
  "updated_at": "2026-08-09T23:01:14.208Z"
}
```

**Save:** `id` as the account ID. Steps 3 and 4 use it.

### Check the account details

Three details matter later:

- **`ownership_level` is `PARTNER`.** This account receives payments. It is not the settlement
source; [Step 6](#step-6-check-the-customer-balance) checks the customer account that funds
the payout.
- **`rails` lists rail types, not deposit instructions.** It tells you which rails exist for the
account, not where to send money. The channel in Step 3 provides that.
- **Balances sit two levels deep.** Read them at `balances.balances.available.amount`,
`balances.balances.pending.inbound.amount`, and `balances.balances.pending.outbound.amount`.
The outer `balances` object also identifies the account and when the balance last changed.
`customer_id` identifies your organization, not the beneficiary.


Account amounts are strings, to preserve precision. Parse them as decimals, not as
floating-point numbers. Accounts have no update or delete operation.

### Troubleshoot step 2

| What you see | Cause | What to do |
|  --- | --- | --- |
| `201` with account `status` `PENDING` | Ripple is still screening the beneficiary. | Keep the account ID. It becomes `ACTIVE` when the beneficiary does. See [Wait for both partners to activate](#wait-for-both-partners-to-activate). |
| `404` with code `BENEFICIARY_NOT_FOUND` | `beneficiary_id` is wrong, or belongs to another organization. | Use the beneficiary `id` from [Create the beneficiary](#create-the-beneficiary). |
| `422` with code `BENEFICIARY_NOT_ACTIVE` | The beneficiary is `ON_HOLD`, `FAILED`, or `DEACTIVATED`. | Contact Ripple about the beneficiary's screening result. |
| `409` with code `DUPLICATE_ACCOUNT` | This beneficiary already has an account in this currency. | Find it with [List accounts](/products/collections/api/collections/accounts/listaccountsv1) and use its `id`. |
| `400` with code `UNSUPPORTED_CURRENCY` | `currency` is not one of the values in the table above. | Use a supported currency. |


## Step 3: Create a channel

A channel joins a payer to a beneficiary's account, and it is the only object that carries
deposit instructions. Without one, the account has nowhere to receive money.

### Create the channel

Call [Create channel](/products/collections/api/collections/collection-channels/createchannelv1):

```http
POST /v1/collections/channels
Authorization: Bearer {access_token}
Content-Type: application/json

{
  "payer_id": "0c5479ff-3772-4123-b2b7-e679e71eb570",
  "account_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "payment_currencies": [{ "currency": "USDT" }]
}
```

Send all three fields:

- **`payer_id`** is the payer's partner `id` from [Create the payer](#create-the-payer).
- **`account_id`** is the account from [Create the account](#create-the-account). It also identifies the
beneficiary, so you do not send the beneficiary separately.
- **`payment_currencies`** lists the currencies the payer can send. Each entry is an object,
not a plain string.


A channel can accept a currency that differs from its account's currency, as this example does:
USDT payments go into a USD account. With automatic conversion, each payment converts to USD
when Ripple processes it.

Example response:

```json
{
  "id": "22a0337b-8e62-449c-91ca-a0f830c55733",
  "payer": {
    "id": "0c5479ff-3772-4123-b2b7-e679e71eb570",
    "name": "Nigerian Imports Ltd.",
    "email": "nigerian@imports.com"
  },
  "beneficiary": {
    "id": "291ecf34-a01d-466a-b0fd-662a88b7a1bb",
    "name": "Hong Kong Exports Ltd.",
    "email": "hongkong@exports.com"
  },
  "account": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "beneficiary_id": "291ecf34-a01d-466a-b0fd-662a88b7a1bb",
    "currency": "USD",
    "type": "FIAT"
  },
  "payment_methods": [
    {
      "type": "BLOCKCHAIN",
      "network": "ETHEREUM_SEPOLIA_TESTNET",
      "address": "0xBb592aaaF9AcE2fbE3F735645819FA94c95a9cb5",
      "currency": "USDT"
    }
  ],
  "status": "ACTIVE",
  "reason": null,
  "created_at": "2026-08-09T23:06:52.771Z",
  "updated_at": "2026-08-09T23:06:52.771Z"
}
```

**Save:** `id` as the channel ID, and the USDT entry's `network`, `address`, and
`destination_tag` if it has one. Step 4 uses them.

### Check the deposit instructions

- **`id`** becomes `parent_id` on every transaction the channel receives.
- **`payment_methods[]`** holds the deposit instructions. A `BLOCKCHAIN` method carries
`network`, `address`, `currency`, and an optional `destination_tag`. Use the returned
instructions for the asset and network you send. UAT returns test networks such as
`ETHEREUM_SEPOLIA_TESTNET`; production returns mainnet networks such as `ETHEREUM`.


### Troubleshoot step 3

| What you see | Cause | What to do |
|  --- | --- | --- |
| `400` with code `PAYER_NOT_ACTIVE` | The payer is not `ACTIVATED` yet. | Wait for screening. See [Wait for both partners to activate](#wait-for-both-partners-to-activate). |
| `400` with code `ILLEGAL_ARGUMENT` and a message ending `Account is not active` | The account is still `PENDING`. | Wait for the beneficiary to activate, then read the account until it is `ACTIVE`. |
| `400` with code `ILLEGAL_ARGUMENT` and a message ending `Account not found` | `account_id` is wrong, or belongs to another organization. | Use the account `id` from [Create the account](#create-the-account). |
| `400` with code `PAYER_NOT_FOUND` | `payer_id` is wrong, or belongs to another organization. | Use the payer `id` from [Create the payer](#create-the-payer). |
| `400` with code `PAYMENT_CURRENCY_NOT_SUPPORTED` | The channel does not accept that payment currency. | Use `RLUSD`, `USDC`, or `USDT`. |
| `400` with code `VALIDATION_ERROR` | Ripple could not parse the body, for example because `payment_currencies` holds plain strings. | Send each currency as an object: `[{ "currency": "USDT" }]`. |
| `409` with code `DUPLICATE_CHANNEL` | An active channel already exists for this payer and account. | Use the existing channel. You can find it in [List channels](/products/collections/api/collections/collection-channels/listchannelsv1). |


## Step 4: Receive the payment

No operation creates a transaction. The API records one when money arrives at the channel's
deposit address. This step sends test payments and watches them arrive.

### Send the test payments

Use the [UAT funding procedure agreed with Ripple](#arrange-the-uat-exercise-with-ripple):

1. Give the sender or Ripple the channel ID and the USDT `payment_methods[]` entry from Step 3.
Confirm the network, the address, and the supported test-token contract.
2. Send the first payment: 50.00 test USDT in this example. If you send it yourself, use the
funded test wallet with enough Sepolia ETH for gas. Save the sending transaction hash, amount,
network, and time, so you can investigate a missing payment with Ripple.
3. Send the second payment, 150.00 test USDT. Steps 5 and 6 check both payments together.
Your converted amounts can differ from the example's, so use your own values from here on.


### Find the payments

Call [List transactions](/products/collections/api/collections/transactions/listtransactionsv1)
for the account. Set `since` to a time before you sent the payments:

```http
GET /v1/collections/transactions?account_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890&since=2026-08-10T00:00:00Z&size=100
Authorization: Bearer {access_token}
```

Results are in `content`, and the page details are in `page`. `page` is zero-indexed and
`size` defaults to 10, so set a larger `size`, such as 100, then increase `page` by 1 until you
reach `page.total_pages`.
Parse the `page` fields as integers first: responses can send them as strings, such as `"2"`.
[Reconcile transactions and settlements](/pt-br/products/collections/guides/reconcile-transactions-and-settlements) shows the
loop.

**Save:** each transaction's `id`. The list returns the newest first. The examples follow the
50.00 USDT payment, `487ba009-56cf-4ad9-8b5c-045e27893e00`. Wait for the other payment the same
way.

### Wait for each payment to complete

Ripple screens each payment before it releases it, so a new transaction starts as
`PROCESSING`. Read it with [Get transaction](/products/collections/api/collections/transactions/gettransactionbyidv1)
until its `status` is `COMPLETED`:

```http
GET /v1/collections/transactions/487ba009-56cf-4ad9-8b5c-045e27893e00
Authorization: Bearer {access_token}
```

Read the transaction by its ID rather than listing again. The list's date filters select the
time Ripple created a transaction, not the time its status changed.

Example response:

```json
{
  "id": "487ba009-56cf-4ad9-8b5c-045e27893e00",
  "parent_id": "22a0337b-8e62-449c-91ca-a0f830c55733",
  "account_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "settlement_id": null,
  "payment_amount": {
    "value": "50.00000000",
    "asset": "USDT"
  },
  "account_equivalent": {
    "gross_amount": { "value": "50.00", "currency": "USD" },
    "fee_amount": { "value": "0.50", "currency": "USD" },
    "net_amount": { "value": "49.50", "currency": "USD" }
  },
  "status": "COMPLETED",
  "reason": null,
  "date_created": "2026-08-10T09:14:22.117Z"
}
```

Four fields carry the flow forward:

- **`parent_id`** is the channel ID from Step 3. To follow one channel, add `parent_id` as a
filter on the transaction list.
- **`payment_amount`** is what the payer sent, as a `value` and an `asset`. The field is `asset`,
not `currency`.
- **`account_equivalent`** is the same money in the account's currency, split into
`gross_amount`, `fee_amount`, and `net_amount`. Each has a `value` and a `currency`. Here the
50.00 USDT payment credits 49.50 USD net. The API omits this object while a converted
payment waits for its conversion.
- **`settlement_id`** stays `null` until the payment joins a settlement. A populated ID names
that settlement; it does not prove the payout completed.


Transaction amounts are strings, to preserve precision. Parse them as decimals, not as
floating-point numbers.

### Get notified instead of polling

Create a webhook with [Create webhooks](/products/collections/api/collections/webhooks/createwebhooks)
for the event types you want, and verify each notification's signature as described in
[Verify webhook signatures](/pt-br/products/collections/guides/verifying-webhooks). Create webhooks returns a plain array, not a
page of results. To see your subscriptions, list them with
`GET /v1/collections/webhooks?page=0&size=100` and read every page.

### Troubleshoot step 4

| What you see | Cause | What to do |
|  --- | --- | --- |
| No transaction appears | The payment has not arrived, went to the wrong address, network, or token contract, or `since` is after the payment. | Check the sending hash, address, and network against Step 3. Move `since` earlier. If it is still missing, contact Ripple with the hash, amount, network, and time. |
| The transaction stays `PROCESSING` | Ripple is still screening the payment, or Ripple cannot convert it yet. | Keep reading it by ID. If it stays `PROCESSING` past the expected time, check that your `CUSTOMER` account exists (see [Before you start](#before-you-start)), then contact Ripple with the transaction ID. |
| `status` is `HOLD_KYT` | Ripple is holding the payment for compliance review. | Keep reading it by ID. Ripple releases or rejects it. |
| `status` is `FAILED_KYT` or `FAILED` | The payment failed compliance checks or processing. | Read `reason`, then contact Ripple. The payment does not settle. |
| `account_equivalent` is missing | The converted payment is waiting for its conversion. | Keep reading the transaction until the field appears. Don't treat the amount as zero. |
| `400` with code `INVALID_PARAMETER` | `since` is later than `until`, or a filter value has the wrong format. | Fix the filter values. |
| `404` with code `TRANSACTION_NOT_FOUND` | The ID is wrong, or belongs to another organization. | Use an `id` from the list in [Find the payments](#find-the-payments). |


## Step 5: Reconcile what arrived

Before you request a payout, check that the money you expected arrived.

### Confirm each payment

You already have what you need from [Wait for each payment to complete](#wait-for-each-payment-to-complete).
For each transaction, check that:

1. It exists and its `status` is `COMPLETED`.
2. Its `account_equivalent.net_amount` matches the amount you expected.


In the worked example, the second payment of 150.00 USDT nets 148.50 USD, for 198.00 USD in
total. A channel has no requested amount, so it has no underpaid or overpaid status. Compare
what arrived with the amount you expected yourself.

This confirms receipt, not payout. For checking settlement status, period totals, holds, and
failures at scale, see
[Reconcile transactions and settlements](/pt-br/products/collections/guides/reconcile-transactions-and-settlements).

### Troubleshoot step 5

| What you see | Cause | What to do |
|  --- | --- | --- |
| The net amount differs from your estimate | The conversion rate or fee differed from your estimate. | Use the actual `account_equivalent` values for the rest of the guide. |
| A payment is missing or not `COMPLETED` | It is still processing, or Ripple held or failed it. | Go back to [Troubleshoot step 4](#troubleshoot-step-4). |


## Step 6: Check the customer balance

With automatic conversion, Ripple moves each converted payment into the USD `CUSTOMER`
account's available balance when it releases the payment. The API does not create a Transfer
object for that movement, so you do not move the money yourself.

### Read the customer account

Call [Get account](/products/collections/api/collections/accounts/getaccountbyidv1) with the
customer account you found before starting:

```http
GET /v1/collections/accounts/c3d4e5f6-a7b8-9012-cdef-234567890123
Authorization: Bearer {access_token}
```

Example response, under the example's assumptions:

```json
{
  "id": "c3d4e5f6-a7b8-9012-cdef-234567890123",
  "currency": "USD",
  "ownership_level": "CUSTOMER",
  "status": "ACTIVE",
  "balances": {
    "account_id": "c3d4e5f6-a7b8-9012-cdef-234567890123",
    "balances": {
      "available": { "amount": "198.00" },
      "pending": {
        "inbound": { "amount": "0.00" },
        "outbound": { "amount": "0.00" }
      }
    },
    "updated_at": "2026-08-10T18:00:00.000Z"
  }
}
```

### Check the balance

Confirm that `status` is `ACTIVE` and that `balances.balances.available.amount` covers the
payments from Step 5. A balance shows a total only. It does not tell you which payments made it
up.

### If your funds remain in a PARTNER account

Some setups leave the converted funds in the beneficiary's `PARTNER` account instead. Follow
this conditional path only if both of these are true:

- The `CUSTOMER` account's available balance did not grow by the payments' net amounts.
- The `PARTNER` account's `balances.balances.available.amount` did grow by them.


Confirm your setup with Ripple before you move anything. If the `CUSTOMER` balance already grew,
skip this path: a transfer would move the same money twice.

1. Create the transfer with [Create transfer](/products/collections/api/collections/transfers/createtransferv1):

```http
POST /v1/collections/transfers
Authorization: Bearer {access_token}
Content-Type: application/json

{
  "source_account_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "destination_account_id": "c3d4e5f6-a7b8-9012-cdef-234567890123",
  "amount": "198.00"
}
```
`amount` is positive and in the source account's currency. The destination must be your
`CUSTOMER` account. **Save:** the returned `id` as the transfer ID, and `expires_at`.
2. Before the returned `expires_at`, confirm it with
[Confirm transfer](/products/collections/api/collections/transfers/confirmtransferv1):

```http
POST /v1/collections/transfers/{transfer_id}/confirm
Authorization: Bearer {access_token}
X-Idempotency-Key: 9e2c7b46-a113-4d5a-8f20-6c908e7b3d14
```
Use a new UUID as the key, and reuse it only to retry this exact request. See
[Retry requests safely with idempotency keys](/pt-br/products/collections/guides/idempotency).
3. A successful confirmation returns `COMPLETED`. After a timeout or a conflict, read the
transfer with [Get transfer](/products/collections/api/collections/transfers/gettransferbyidv1)
before you retry.


A same-currency transfer moves balance without a conversion. A cross-currency transfer converts
the money, and its conversion can join a later settlement. Neither kind links a payment to a
payout by itself.

### Troubleshoot step 6

| What you see | Cause | What to do |
|  --- | --- | --- |
| The balance is lower than expected | A payment is still processing, or a payout already reserved the funds. | Check Step 4 for unfinished payments, and check `balances.balances.pending.outbound`. With automatic payout, the funds move to pending outbound. |
| The balance is higher than expected | Other payments, transfers, or earlier activity added to it. | Expect Step 7 to include those funds too. Check other activity before you settle. |
| The customer account is not `ACTIVE`, or you get `404` with code `ACCOUNT_NOT_FOUND` | The account is missing, inactive, or belongs to another organization. | Contact Ripple. You cannot create a `CUSTOMER` account yourself. |
| If you followed [If your funds remain in a PARTNER account](#if-your-funds-remain-in-a-partner-account): |  |  |


| What you see | Cause | What to do |
|  --- | --- | --- |
| `409` with code `INVALID_TRANSFER_STATE` on confirm | The transfer is no longer waiting for confirmation. | Read the transfer to see its current status before retrying. |
| `410` with code `TRANSFER_EXPIRED` on confirm | The transfer passed its `expires_at`. | Create a new transfer and confirm it sooner. |
| `422` with code `INSUFFICIENT_BALANCE` | The source account does not hold enough available funds. | Lower the amount, or wait for pending funds to arrive. |
| `422` with code `DESTINATION_ACCOUNT_NOT_ELIGIBLE` | The destination is not a `CUSTOMER` account. | Use your `CUSTOMER` account as the destination. |


## Step 7: Settle

A settlement is a payout from your `CUSTOMER` account to your bank. How it starts depends on
your payout setting:

- **Customer-initiated payout**, as in this example: you request the settlement yourself, in
[Request the settlement](#request-the-settlement).
- **Automatic payout:** Ripple creates it for you. Skip that request and follow
[If your setup uses automatic payout](#if-your-setup-uses-automatic-payout).


### Request the settlement

Call [Create settlement](/products/collections/api/collections/settlements/createsettlementv1):

```http
POST /v1/collections/settlements
Authorization: Bearer {access_token}
X-Idempotency-Key: 49a4e57c-f9c2-43be-9b6a-bfd21d6c8028
Content-Type: application/json

{
  "source_account_id": "c3d4e5f6-a7b8-9012-cdef-234567890123"
}
```

The request names only the source account. Ripple works out the rest:

- **What to pay out.** Ripple selects your unsettled converted payments in the account's
currency, up to the bundle-size and available-balance limits. If none are ready, it can pay
out available balance instead.
- **How much.** Ripple calculates the amount from what it selects.
- **Where to.** Ripple sends the payout to the payout destination configured for your account.


So the settlement is not limited to one beneficiary or to the two payments you just checked.
Other ready payments can join it, and limits can leave some for a later request. The amounts
below apply only under the assumptions in [Before you start](#before-you-start).

To retry this exact request, reuse its `X-Idempotency-Key`. Use a new key for each new
settlement request.

Example response, with the payout in progress:

```json
{
  "id": "63dd59dd-88be-41a2-a246-2f6724209422",
  "source_account_id": "c3d4e5f6-a7b8-9012-cdef-234567890123",
  "currency": "USD",
  "gross_amount": "200.00",
  "settlement_amount": "198.00",
  "fees": { "transaction_fees": "2.00" },
  "status": "PROCESSING",
  "data": {
    "payout_destination": {
      "type": "FEDWIRE",
      "account_name": "Finance Corp",
      "account_number": "****7890",
      "routing_number": "021000021",
      "institution_name": "Bank of America"
    }
  },
  "created_at": "2026-08-11T02:00:00.000Z",
  "updated_at": "2026-08-11T02:00:00.000Z"
}
```

**Save:** `id` as the settlement ID. [Wait for payout completion](#wait-for-payout-completion)
uses it.

### If your setup uses automatic payout

With automatic payout, Ripple creates one settlement for each converted payment after it
releases the payment, without a request from you. Ripple does not bundle these: each settlement
pays out exactly one payment. A payment below the settlement minimum is not paid out
automatically, and it stays available for a settlement you request.

1. Skip [Request the settlement](#request-the-settlement). Read the transaction from Step 4 by
its ID until it has a `settlement_id`.
2. Read that settlement with [Get settlement](/products/collections/api/collections/settlements/getsettlementbyidv1),
then continue with [Wait for payout completion](#wait-for-payout-completion).


In Step 6, the payment can already appear under `balances.balances.pending.outbound` rather
than `available`, because the settlement reserves it. If you also request a settlement, it
usually fails with `No unsettled trades or balance to settle`, because Ripple already claimed the
payment. If it does create a settlement, that settlement covers other funds, not the payment you
followed.

### Wait for payout completion

Read the settlement with [Get settlement](/products/collections/api/collections/settlements/getsettlementbyidv1)
until its `status` is `COMPLETED`, or use settlement-status webhooks:

```http
GET /v1/collections/settlements/63dd59dd-88be-41a2-a246-2f6724209422
Authorization: Bearer {access_token}
```

In UAT, arrange simulated completion with Ripple using the procedure you agreed, and give them
the settlement ID. Reading the settlement shows completion; it does not cause it.

Example response, after completion:

```json
{
  "id": "63dd59dd-88be-41a2-a246-2f6724209422",
  "status": "COMPLETED",
  "data": {
    "transaction_reference_numbers": ["ABC12345"]
  },
  "updated_at": "2026-08-11T02:04:18.220Z"
}
```

Check these fields:

- **`status`.** In production, `COMPLETED` means the payout left Ripple. In UAT, it records
simulated completion. `PENDING` and `PROCESSING` are still open.
- **Amounts.** `gross_amount`, `settlement_amount`, and `fees.transaction_fees` sit at the top
level of the settlement, and one `currency` covers them all. That differs from transactions,
where each amount has its own `value` and `currency`. They are strings; parse them as
decimals. Here the two payments of 50.00 and 150.00 make a `gross_amount` of 200.00. Taking
away 2.00 in fees leaves a `settlement_amount` of 198.00. These are the same conversion fees
each transaction showed in `account_equivalent.fee_amount`, totalled for the payout. Ripple
does not charge them twice.
- **`data.payout_destination`.** The destination as Ripple has it set up now, with the bank account
number masked to its last four digits. It can change on a later read if the configuration
changes, so it is not a permanent payout receipt.
- **`data.transaction_reference_numbers`.** Payout references, when they are available. In
production, match them and the amount to your bank statement. In UAT, use the test evidence
you agreed with Ripple. A `COMPLETED` settlement can have no references. Keep a missing or
unmatched reference open, and ask Ripple for payout evidence with the settlement ID, currency,
amount, and the time you checked.
- **`id`.** This appears as `settlement_id` on each payment the settlement includes. A payout
funded from balance, or from a transfer's conversion, can have no linked payment.


### Confirm the loop closed

Read the transaction from Step 4 again by its ID:

```http
GET /v1/collections/transactions/487ba009-56cf-4ad9-8b5c-045e27893e00
Authorization: Bearer {access_token}
```

Check that `settlement_id` is the settlement you expected and that the settlement is
`COMPLETED`. The link alone does not prove the payout: it can appear while the settlement is
still `PENDING`.

To finish the UAT exercise, check:

1. Both payments are `COMPLETED` and link to the expected settlement.
2. The settlement's actual amounts are correct and its status is `COMPLETED`.
3. The simulated payout matches the test evidence you agreed with Ripple.


Save any test references with those records. A UAT pass does not prove bank delivery. In
production, also match the payout's amount and reference to your bank statement. To check
payouts across a whole period, see
[Reconcile transactions and settlements](/pt-br/products/collections/guides/reconcile-transactions-and-settlements).

### Troubleshoot step 7

Ripple returns `422` with code `SETTLEMENT_VALIDATION_ERROR` when it can't create the
settlement. The message says why:

| Message | Cause | What to do |
|  --- | --- | --- |
| `Source account is not eligible for settlement` | The account is not found, not `ACTIVE`, or not `CUSTOMER`-owned. | Use your `CUSTOMER` account, not the beneficiary's `PARTNER` account. |
| `No payout destination configured for source account` | Ripple has no payout destination on file for the account. | Contact Ripple. |
| `Payout destination currency does not match source account` | The configured destination uses a different currency. | Contact Ripple. |
| `Settlement is not yet available for this account` | Ripple has not finished setting up payouts for the account. | Contact Ripple. |
| `No unsettled trades or balance to settle` | Nothing is ready to pay out, or automatic payout already claimed it. | Wait for payments to complete. With automatic payout, follow [If your setup uses automatic payout](#if-your-setup-uses-automatic-payout). |
| `Settlement amount below minimum` | The amount ready to pay out is below the settlement minimum. | Ask Ripple for your minimum. Wait for more payments to arrive, then try again. |


Other responses and statuses:

| What you see | Cause | What to do |
|  --- | --- | --- |
| `409` with code `IDEMPOTENCY_IN_PROGRESS` | An earlier request with the same `X-Idempotency-Key` is still running. | Wait, then read your settlements before you retry. |
| `422` with code `IDEMPOTENCY_KEY_REUSE_MISMATCH` | You reused an `X-Idempotency-Key` with a different body. | Use a new key for a new request. |
| The settlement stays `PENDING` or `PROCESSING` | The payout is still in progress, or Ripple is investigating it. | Keep it open. If it passes the agreed time, contact Ripple with its ID, source account ID, amount, currency, status, and the times you checked. Don't create a replacement because of the delay. |
| `status` is `FAILED` | The payout did not complete. | Contact Ripple with the settlement ID before you request another payout. |
| `404` when you read the settlement | The ID is wrong, belongs to another organization, or Ripple cancelled the settlement before booking it. | Read the Step 4 transaction again. If its `settlement_id` is now `null`, the payment is ready for a new settlement. |
| `settlement_id` on the transaction stays `null` | The settlement included other payments, or the payout came from balance. | Check the settlement's amounts. See [Reconcile transactions and settlements](/pt-br/products/collections/guides/reconcile-transactions-and-settlements). |


## Reference

This table lists every API operation this guide uses. Each name links to the operation's page in
the API reference, which gives its full request and response schema. The **Use** column says
which step calls the operation and why. A *conditional path* runs only if your setup needs it.

| Operation | Use |
|  --- | --- |
| [Create partner](/products/collections/api/collections/partners/createpartnerv1) | Step 1, the payer and the beneficiary |
| [Get partner](/products/collections/api/collections/partners/getpartnerbyidv1) | Step 1, poll for `ACTIVATED` |
| [List partners](/products/collections/api/collections/partners/listpartnersv1) | Step 1 troubleshooting, find an existing partner |
| [Update partner](/products/collections/api/collections/partners/updatepartnerv1) | Step 1 troubleshooting, add missing `data` |
| [Create account](/products/collections/api/collections/accounts/createaccountv1) | Step 2, a `PARTNER` account for the beneficiary |
| [Create channel](/products/collections/api/collections/collection-channels/createchannelv1) | Step 3, deposit instructions |
| [Create webhooks](/products/collections/api/collections/webhooks/createwebhooks) | Step 4, optional notifications |
| [List transactions](/products/collections/api/collections/transactions/listtransactionsv1) | Step 4, observe incoming payments |
| [Get transaction](/products/collections/api/collections/transactions/gettransactionbyidv1) | Steps 4 and 7, refresh a known payment |
| [List accounts](/products/collections/api/collections/accounts/listaccountsv1) | Before starting, find the `CUSTOMER` account |
| [Get account](/products/collections/api/collections/accounts/getaccountbyidv1) | Step 6, check available funds |
| [Create transfer](/products/collections/api/collections/transfers/createtransferv1) | Step 6, conditional path, move funds that remain in a source account |
| [Confirm transfer](/products/collections/api/collections/transfers/confirmtransferv1) | Step 6, conditional path, execute the transfer |
| [Get transfer](/products/collections/api/collections/transfers/gettransferbyidv1) | Step 6, conditional path, check a transfer's status |
| [Create settlement](/products/collections/api/collections/settlements/createsettlementv1) | Step 7, pay out |
| [Get settlement](/products/collections/api/collections/settlements/getsettlementbyidv1) | Step 7, verify the payout |