Partial Payments

Partial payment provides better control over how you collect payments by allowing your customers to make payments in parts against a particular order_id instead of making the entire payment at once.

Just like any other payment, each partial payment would have a unique payment_id but will be tied to the same order_id thereby allowing customers to easily make multiple payments against the same order using the same Payment Link. This makes it easier to track the status of a particular order.

Business Use-case#

This feature comes handy when dealing with transactions for a large amount where the customer finds paying the total amount in parts more convenient than paying the entire amount upfront.

For example, a tourism company, Acme Corp. has expensive travel packages. Now as per the company policy, a booking booking amount must be collected by the customer before starting to book the tour for client. Using partial payments, merchants issues a link to the customer, using which the customer pays the booking amount against the same order amount.

How it Works#

  • Merchant creates a payment link of ₹ 20000

  • Customer chooses to pay an amount of ₹ 10000 out of due amount mentioned in the payment link.

  • Since the customer pays an amount less than the due amount, the payment link would show partially_paid status till the entire amount due is zero and does not get expired or cancelled.

  • Once all amount has been paid, status of the payment link changes to paid. Learn about the Payment Link lifecycle.

Note: A customer can make multiple partial payments against an order through the same payment link.

Notifications#

Both customer and merchants are notified about all the payments made against an order via mail, SMS, and Razorpay webhooks. Notifications includes whether partial payment was enabled for the payment link, amount paid, and amount due on the payment link at the time, etc.

Enabling Partial Payment#

Partial payments can be enabled through your Razorpay Dashboard or via APIs.

API#

The endpoint for creating payment links is given below:

/invoices

Request Body Parameter#

In order to enable partial payments via API you need to send the following attribute along with other request body attribute.

partial_payment string in: 0/1
Used to enable partial payments. Defaults to 0.

The sample request and response for creating a payment link with partial payment enabled is given below:

curl -X POST \ https://api.razorpay.com/v1/invoices/ \ -H 'Content-type: application/json' \ -d '{ "line_items": [ { "name": "Book / English August", "description": "Funny story of an IAS officer wanting to be aything other than an IAS.", "amount": 10000, "currency": "INR", "quantity": 1 } ], "customer": { "email": "gaurav.kumar@razorpay.com", "contact": "9123456780", "billing_address": { "line1": "#11, Navi Camp", "city": "Pandora", "state": "Karnataka", "zipcode": "560076", "country": "India" } },
{ "id": "inv_AHi6pX3JEiBLqD", "entity": "invoice", "receipt": null, "invoice_number": null, "customer_id": "cust_80Qb2y3aakiwcx", "customer_details": { "id": "cust_80Qb2y3aakiwcx", "name": null, "email": "gaurav.kumar@razorpay.com", "contact": "9123456780", "gstin": null, "billing_address": { "id": "addr_80Qb2yt7ndvjgO", "type": "billing_address", "primary": true, "line1": "#11, Navi Camp", "line2": null, "zipcode": "560076", "city": "Pandora", "state": "Karnataka", "country": "in" }, "shipping_address": null, "customer_name": null, "customer_email": "gaurav.kumar@razorpay.com", "customer_contact": "9123456780" }, "order_id": "order_AHi6pZEwURdA6f", "line_items": [ { "id": "li_AHi6pY47GikcyO", "item_id": null, "name": "Book / English August", "description": "Funny story of an IAS officer wanting to be aything other than an IAS.", "amount": 10000, "unit_amount": 10000, "gross_amount": 10000, "tax_amount": 0, "net_amount": 10000, "currency": "INR", "type": "invoice", "tax_inclusive": false, "hsn_code": null, "sac_code": null, "tax_rate": null, "unit": null, "quantity": 1, "taxes": [] } ], "payment_id": null, "status": "issued", "expire_by": null, "issued_at": 1527772386, "paid_at": null, "cancelled_at": null, "expired_at": null, "sms_status": "pending", "email_status": "pending", "date": 1527772386, "terms": null, "partial_payment": true, "gross_amount": 10000, "tax_amount": 0, "amount": 10000, "amount_paid": 0, "amount_due": 10000, "currency": "INR", "description": null, "notes": [], "comment": null, "short_url": "https://rzp.io/i/ZLmwNtM", "view_less": true, "billing_start": null, "billing_end": null, "type": "link", "group_taxes_discounts": false, "user_id": null, "created_at": 1527772386 }

Dashboard#

To create a payment link via the Dashboard:

  1. Log on to Razorpay Dashboard.
  2. Go to Payment Links.
  3. Click Create Payment Link.
  4. Select the checkbox Enable partial payments.

The created payment link will appear in the list of created payment links.

Clicking on the specific payment link ID (for example inv_8fZcMz3hW9Iqy2) will open a details page of the particular payment link.

Webhook Status#

In addition to invoice.paid and invoice.expired, you need to subscribe to invoice.partially_paid webhook event in order to get notified when a partial payment is made against any payment link.

However, the final payment that marks the complete payment against an order would trigger a invoice.paid event.

For example, if a payment link of amount ₹ 20000 was paid in three parts, ₹ 4000, ₹ 1000, ₹ 15000. The first two payments would trigger invoice.partially_paid event as payment link status continues to be that. The 3rd (last) payment would trigger invoice.paid event.

Customer-side Interaction#

When the customer opens the payment link page, if partial payment is enabled, customer will have the option to modify the payment amount to anything between 1 and the amount due at the time.

You can also view the payment history as shown below: