Create a new [payment link](https://docs.monite.com/payments/payment-links) for an accounts payble invoice (to be paid by the entity) or an accounts receivable invoice (to be sent to the counterpart).
Request
This endpoint expects an object.
payment_methodslist of enumsRequired
Payment methods to be displayed on the payment page. These payment methods must already be enabled for the entity.
**Note:** Available payment methods vary per country, transaction type (B2B or B2C), and the payment link type (entity pays a bill or entity generates an invoice payment link for its counterpart). For more information, see [Payment methods](https://docs.monite.com/payments/payment-methods).
recipientobjectRequired
Specifies the invoice vendor - entity or counterpart. This is the payee, or the recipient of the payment.
amountintegerOptional>=1
The payment amount in [minor units](https://docs.monite.com/references/currencies#minor-units). The usage of the `amount` field depends on the type of the payment link you are creating:
* If the `invoice` object is specified (that is, when creating a payment link for an external invoice),
`amount` is required.
* If `object` is specified:
* If `object.type` is `payable`, `amount` must not be specified since it's taken from the payable.
* If `object.type` is `receivable`, you can provide a custom `amount` value to create a partial payment link.
In this case, the `amount` value must not exceed the invoice's `amount_to_pay` minus all active payment links.
currencyenumOptional
The payment currency. Mutually exclusive with object.
expires_atdatetimeOptional
Date and time (in the ISO 8601 format) when this payment link will expire. Can be up to 70 days from the current date and time.
If omitted:
* Payment links for payables and receivables expire 30 days after the invoice due date.
* Payment links for external invoices expire 30 days after the link creation time.
For more information, see [Payment link expiration](https://docs.monite.com/payments/payment-links#expiration).
invoiceobjectOptional
An object containing information about an external invoice to be paid. Mutually exclusive with object.
objectobjectOptional
If the invoice being paid is a payable or receivable stored in Monite, provide the `object` object containing the invoice type and ID. Otherwise, use the `amount`, `currency`, `payment_reference`, and (optionally) `invoice` fields to specify the invoice-related data.
payment_referencestringOptional
A payment reference number that the recipient can use to identify the payer or purpose of the transaction. Mutually exclusive with object.
return_urlstringOptionalformat: "uri"1-2083 characters
The URL where to redirect the payer after the payment. If return_url is specified, then after the payment is completed the payment page will display the “Return to platform” link that navigates to this URL.
Response
Successful Response
payment_intent_idstringformat: "uuid"
payment_methodslist of strings
payment_page_urlstringformat: "uri"1-2083 characters
payment_intentobjectOptional
payment_referencestringOptional
return_urlstringOptional
The URL where to redirect the payer after the payment. If return_url is specified, then after the payment is completed the payment page will display the “Return to platform” link that navigates to this URL.