Skip to main content
POST
Create Checkout Link
Trying to spin up a one-time checkout session? Checkout Links are likely not the right fit.Checkout Links are reusable URLs that produce a checkout session the moment they are opened. They work well when you want to kick off a purchase from a website or social post.When you need to launch a checkout for a user inside your own product, reach for the Checkout Sessions API instead.

Authorizations

Authorization
string
header
required

Authentication: You can generate a Personal Access Token from your settings.

Body

application/json

Schema to create a new checkout link from a a single product price.

Deprecated: Use CheckoutLinkCreateProducts instead.

payment_processor
string
required

Payment Processor: Payment processor to use. Currently only Stripe is supported.

Allowed value: "stripe"
product_price_id
string<uuid4>
required
metadata
Metadata · object

Metadata map for information your integration needs to retain.

The key must be a string with a maximum length of 40 characters. The value must be either:

  • A string with a maximum length of 500 characters
  • An integer
  • A floating-point number
  • A boolean

You can store up to 50 key-value pairs.

trial_interval
enum<string> | null

Unit used to measure the trial period.

Available options:
day,
week,
month,
year
trial_interval_count
integer | null

Length of the trial measured in the selected interval.

Required range: 1 <= x <= 1000
label
string | null

Label: Optional label to distinguish links internally.

allow_discount_codes
boolean
default:true

Indicates whether to allow the customer to apply discount codes. If you apply a discount through discount_id, it'll still be applied, but the customer won't be able to change it.

require_billing_address
boolean
default:false

Indicates whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting.

discount_id
string<uuid4> | null

Identifier of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored.

seats
integer | null

Seats: Seat quantity locked into this checkout link. Every linked product must support seat pricing and accept the specified quantity. Ruba ignores the value if a product's configuration no longer supports it when checkout begins.

Required range: 1 <= x <= 10000
success_url
string<uri> | null

Success Url: URL where the customer will be redirected after a successful payment.You can add the checkout_id={CHECKOUT_ID} query parameter to retrieve the checkout session id.

Required string length: 1 - 2083
return_url
string<uri> | null

If provided, a back button will be shown in the checkout to return to this URL.

Required string length: 1 - 2083

Response

Response: Checkout link created.

Checkout link data.

id
string<uuid4>
required

The stable identifier for this record.

created_at
string<date-time>
required

The time Ruba created this record.

modified_at
string<date-time> | null
required

The time this record last changed.

trial_interval
enum<string> | null
required

Unit used to measure the trial period.

Available options:
day,
week,
month,
year
trial_interval_count
integer | null
required

Length of the trial measured in the selected interval.

metadata
object
required
payment_processor
enum<string>
required

Payment Processor: Payment processor used.

Available options:
stripe
client_secret
string
required

Client Secret: Client secret used to access the checkout link.

success_url
string | null
required

Success Url: URL where the customer will be redirected after a successful payment.

return_url
string | null
required

If provided, a back button will be shown in the checkout to return to this URL.

label
string | null
required

Label: Optional label to distinguish links internally.

allow_discount_codes
boolean
required

Indicates whether to allow the customer to apply discount codes. If you apply a discount through discount_id, it'll still be applied, but the customer won't be able to change it.

require_billing_address
boolean
required

Indicates whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting.

discount_id
string<uuid4> | null
required

Identifier of the discount to apply to the checkout. If the discount is not applicable anymore when opening the checkout link, it'll be ignored.

seats
integer | null
required

Seats: Seat quantity locked into this checkout link. Every linked product must support seat pricing and accept the specified quantity. Ruba ignores the value if a product's configuration no longer supports it when checkout begins.

organization_id
string<uuid4>
required

Identifier of the organization.

Example:

"1dbfc517-0bbf-4301-9ba8-555ca42b9737"

products
CheckoutLinkProduct · object[]
required
discount
DiscountFixedOnceForeverDurationBase · object
required
url
string
required
read-only