> ## Documentation Index
> Fetch the complete documentation index at: https://rain-sandbox-trial.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Rain-Managed

> In the Rain-managed Settlement process, our system handles how authorized transactions are finalized and how funds are moved. Depending on the merchant’s request, settlements can capture the full authorized amount, a partial amount, or even exceed the authorization under certain conditions. In some cases, settlements may occur without prior authorization. Each flow determines how authorization holds are released and how balances are updated. Once settlement is complete, we post the transaction and send a webhook to confirm the final amount.

## Standard settlements

In a standard settlement, the merchant captures the full amount that was previously authorized. Our system then releases the authorization hold and transfers the funds. This is the most common settlement type used in retail transactions.

When we receive the settlement funds from the merchant we will send a [`transaction.completed`](/docs/transaction#spend-3) webhook with the final amount.

```mermaid theme={null}
%%{
  init: {
    'theme': 'base',
    'themeVariables': {
	    'textColor': '#A6CFFF',
      'primaryColor': '#212933',
      'primaryTextColor': '#FFFFFF',
      'primaryBorderColor': '#A6CFFF',
      'secondaryColor': '#F73196',
      'noteBkgColor': '#F4F3FF',
      'noteBorderColor': '#F4F3FF',
      'noteTextColor': '#6938EF'
    },
	  'sequence': {
	    'actorFontWeight': 'bold'
	  }
  }
}%%

sequenceDiagram
		participant Merchant
		participant Rain
		participant Our Ledger
		participant You
    Note over Merchant,You: Previous Authorization Hold ($100)
    Note over Our Ledger: Total Hold ($100)
    Merchant->>+Rain: Settlement ($100)
    Rain->>+Our Ledger: Release Auth Hold ($100)
    Note over Our Ledger: Total Hold ($0)
	  Our Ledger-->>-Rain: Auth Hold Released
    Rain->>+Our Ledger: Post Transaction ($100)
    Note over Our Ledger: Posted Balance ($100)
	  Our Ledger-->>-Rain: Transaction Posted
    Rain-->>-Merchant: Settlement Completed
    Rain->>+You: `transaction.completed` Webhook ($100)
    You-->>-Rain: Webhook Acknowledged
```

## Partial capture

In a partial capture, the merchant settles for less than the originally authorized amount. Our system releases the full authorization hold and transfers only the captured amount. This scenario is common in restaurants, where the final charge may be lower than the initial authorization after accounting for tips.

You will receive a [`transaction.completed`](/docs/transaction#spend-3) webhook with the final amount.

```mermaid theme={null}
%%{
  init: {
    'theme': 'base',
    'themeVariables': {
	    'textColor': '#A6CFFF',
      'primaryColor': '#212933',
      'primaryTextColor': '#FFFFFF',
      'primaryBorderColor': '#A6CFFF',
      'secondaryColor': '#F73196',
      'noteBkgColor': '#F4F3FF',
      'noteBorderColor': '#F4F3FF',
      'noteTextColor': '#6938EF'
    },
	  'sequence': {
	    'actorFontWeight': 'bold'
	  }
  }
}%%

sequenceDiagram
		participant Merchant
		participant Rain
		participant Our Ledger
		participant You
    Note over Merchant,You: Previous Authorization Hold ($100)
    Note over Our Ledger: Total Hold ($100)
    Merchant->>+Rain: Settlement ($80)
    Rain->>+Our Ledger: Release Auth Hold ($100)
    Note over Our Ledger: Total Hold ($0)
	  Our Ledger-->>-Rain: Auth Hold Released
    Rain->>+Our Ledger: Post Transaction ($80)
    Note over Our Ledger: Posted Balance ($80)
	  Our Ledger-->>-Rain: Transaction Posted
    Rain-->>-Merchant: Settlement Completed
    Rain->>+You: `transaction.completed` Webhook ($80)
    You-->>-Rain: Webhook Acknowledged
```

## Over capture

<Info>
  **Only available to specific merchant categories:**

  Certain industries are allowed to settle for more than the authorized amount to accommodate tips and similar charges. See the [permitted overcapture limits by MCC](/docs/handling-overcapture) for specific MCC codes and their permitted overcapture limits.
</Info>

In an over capture, the merchant attempts to settle for more than the authorized amount. Our system validates the request against network rules and merchant-specific thresholds and may approve or decline it accordingly. This is common in scenarios involving tips or additional surcharges.

You will receive a [`transaction.completed`](/docs/transaction#spend-3) webhook with the total amount.

```mermaid theme={null}
%%{
  init: {
    'theme': 'base',
    'themeVariables': {
      'textColor': '#A6CFFF',
      'primaryColor': '#212933',
      'primaryTextColor': '#FFFFFF',
      'primaryBorderColor': '#A6CFFF',
      'secondaryColor': '#F73196',
      'noteBkgColor': '#F4F3FF',
      'noteBorderColor': '#F4F3FF',
      'noteTextColor': '#6938EF'
    },
    'sequence': {
      'actorFontWeight': 'bold'
    }
  }
}%%

sequenceDiagram
    participant Merchant
    participant Rain
    participant Our Ledger
    participant You
    Note over Merchant,You: Previous Authorization Hold ($100)
    Note over Our Ledger: Total Hold ($100)
    Merchant->>+Rain: Settlement ($120)
    Rain->>+Our Ledger: Release Auth Hold ($100)
    Note over Our Ledger: Total Hold ($0)
    Our Ledger-->>-Rain: Auth Hold Released
    Rain->>+Our Ledger: Post Transaction ($120)
    Note over Our Ledger: Posted Balance ($120)
    Our Ledger-->>-Rain: Transaction Posted
    Rain-->>-Merchant: Settlement Completed
    Rain->>+You: `transaction.completed` Webhook ($120)
    You-->>-Rain: Webhook Acknowledged
```

## Multi capture

Our system supports multiple partial settlements against a single authorization. We maintain the full authorization hold until all captures are completed, which is similar to how we handle refunds and reversals. Once all settlements are processed, we release the hold and post the total settled amount. This approach is common in shipping scenarios where items are fulfilled in separate shipments against one initial authorization.

Once the total amount is settled you will receive a [`transaction.completed`](/docs/transaction#spend-3) webhook with the final amount.

```mermaid theme={null}
%%{
  init: {
    'theme': 'base',
    'themeVariables': {
	    'textColor': '#A6CFFF',
      'primaryColor': '#212933',
      'primaryTextColor': '#FFFFFF',
      'primaryBorderColor': '#A6CFFF',
      'secondaryColor': '#F73196',
      'noteBkgColor': '#F4F3FF',
      'noteBorderColor': '#F4F3FF',
      'noteTextColor': '#6938EF'
    },
	  'sequence': {
	    'actorFontWeight': 'bold'
	  }
  }
}%%

sequenceDiagram
		participant Merchant
		participant Rain
		participant Our Ledger
		participant You
    Note over Merchant,You: Previous Authorization Hold ($100)
    Note over Our Ledger: Total Hold ($100)
    Merchant->>+Rain: Settlement 1/2 ($40)
    Note over Rain,Our Ledger: Hold Maintained
    Note over Our Ledger: Total Hold ($100)
    Rain-->>-Merchant: Settlement 1/2 Completed
    Note over Merchant,You: Time passes
    Merchant->>+Rain: Settlement 2/2 ($60)
    Note over Merchant,You: All Settlements Processed
    Rain->>+Our Ledger: Release Auth Hold ($100)
    Note over Our Ledger: Total Hold ($0)
	  Our Ledger-->>-Rain: Auth Hold Released
    Rain->>+Our Ledger: Post Transaction ($100)
    Note over Our Ledger: Posted Balance ($100)
	  Our Ledger-->>-Rain: Transaction Posted
    Rain-->>-Merchant: Settlement 2/2 Completed
    Rain->>+You: `transaction.completed` Webhook ($100)
    You-->>-Rain: Webhook Acknowledged
```

## Force capture

<Info>
  **Only available to specific merchant categories:**

  In card-absent environments, up to a 15% increase between the authorized and settled amount is typically permitted. This buffer covers adjustments like shipping fees, taxes, or final service charges.
</Info>

A force capture occurs when a merchant settles a transaction without prior authorization. These transactions bypass the authorization phase and proceed directly to settlement. This is typically used in offline scenarios, such as in-flight purchases where the merchant isn’t connected to the internet.

Once the merchant posts the settlement, you will receive a [`transaction.completed`](/docs/transaction#spend-3) webhook. These transactions are final.

```mermaid theme={null}
%%{
  init: {
    'theme': 'base',
    'themeVariables': {
      'textColor': '#A6CFFF',
      'primaryColor': '#212933',
      'primaryTextColor': '#FFFFFF',
      'primaryBorderColor': '#A6CFFF',
      'secondaryColor': '#F73196',
      'noteBkgColor': '#F4F3FF',
      'noteBorderColor': '#F4F3FF',
      'noteTextColor': '#6938EF'
    },
    'sequence': {
      'actorFontWeight': 'bold'
    }
  }
}%%

sequenceDiagram
    participant Merchant
    participant Rain
    participant Our Ledger
    participant You
    Note over Merchant,You: No Previous Authorization Hold
    Note over Our Ledger: Total Hold ($0)
    Merchant->>+Rain: Force Capture Settlement ($100)
    Rain->>+Our Ledger: Post Transaction ($100)
    Note over Our Ledger: Posted Balance ($100)
    Our Ledger-->>-Rain: Transaction Posted
    Rain-->>-Merchant: Settlement Completed
    Rain->>+You: `transaction.completed` Webhook ($100)
    You-->>-Rain: Webhook Acknowledged
```

## Refunds

Refunds are processed as negative transactions and may not reference the original charge. Our system validates each refund request and credits the amount to the cardholder’s account. Refunds can be issued anytime, even long after settling the original transaction.

Once the settlement is complete, we will post the refund on our ledger, and you will receive a [`transaction.completed`](/docs/transaction#spend-3) webhook.

```mermaid theme={null}
%%{
  init: {
    'theme': 'base',
    'themeVariables': {
	    'textColor': '#A6CFFF',
      'primaryColor': '#212933',
      'primaryTextColor': '#FFFFFF',
      'primaryBorderColor': '#A6CFFF',
      'secondaryColor': '#F73196',
      'noteBkgColor': '#F4F3FF',
      'noteBorderColor': '#F4F3FF',
      'noteTextColor': '#6938EF'
    },
	  'sequence': {
	    'actorFontWeight': 'bold'
	  }
  }
}%%

sequenceDiagram
		participant Merchant
		participant Rain
		participant Our Ledger
    Merchant->>+Rain: Refund (-$100)
    Rain->>+Our Ledger: Post Refund (-$100)
    Note over Our Ledger: Posted Balance (-$100)
	  Our Ledger-->>-Rain: Transaction Posted
    Rain-->>-Merchant: Settlement Completed
    Rain->>+You: `transaction.completed` Webhook ($-100)
    You-->>-Rain: Webhook Acknowledged
```
