Create a Payment Links
Creates a payment link.
You can also create payment links in the Merchant Dashboard when you do not need to automate link creation.
Related guide: Payment Links
Request parameters for creating a new payment link.
- Type: integer Format: int64amountrequired
Amount charged in smallest currency unit
- Type: stringon
_behalf _of max length:100The account on behalf of which to charge.
- Type: string | nullpayment
_method _configuration Reference to the payment method configuration for the types that customers can use.
- Type: string Format: date-timeexpires
_at Expiry time for the payment link. After this time, the payment link will no longer be available for payment. Defaults to 24h after creation.
- Type: array object[] | null ·line
_items Details about the products sold or services provided
- Type: string | nullredirect
_url max length:1000URL to which the customer should be sent after the payment. Any payment results will use this URL.
- Type: string | nullclient
_reference _id A free-form reference from the merchant's system. Typically used to identify the checkout in the merchant's system. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the session with your internal systems.
- Type: string | nullclient
_customer _id An identifier of the customer in the merchant's system. Used to associate the Checkout and corresponding payments created from the Checkout. Required for SEPA payments - this will ensure that your customer is given a virtual iban that is unique to them and will enable Paypercut to reconcile the payment.
- Type: string | nulldescription
A free-form reference to describe the checkout
- Type: booleanlivemode
Has the value
trueif the object exists in live mode or the valuefalseif the object exists in test mode. - Type: object ·after
_completion After completion behavior for the Checkout Session.
- Type: string · enummode
The mode of the Checkout Session.
values- payment
Standard one-time payment.
- setup
Set up a payment method for future use.
- subscription
Create a subscription checkout that collects the first payment and stores a reusable payment method for renewal billing.
- bnpl
Buy now, pay later.
- Type: object ·restrictions
Settings that restrict the usage of a payment link.
- Type: string · enumbilling
_address _collection Specify whether Checkout should collect the customer's billing address. Defaults to
auto.values- auto
Checkout will only collect the billing address when necessary.
- required
Checkout will always collect the customer's billing address.
- Type: string ·currencyrequired
ISO 4217 currency codes (alpha3) supported for payments
- application/json
- application/json
- application/json
- application/json
- application/json
curl https://api.paypercut.io/v1/payment-links \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"amount": 2000,
"on_behalf_of": "",
"payment_method_configuration": null,
"expires_at": "",
"line_items": [
{
"quantity": 2,
"price": "01K755J9SV2364REVHB915Z2FW",
"price_data": {
"active": true,
"billing_scheme": "per_unit",
"created": 1,
"currency": "",
"livemode": true,
"lookup_key": null,
"product": "01K755J9SV2364REVHB915Z2FW",
"product_data": {
"active": true,
"name": "",
"description": "",
"unit_label": "",
"id": ""
},
"recurring": {
"interval": "daily",
"interval_count": 1,
"meter": null,
"usage_type": "licensed"
},
"type": "one_time",
"unit_amount": null,
"unit_amount_decimal": null,
"id": ""
},
"metadata": {
"additionalProperty": ""
}
}
],
"redirect_url": null,
"client_reference_id": null,
"client_customer_id": null,
"description": null,
"livemode": true,
"after_completion": {
"type": "redirect",
"redirect": {
"url": ""
},
"hosted": {
"custom_message": ""
}
},
"mode": "payment",
"restrictions": {
"completed_sessions": {
"count": 1,
"limit": 1
}
},
"billing_address_collection": "auto",
"currency": "EUR"
}'
{
"id": "string",
"url": "string",
"billing_address_collection": "auto"
}
