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

# Partial Payments

> Let shoppers pay part of the order upfront and the rest on delivery.

Partial payments let shoppers **prepay a portion** of the order (typically 10–30%) and pay the remainder as **COD** at delivery. This dramatically reduces RTO on high-ticket orders while keeping the checkout friction low.

## How it works

<Steps>
  <Step title="Merchant defines the rule">
    In the RabbitPay Dashboard, set the partial percentage or a flat prepaid amount. Rules can be scoped by SKU, collection, cart value, or customer segment.
  </Step>

  <Step title="Shopper picks partial">
    At checkout, the shopper sees three tiles: **Prepaid**, **Partial**, **COD**. Selecting Partial shows the exact split.
  </Step>

  <Step title="RabbitPay collects prepaid amount">
    The prepaid portion is captured via UPI, cards, or wallets. On success, the order is created in Shopify with the partial tag.
  </Step>

  <Step title="COD collected at delivery">
    Your logistics provider collects the balance. RabbitPay reconciles the COD remittance against the original session.
  </Step>
</Steps>

## Configuring rules

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.rabbitpay.ai/v1/partial_payments/rules \
    -H "Authorization: Bearer sk_live_your_key" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "High-ticket electronics",
      "conditions": {
        "cart_value_min": 500000,
        "collections": ["electronics"]
      },
      "split": {
        "type": "percentage",
        "prepaid_percent": 20
      },
      "enabled": true
    }'
  ```

  ```javascript Node.js theme={null}
  await rabbitpay.partialPayments.rules.create({
    name: 'High-ticket electronics',
    conditions: {
      cart_value_min: 500000,
      collections: ['electronics'],
    },
    split: { type: 'percentage', prepaid_percent: 20 },
    enabled: true,
  });
  ```
</CodeGroup>

## Response object

```json theme={null}
{
  "id": "pprule_01H8Z...",
  "object": "partial_payment_rule",
  "name": "High-ticket electronics",
  "conditions": {
    "cart_value_min": 500000,
    "collections": ["electronics"]
  },
  "split": {
    "type": "percentage",
    "prepaid_percent": 20
  },
  "enabled": true,
  "created_at": 1729353600
}
```

## Session output

When a shopper picks Partial, the resulting checkout session looks like:

```json theme={null}
{
  "id": "cs_live_9xY...",
  "amount": 699900,
  "payment_method": "partial",
  "amount_prepaid": 139980,
  "amount_cod": 559920,
  "status": "completed"
}
```

<Warning>
  Refunds on partial orders are capped at the **prepaid amount**. COD balances cannot be refunded via RabbitPay — handle them manually if the shopper cancels before delivery.
</Warning>

## Best practices

* Start with **20% prepaid** on orders above ₹5,000 to measure RTO impact.
* Combine with the **Risk API** to auto-disable partial for high-risk shoppers.
* Show the split clearly on the order confirmation page.
