> ## 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.

# Partner-Managed

> In the Partner-managed Settlement process, your system manages authorization holds and posts transactions after receiving settlement webhooks from Rain. Once a merchant completes a settlement, Rain sends a webhook with the final amount. Your system must then release the corresponding authorization hold and post the transaction to your internal ledger. This setup gives you complete control over fund movement, allowing flexibility for handling partial, over, multi, force captures, and refunds.

## Standard settlements

In a standard settlement, the merchant captures the full amount that was previously authorized. Your system should release the authorization hold and post the transaction for the captured amount. This is the most common settlement flow used in retail environments.

When Rain receives the settlement funds from the merchant, Rain sends 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 You
		participant Your Ledger
    Note over Merchant,Your Ledger: Previous Authorization Hold ($100)
    Note over Your Ledger: Total Hold ($100)
    Merchant->>+Rain: Settlement ($100)
    Rain-->>-Merchant: Settlement Completed
    Rain->>+You: `transaction.completed` Webhook ($100)
    You->>+Your Ledger: Release Auth Hold ($100)
    Note over Your Ledger: Total Hold ($0)
	  Your Ledger-->>-You: Auth Hold Released
    You->>+Your Ledger: Post Transaction ($100)
    Note over Your Ledger: Posted Balance ($100)
	  Your Ledger-->>-You: Transaction Posted
    You-->>-Rain: Webhook Acknowledged
```

## Partial capture

In a partial capture, the merchant settles for less than the authorized amount. After receiving the settlement webhook, your system should release the full authorization hold and post a transaction for the captured amount only. This flow is common in restaurants, where the final charge may be lower than the original 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 You
		participant Your Ledger
    Note over Merchant,Your Ledger: Previous Authorization Hold ($100)
    Note over Your Ledger: Total Hold ($100)
    Merchant->>+Rain: Settlement ($80)
    Rain-->>-Merchant: Settlement Completed
    Rain->>+You: `transaction.completed` Webhook ($80)
    You->>+Your Ledger: Release Auth Hold ($100)
    Note over Your Ledger: Total Hold ($0)
	  Your Ledger-->>-You: Auth Hold Released
    You->>+Your Ledger: Post Transaction ($80)
    Note over Your Ledger: Posted Balance ($80)
	  Your Ledger-->>-You: Transaction Posted
    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 settles for more than the originally authorized amount. Rain validates the request against network rules and configured thresholds and may approve or decline it. This flow is typically used in scenarios that involve tips or additional surcharges, such as dining or hospitality.

Once Rain receives the settlement funds from the merchant, it sends 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 You
		participant Your Ledger
    Note over Merchant,Your Ledger: Previous Authorization Hold ($100)
    Note over Your Ledger: Total Hold ($100)
	    Merchant->>+Rain: Settlement ($120)
	    Rain-->>-Merchant: Settlement Completed
      Rain->>+You: `transaction.completed` Webhook ($120)
	    You->>+Your Ledger: Release Auth Hold ($100)
	    Note over Your Ledger: Total Hold ($0)
		  Your Ledger-->>-You: Auth Hold Released
	    You->>+Your Ledger: Post Transaction ($120)
	    Note over Your Ledger: Posted Balance ($120)
		  Your Ledger-->>-You: Transaction Posted
      You-->>-Rain: Webhook Acknowledged
```

To test this in sandbox, use two settlements that sum to a smaller amount. This multiple settlement situation will force it to be completed. To do this, navigate to the Transactions tab and click on the `add-settlement-icon` (right-most) on the corresponding transaction you want to over capture.

## Multi capture

Rain supports multiple partial settlements against a single authorization. The full authorization hold should remain in place until all settlements are completed. Once the final settlement is processed, Rain sends a webhook with the total settled amount. Your system should then release the authorization hold and post the transaction for the total amount. This flow is commonly used in shipping scenarios where items are fulfilled and charged separately against one initial authorization.

When Rain receives the settlement funds from the merchant, it sends 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 You
		participant Your Ledger
    Note over Merchant,Your Ledger: Previous Authorization Hold ($100)
    Note over Your Ledger: Total Hold ($100)
    Merchant->>+Rain: Settlement 1/2 ($40)
    Note over You,Your Ledger: Hold Maintained
    Note over Your Ledger: Total Hold ($100)
    Rain-->>-Merchant: Settlement 1/2 Completed
    Note over Merchant,Your Ledger: Time passes
    Merchant->>+Rain: Settlement 2/2 ($60)
    Note over Merchant,Your Ledger: All Settlements Processed
    Rain-->>-Merchant: Settlement 2/2 Completed
    Rain->>+You: `transaction.completed` Webhook ($100)
    You->>+Your Ledger: Release Auth Hold ($100)
    Note over Your Ledger: Total Hold ($0)
	  Your Ledger-->>-You: Auth Hold Released
    You->>+Your Ledger: Post Transaction ($100)
    Note over Your Ledger: Posted Balance ($100)
	  Your Ledger-->>-You: Transaction Posted
    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 flow is typically used in offline scenarios, such as in-flight purchases where the merchant does not have internet access.

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 You
		participant Your Ledger
    Note over Merchant,Your Ledger: No Previous Authorization Hold
    Note over Your Ledger: Total Hold ($0)
		opt If Force Capture Applicable
	    Merchant->>+Rain: Force Capture Settlement ($100)
	    Rain-->>-Merchant: Settlement Completed
      Rain->>+You: `transaction.completed` Webhook ($100)
	    You->>+Your Ledger: Post Transaction ($100)
	    Note over Your Ledger: Posted Balance ($100)
		  Your Ledger-->>-You: Transaction Posted
      You-->>-Rain: Webhook Acknowledged
    end
```

## Refunds

Refunds are treated as negative transactions and may or may not reference the original settlement. Rain validates each refund request based on network rules and merchant configuration before issuing a credit to the cardholder's account. Unlike reversals, refunds can be initiated independently of the original transaction and may occur well after the initial settlement.

Once the settlement is complete, you will receive a [`transaction.completed`](/docs/transaction#spend-3) webhook. You will then post the refund to your ledger.

```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 You
		participant Your Ledger
    Merchant->>+Rain: Refund (-$100)
    Rain-->>-Merchant: Settlement Completed
    Rain->>+You: `transaction.completed` Webhook ($-100)
    You->>+Your Ledger: Post Refund (-$100)
    Note over Your Ledger: Posted Balance (-$100)
	  Your Ledger-->>-You: Transaction Posted
    You-->>-Rain: Webhook Acknowledged
```
