> ## Documentation Index
> Fetch the complete documentation index at: https://developer.transactbridge.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Payment Mandates

> Understand payment mandates and how they are used for recurring subscription payments.

A **payment mandate** is an authorization given by a customer to Transact Bridge and the applicable payment network or payment provider to collect future payments automatically.

Payment mandates are primarily used for **recurring payments and subscriptions**, where Transact Bridge needs to collect payments automatically after the customer has completed the initial authorization.

## How Payment Mandates Work

A payment mandate allows the customer to authorize recurring payments instead of manually making a payment for every billing cycle.

The general flow is:

```mermaid theme={null}
flowchart TD
    C[Customer Authorizes Payment Mandate on Checkout]

    C --> D[Mandate Created]

    D --> E[Subscription Becomes ACTIVE]

    E --> F[Billing Cycle]

    F --> G[Invoice or Recurring Charge]

    G --> H[Transact Bridge Uses Mandate]

    H --> I[Payment Collection]

    I --> J{Payment Successful}

    J -->|Yes| K[Subscription Continues]

    J -->|No| L[Apply Retry or Failure Policy]
```

## Mandate Authorization

The customer authorizes a payment mandate through the Transact Bridge hosted checkout.

Depending on the payment method, the authorization may involve mechanisms such as:

* UPI AutoPay mandate
* Card mandate

The customer does not have to manually initiate every subsequent payment after the mandate has been successfully authorized.

## Mandate in a Prepaid Subscription

For a **prepaid subscription**, the customer pays before accessing the service.

The mandate can be authorized during the subscription checkout so that Transact Bridge can automatically collect the recurring amount for subsequent billing periods.

### Flow

```text theme={null}
Create Subscription
        |
        ↓
billAtStart = true
        |
        ↓
PENDING
        |
        ↓
Hosted Checkout
        |
        ↓
Initial Payment + Mandate Authorization
        |
        ↓
ACTIVE
        |
        ↓
Next Billing Period
        |
        ↓
Automatic Collection Using Mandate
```

### Example

Consider a monthly subscription:

```text theme={null}
Plan Amount: ₹999/month
Billing Frequency: Monthly
```

The customer completes the initial payment of ₹999 and within that transaction TransactBridge also gets authorization for the recurring payment mandate.

The subscription becomes `ACTIVE`.

At the beginning of the next billing period, Transact Bridge can use the authorized mandate to collect the next ₹999.

```text theme={null}
1 August
   |
   ↓
Customer pays ₹999
   |
   ↓
Mandate authorized
   |
   ↓
Subscription ACTIVE
   |
   ↓
1 September
   |
   ↓
₹999 collected using mandate
   |
   ↓
Next billing period
```

## Mandate in a Postpaid Subscription

For a **postpaid subscription**, the customer uses the service first and payment is collected after the billing period.

In this case, the customer does not need to pay the first postpaid invoice to activate the subscription.

Instead, the customer authorizes a payment mandate on checkout. To authorize a payment mandate, a small amount is charged to the customer (Ex: \$0.1), and on successful payment, the mandate is authorized for future collection.

```text theme={null}
Create Subscription
        |
        ↓
billAtStart = false
        |
        ↓
PENDING
        |
        ↓
Hosted Checkout
        |
        ↓
Mandate Authorization
        |
        ↓
ACTIVE
        |
        ↓
Customer Uses Service
        |
        ↓
Billing Period Ends
        |
        ↓
Invoice Generated
        |
        ↓
Invoice Approved
        |
        ↓
Collection Using Mandate
```

## What Happens When Mandate Collection Fails?

A mandate collection may fail for reasons such as:

* Insufficient funds
* Expired or invalid payment credentials
* Bank or payment-network failure
* Mandate-related restrictions
* Customer or bank authorization issues

When collection fails, the subscription does not necessarily terminate immediately.

Transact Bridge can apply the configured **retry, due, overdue, and unpaid-invoice policies**.

```mermaid theme={null}
flowchart TD
    A[Invoice Approved]
    --> B[Collection Using Mandate]

    B --> C{Collection Successful?}

    C -->|Yes| D[Payment Completed]
    D --> E[Subscription Continues]

    C -->|No| F[Payment Failure]

    F --> G[Retry / Due / Overdue Handling]

    G --> H{Payment Recovered?}

    H -->|Yes| E

    H -->|No| I[Apply Configured Subscription Policy]
```

## Important Considerations

* A payment mandate is an authorization for future payment collection.
* The customer must successfully authorize the applicable payment mandate before Transact Bridge can use the mandate for recurring collection.
* Mandates are useful for automating recurring subscription payments.
* In prepaid subscriptions, the mandate can be used to collect the recurring amount before the next service period.
* In postpaid subscriptions, the mandate can be used to collect an approved invoice after the customer has consumed the service.
* If a collection attempt fails, the configured retry and overdue policies determine the subsequent handling.
* A mandate should not be treated as the same thing as an individual payment transaction. The mandate provides the authorization mechanism, while each subsequent collection results in an actual payment transaction.

> **In simple terms:** A payment mandate gives Transact Bridge the customer's authorization to collect future subscription payments automatically, eliminating the need for the customer to manually initiate every recurring payment.
