---
title: "POST /user/invoices/{invoice_id}/payment-link"
method: POST
path: "/user/invoices/{invoice_id}/payment-link"
---

# POST /user/invoices/{invoice_id}/payment-link

`POST /user/invoices/{invoice_id}/payment-link`

## Request

- Base URL: `https://developers.whmcs.com/api/v2`
- URL: `https://developers.whmcs.com/api/v2/user/invoices/{invoice_id}/payment-link`
- Auth: none declared

Issue a single-use link that hands the shopper off to a WHMCS payment page. Each call issues a new link.

## Path parameters

- `invoice_id` integer, required

## Response `200`

The hand-off link. The `url` value is single-use and short-lived.

- object
  - `data` object, required
    - `next_action` NextActionRedirect, required
      - `type` 'redirect', required
      - `url` string, required

## Other responses

- `401`: Access Not Authorized
- `403`: The caller is authenticated but does not have permission to use this resource (the _View & Pay Invoices_ permission).
- `404`: Entity Not Found
- `422`: The invoice is not awaiting payment. Only `Unpaid` and `Collections` status invoices can be handed off.
- `429`: Too many payment link requests have occurred (more than 30 within five minutes). The system counts these requests per client IP address. Because of this, integrations that proxy shoppers server-side will reach this limit quickly.
- `default`: General Error

---

[API](https://skmtc.dev/whmcs/apis/whmcs-api.md) - [All operations](https://skmtc.dev/whmcs/apis/whmcs-api/llms.txt) - [OpenAPI document](https://skmtc.dev/whmcs/apis/whmcs-api/revisions/bd3848ddbc3f?raw)
