Order Information
User History
Prices
Coupons
Products
Licenses
Transactions
Plans
Subscription Users
Modifiers
Payments
One-off Charges
Webhooks
post

/2.0/product/generate_pay_link

Set custom attributes for a one-time or subscription checkout

Overview

Custom checkouts can be based on an existing product or subscription plan (in which case they will inherit certain properties of that product - unless you override them) or can be completely custom, and not based on any existing product.

The API will return a link to the checkout that you can pass the user just like any standard checkout link, or pass to Paddle.js as the override parameter.

Price Overrides

Price overrides are passed as an array of strings specifying the override price with the currency, joined by a colon. For example:

"prices": [
	"USD:19.99",
	"EUR:15.99"
]

Using Pay Links to Split Funds

Funds from a transaction can be split with a list of other Paddle vendors by passing the parameter affiliates to the API containing an array of strings composed of a vendor_id and a commission amount for each recipient. See the example below for a better illustration. For example, to give a 25% to vendor 12345 and a 15% split to vendor 54321:

"affiliates": [
	"12345:0.25",
	"54321:0.15"
]

Request Body

Form data (application/x-www-form-urlencoded)
vendor_id
integer

The vendor ID identifies your seller account. This can be found in Developer Tools > Authentication.

required
pattern: \d+
minimum: 1
vendor_auth_code
string

The vendor auth code is a private API key for authenticating API requests. This key should never be used in client side code or shared publicly. This can be found in Developer Tools > Authentication.

required
pattern: [0-9a-f]+
product_id
integer

The Paddle Product ID/Plan ID that you want to base this custom checkout on. Required if not using custom products.

If no product_id is set, custom non-subscription product checkouts can be generated instead by specifying title, webhook_url and prices.

pattern: \d+
title
string

The name of the product/title of the checkout. Required if product_id is not set.

webhook_url
string

An endpoint that we will call with transaction information upon successful checkout, to allow you to fulfill the purchase.

Only valid if product_id is not set.

prices
array[string]

Price(s) of the checkout for a one-time purchase or initial payment of a subscription.

If product_id is set, you must also provide the price for the product’s default currency. If a given currency is enabled in the dashboard, it will default to a conversion of the product’s default currency price set in this field unless specified here as well.

recurring_prices
array[string]

Recurring price(s) of the checkout (excluding the initial payment) if the product_id specified is a subscription. To override the initial payment and all recurring payment amounts, both prices and recurring_prices must be set.

If product_id is set, you must also provide the price for the subscription’s default currency. If a given currency is enabled in the dashboard, it will default to a conversion of the subscription’s default currency price set in this field unless specified here as well.

trial_days
integer

For subscription plans only. The number of days before Paddle starts charging the customer the recurring price. If you leave this field empty, the trial days of the plan will be used.

custom_message
string

A short message displayed below the product name on the checkout.

maxLength: 255
coupon_code
string

A coupon to be applied to the checkout.

discountable
integer

Specifies if a coupon can be applied to the checkout.

Allowed Values: 0, 1
default: 1
image_url
string

A URL for the product image/icon displayed on the checkout.

return_url
string

A URL to redirect to once the checkout is completed. If the variable {checkout_hash} is included within the URL (e.g. http://mysite.com/thanks?checkout={checkout_hash}), the API will automatically populate the checkout ID in the redirected URL.

quantity_variable
integer

Specifies if the user is allowed to alter the quantity of the checkout.

Allowed Values: 0, 1
default: 1
quantity
integer

Pre-fills the quantity selector on the checkout.

minimum: 1
maximum: 100
expires
string

Specifies if the checkout link should expire. The generated checkout URL will be accessible until 23:59:59 (UTC) on the date specified (date in format YYYY-MM-DD).

format: date
pattern: \d{4}-\d{2}-\d{2}
affiliates
array[string]

Other Paddle vendor IDs whom you would like to split the funds from this checkout with.

recurring_affiliate_limit
integer

Limit the number of times other Paddle vendors will receive funds from the recurring payments. The initial checkout payment is included in the limit.

minimum: 1
marketing_consent
string

Whether you have gathered consent to market to the customer. This property is required if customer_email is set and you want to opt the customer into marketing.

customer_email
string

Pre-fills the customer email field on the checkout.

format: email
customer_country
string

Pre-fills the customer country field on the checkout. See Supported Countries for the list of supported ISO country codes.

pattern: [A-Z]{2}
customer_postcode
string

Pre-fills the customer postcode field on the checkout.

This field is required if the customer_country requires postcode. See the Supported Countries for countries requiring this field.

passthrough
string

A string of metadata you wish to store with the checkout. Will be sent alongside all webhooks associated with the order. See the Paddle Checkout (Web) documentation for more information.

vat_number
string

Pre-fills the sales tax identifier (VAT number) field on the checkout.

vat_company_name
string

Pre-fills the Company Name field on the checkout. Required if vat_number is set.

vat_street
string

Pre-fills the Street field on the checkout. Required if vat_number is set.

vat_city
string

Pre-fills the Town/City field on the checkout. Required if vat_number is set.

vat_state
string

Pre-fills the State field on the checkout.

vat_country
string

Pre-fills the Country field on the checkout. Required if vat_number is set. See Supported Countries for the list of supported ISO country codes.

pattern: [A-Z]{2}
vat_postcode
string

Pre-fills the Postcode field on the checkout.

This field is required if vat_number is set and the vat_country requires postcode. See the Supported Countries for countries requiring this field.

Responses

1 Example
Schema
object
or
object

An unsuccessful call to the Dashboard API will return a 200 response containing a field success set to false and an error object.

Send a Test Request

Send requests directly from the browser (CORS must be enabled)
$$.env
No $$.env variables are being used in this request.