Payment Link Expiry

Set a date after which an invoice can no longer be paid, and show your customer when the link has lapsed.

🚧

Rolling out

Expiry controls in the dashboard are being enabled per organization. If the invoice form does not show Payment link expires yet, your organization does not have them enabled. The API on this page works for every account.

Set a date and time after which an invoice can no longer be paid. When the date passes, PayMongo voids the invoice, its payment link stops working, and the hosted payment page tells your customer the invoice has expired.

You can set, change, or remove the date on a draft or unpaid invoice. Invoices that a repeating schedule generates cannot have an expiry date.

Set an expiry date

While creating or editing a draft

The invoice form has an optional Payment link expires field. Pick a date and time to attach it to the invoice before you send it. The field does not apply when Repeat this invoice is on.

When a date is set, the preview footer shows Link expires with that date. The due date still shows in the body of the invoice. When you send, the Review & send dialog names the date: the payment link stays active until then, or until the invoice is paid or voided.

From the invoice page

Open a draft or unpaid invoice and click Set expiry date. Pick a date and time in Expires on, then click Set expiry. Times are in your local timezone, and the date must be in the future and after the scheduled send date when the invoice has one.

Once a date is set, a banner on the invoice reads Payment link expires on with the date. Use Change to move the date, or Remove to clear it so the invoice stays payable until it is paid or voided.

A draft whose date passes before you send it cannot be sent. Its banner asks you to change or remove the date first.

Setting, changing, or removing a date needs the same permission as voiding an invoice, because a date that passes voids the invoice. See Manage sent invoices for how to grant it.

When the date passes

The invoice is voided the same way as a manual void: the payment link stops working and the invoice can no longer be paid. A void is final, so create a new invoice if you still need to bill the customer.

In the API the invoice is void. The dashboard and the hosted payment page show Expired for a void invoice whose expires_at is at or before its voided_at, so you can tell it apart from one you voided yourself. On the invoice page the banner reads This invoice expired on with the date.

Before the date, the hosted payment page shows Pay by with the date under the pay button. After it, your customer sees This invoice has expired, the date it could be paid until, and a prompt to contact you for a new invoice.

API

Set or move the date with POST /v1/invoices/:id/expiry, and remove it with POST /v1/invoices/:id/expiry/cancel. Both answer with the updated invoice.

expires_at takes an RFC 3339 timestamp with an offset, such as 2026-10-31T16:00:00+08:00 or 2026-10-31T08:00:00Z:

{
  "expires_at": "2026-10-31T16:00:00+08:00"
}

The invoice response omits expires_at when no date is set, including after you remove one.

  • Set answers 400 when the date is not in the future or is not RFC 3339. It answers 422 when the invoice is paid or void, belongs to a repeating schedule or subscription, or the date is at or before the scheduled send date.
  • Cancel answers 404 when the invoice has no expiry date, and 422 when it is paid or void.

A scan that runs every 15 minutes voids each open invoice whose date has passed. Opening the hosted payment page or downloading its PDF voids a lapsed invoice right away. Until one of those happens, a read can still return status: open with a passed expires_at.

See Set the expiry date of an invoice and Remove the expiry date of an invoice for the full request and response schema.


Did this page help you?