# Recurring with 0 amount setup (free trial)

Set up recurring payments with a free trial by authorising 0 amount initially. The customer's card is validated and a mandate is established without any charge, ready for future billing.

## Use cases

- SaaS free trials
- Streaming service trials
- Subscription box samples
- Try-before-you-buy services

## Steps

### 1. Create 0 amount payment with mandate — `POST /payments`

Create a 0 amount payment with mandate_data to establish recurring authorisation.

Key parameters:
• amount: 0 - Free trial, no charge
• customer.id - Your unique customer identifier
• setup_future_usage: "off_session" - For merchant-initiated charges
• mandate_data: Documents customer consent
  - customer_acceptance: Records consent timestamp and method
  - mandate_type.multi_use.amount: Your subscription price

This 0 amount auth:
• Validates the customer's card
• Creates the mandate for future charges
• No funds are charged or held

Request body:

```json
{
  "amount": 0,
  "currency": "ZAR",
  "confirm": false,
  "capture_method": "automatic",
  "authentication_type": "three_ds",
  "setup_future_usage": "off_session",
  "description": "Free trial signup - card validated",
  "return_url": "https://example.com/flows/recurring-zero-auth?status=complete",
  "is_iframe_redirection_enabled": true,
  "billing": {
    "address": {
      "line1": "123 Main Street",
      "line2": "Apartment 4B",
      "city": "Cape Town",
      "state": "Western Cape",
      "zip": "8001",
      "country": "ZA",
      "first_name": "John",
      "last_name": "Doe"
    },
    "phone": {
      "number": "821234567",
      "country_code": "+27"
    },
    "email": "john.doe@example.com"
  },
  "shipping": {
    "address": {
      "line1": "456 Delivery Road",
      "line2": "Unit 7",
      "city": "Cape Town",
      "state": "Western Cape",
      "zip": "8001",
      "country": "ZA",
      "first_name": "John",
      "last_name": "Doe"
    },
    "phone": {
      "number": "821234567",
      "country_code": "+27"
    },
    "email": "john.doe@example.com"
  },
  "customer": {
    "id": "cus_trial_user",
    "email": "trial@example.com",
    "name": "Trial User",
    "phone": "+27123456789"
  },
  "mandate_data": {
    "customer_acceptance": {
      "acceptance_type": "online",
      "accepted_at": "2026-07-23T20:45:51.074Z",
      "online": {
        "ip_address": "127.0.0.1",
        "user_agent": "Mozilla/5.0"
      }
    },
    "mandate_type": {
      "multi_use": {
        "amount": 100000,
        "currency": "ZAR"
      }
    }
  }
}
```

### 2. Customer authorises

Customer enters card details and completes 3DS authentication.

On success you'll receive:
• mandate_id: Use this for all future charges
• payment_method_id: The saved card
• status: "succeeded" (for 0 amount, this means auth completed)

Save the mandate_id - you'll need it when the trial ends.

### 3. First charge (trial end) — `POST /payments`

When the trial ends, charge the customer using the mandate.

Key parameters:
• amount: Your subscription price
• off_session: true - Customer not present
• confirm: true - Process immediately
• mandate_id: From the 0 amount auth
• recurring_details: { type: "mandate_id", data: "man_xxx" }

This is a Merchant-Initiated Transaction (MIT) - no customer authentication required.

Request body:

```json
{
  "amount": 6500,
  "currency": "ZAR",
  "confirm": true,
  "off_session": true,
  "description": "First subscription charge after trial"
}
```

## Response

Payment endpoints return the payment object. Key fields to read:

- `payment_id` — the payment identifier.
- `status` — current payment status (see the state transitions below).
- `client_secret` — pass to the SDK to complete the payment client-side.
- `next_action` — present when a redirect or 3-D Secure challenge is required.

## Key parameters

- amount: 0 for initial authorisation
- Mandate established during 0 amount auth
- First real charge is an MIT payment
- Customer authenticates only once at signup

## Free trial with mandates

Combine 0 amount authorisation with mandates to offer free trials while securing authorisation for future charges.

### Benefits

- **Validated payment method** — The 0 amount auth confirms the card is valid and the customer is real, reducing failed payments when the trial ends.
- **Pre-authorised billing** — The mandate establishes consent for future charges at the time of signup, not when the trial ends.
- **Reduced friction** — Customers complete one authentication flow during signup. No re-authentication needed for the first charge.
- **Dispute protection** — Mandate documents that the customer agreed to billing terms, including when charges would start.

### Without mandates

Without a mandate, you'd need to re-authenticate the customer when the trial ends, causing friction and potential drop-off.

### Best practices

- Clearly communicate trial length and billing date upfront
- Send reminder before trial ends and first charge
- Store mandate_id securely for billing after trial
- Set mandate amount to your subscription price

## Flow diagram

```mermaid
flowchart LR
    subgraph Signup["Trial Signup"]
    A[Create 0 amount Payment<br/>+ Mandate] --> B[Mount SDK]
    B --> C[Customer Authorises]
    C --> D[Mandate Active]
    end
    subgraph Trial["Free Trial Period"]
    D --> E[Customer Uses Service]
    end
    subgraph Billing["Trial Ends"]
    E --> F[Charge via Mandate]
    F --> G[Subscription Active]
    end
```

## Payment state transitions

```mermaid
stateDiagram-v2
    state "Trial Signup" as signup {
        [*] --> requires_payment_method
        requires_payment_method --> processing: 0 amount Auth
        processing --> succeeded: Mandate Created
    }
    state "First Charge" as charge {
        [*] --> processing: mandate_id + amount
        processing --> succeeded: Charged
        processing --> failed: Declined
    }
    signup --> charge: Trial ends

    note right of signup: No charge - Card validated
    note right of charge: MIT payment - No auth required
```

---

Interactive version: https://playground.peachpayments.com/flows/recurring-zero-auth
