Upsert a checkout form

Creates or updates (upserts) a checkout form with a specified identifier string.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

Resource identifier string.

Request Body schema: application/json
websiteId
required
string (WebsiteId) <= 50 characters

Unique website identifier string. A website is where an organization obtains a customer through a subscription. For more information, see Obtain an organization ID and website ID.

required
Array of Fixed quantity (object) or Variable quantity (object) non-empty

List of plans that are applied to a customer order by default. Plans describe how the customer must pay for products. For more information, see Plans.

Array (non-empty)
One of:
planId
required
string <= 50 characters

ID of the plan.

type
required
string

Type of plan. If this value is set to fixed, customers cannot choose the plan quantity. If this value is set to variable, customers can choose the plan quantity.

Value: "fixed"
quantity
required
integer >= 1

Quantity of the plan.

name
required
string

Name of the checkout form. This name value is for internal display, and is not visible to your customers. Use this name to locate and organize your checkout forms.

customDomain
string or null <= 255 characters

Custom domain for the checkout form.

Array of Fixed quantity (object) or Variable quantity (object)
Default: []

List of add-on plans that are displayed to the customer on the payment screen. Add-ons are plans that the customer has not already subscribed to.

The customer selects whether to add an add-on plan to their current order.

Array
One of:
planId
required
string <= 50 characters

ID of the plan.

type
required
string

Type of plan. If this value is set to fixed, customers cannot choose the plan quantity. If this value is set to variable, customers can choose the plan quantity.

Value: "fixed"
quantity
required
integer >= 1

Quantity of the plan.

Array of Fixed quantity (object) or Variable quantity (object)
Default: []

List of bump plans that are displayed to the customer on the payment screen. Use bump plans to offer purchase bonuses, discounts, and deals to the customer.

The customer selects whether to purchase bump plans, or to use the plans that are specified in their current order.

Array
One of:
planId
required
string <= 50 characters

ID of the plan.

type
required
string

Type of plan. If this value is set to fixed, customers cannot choose the plan quantity. If this value is set to variable, customers can choose the plan quantity.

Value: "fixed"
quantity
required
integer >= 1

Quantity of the plan.

accountsEnabled
boolean
Default: false

Specifies whether the account is enabled. If this value is true, the customer can sign-up and sign-in using the checkout form.

couponsEnabled
boolean
Default: false

Specifies whether coupons are enabled in the checkout form. If this value is true, the customer can use coupons in the checkout form. Use coupons to reward customers, generate sales, or to test new pricing strategies.

purchaseLimit
integer or null >= 0
Default: null

Limits the number of purchases that can be made using a specific checkout form. If a purchase limit value is set, each purchase decreases this value. When the purchases limit value reaches zero, the checkout form becomes inactive.

paymentMethods
Array of strings (PaymentMethod)

List of available payment methods. Payment methods must have at least one active gateway account. If not specified, all available payment methods are displayed.

Items Enum: "payment-card" "ach" "cash" "check" "paypal" "AdvCash" "Airpay" "Alfa-click" "Alipay" "AmazonPay" … 161 more
object

Visual customization options for the checkout form.

logoId
string <= 50 characters

Linked file object ID.

summary
string

Summary text.

buttonText
string
Default: "Pay {{amount}}"

Button text. Use the {{amount}} placeholder to display the checkout form total.

object

Primary color used in the checkout form and button text.

primary
string <= 6 characters
Default: "0044d4"

Primary color for the checkout form in hexadecimal format.

buttonText
string <= 6 characters
Default: "ffffff"

Button text color for the checkout form in hexadecimal format.

object

URLs that are displayed on the checkout form.

refundPolicy
string <url>

Website refund policy URL.

privacyPolicy
string <url>

Website privacy policy URL.

termsOfService
string <url>

Website terms of service URL.

object

Tracking system identifier strings.

googleAnalytics
string

Google Analytics tracking identifier string.

googleTagManager
string

Google Tag Manager tracking identifier string.

gtagJs
string

Google Analytics tracking identifier string. This value is used by Google Global Site Tag (gtag.js) service.

facebookPixel
string

Facebook Pixel tracking identifier string.

segmentAnalytics
string

Segment Analytics tracking identifier string.

heapIo
string

Heap.io tracking identifier string.

requiredAdditionalFields
Array of strings

List of required fields.

status
string
Default: "active"

Status of the checkout form. If the status value is inactive, the checkout form URL produces a 404 error.

Enum: "active" "inactive"
Responses
200

Checkout form updated.

Response Schema: application/json
websiteId
required
string (WebsiteId) <= 50 characters

Unique website identifier string. A website is where an organization obtains a customer through a subscription. For more information, see Obtain an organization ID and website ID.

required
Array of Fixed quantity (object) or Variable quantity (object) non-empty

List of plans that are applied to a customer order by default. Plans describe how the customer must pay for products. For more information, see Plans.

Array (non-empty)
One of:
planId
required
string <= 50 characters

ID of the plan.

type
required
string

Type of plan. If this value is set to fixed, customers cannot choose the plan quantity. If this value is set to variable, customers can choose the plan quantity.

Value: "fixed"
quantity
required
integer >= 1

Quantity of the plan.

name
required
string

Name of the checkout form. This name value is for internal display, and is not visible to your customers. Use this name to locate and organize your checkout forms.

id
string <= 50 characters

ID of the checkout form.

customDomain
string or null <= 255 characters

Custom domain for the checkout form.

Array of Fixed quantity (object) or Variable quantity (object)
Default: []

List of add-on plans that are displayed to the customer on the payment screen. Add-ons are plans that the customer has not already subscribed to.

The customer selects whether to add an add-on plan to their current order.

Array
One of:
planId
required
string <= 50 characters

ID of the plan.

type
required
string

Type of plan. If this value is set to fixed, customers cannot choose the plan quantity. If this value is set to variable, customers can choose the plan quantity.

Value: "fixed"
quantity
required
integer >= 1

Quantity of the plan.

Array of Fixed quantity (object) or Variable quantity (object)
Default: []

List of bump plans that are displayed to the customer on the payment screen. Use bump plans to offer purchase bonuses, discounts, and deals to the customer.

The customer selects whether to purchase bump plans, or to use the plans that are specified in their current order.

Array
One of:
planId
required
string <= 50 characters

ID of the plan.

type
required
string

Type of plan. If this value is set to fixed, customers cannot choose the plan quantity. If this value is set to variable, customers can choose the plan quantity.

Value: "fixed"
quantity
required
integer >= 1

Quantity of the plan.

accountsEnabled
boolean
Default: false

Specifies whether the account is enabled. If this value is true, the customer can sign-up and sign-in using the checkout form.

couponsEnabled
boolean
Default: false

Specifies whether coupons are enabled in the checkout form. If this value is true, the customer can use coupons in the checkout form. Use coupons to reward customers, generate sales, or to test new pricing strategies.

purchaseLimit
integer or null >= 0
Default: null

Limits the number of purchases that can be made using a specific checkout form. If a purchase limit value is set, each purchase decreases this value. When the purchases limit value reaches zero, the checkout form becomes inactive.

paymentMethods
Array of strings (PaymentMethod)

List of available payment methods. Payment methods must have at least one active gateway account. If not specified, all available payment methods are displayed.

Items Enum: "payment-card" "ach" "cash" "check" "paypal" "AdvCash" "Airpay" "Alfa-click" "Alipay" "AmazonPay" … 161 more
object

Visual customization options for the checkout form.

logoId
string <= 50 characters

Linked file object ID.

summary
string

Summary text.

buttonText
string
Default: "Pay {{amount}}"

Button text. Use the {{amount}} placeholder to display the checkout form total.

object

Primary color used in the checkout form and button text.

primary
string <= 6 characters
Default: "0044d4"

Primary color for the checkout form in hexadecimal format.

buttonText
string <= 6 characters
Default: "ffffff"

Button text color for the checkout form in hexadecimal format.

object

URLs that are displayed on the checkout form.

refundPolicy
string <url>

Website refund policy URL.

privacyPolicy
string <url>

Website privacy policy URL.

termsOfService
string <url>

Website terms of service URL.

object

Tracking system identifier strings.

googleAnalytics
string

Google Analytics tracking identifier string.

googleTagManager
string

Google Tag Manager tracking identifier string.

gtagJs
string

Google Analytics tracking identifier string. This value is used by Google Global Site Tag (gtag.js) service.

facebookPixel
string

Facebook Pixel tracking identifier string.

segmentAnalytics
string

Segment Analytics tracking identifier string.

heapIo
string

Heap.io tracking identifier string.

requiredAdditionalFields
Array of strings

List of required fields.

createdTime
string <date-time> (CreatedTime)

Date and time which is set automatically when the resource is created.

updatedTime
string <date-time> (UpdatedTime)

Date and time which updates automatically when the resource is updated.

status
string
Default: "active"

Status of the checkout form. If the status value is inactive, the checkout form URL produces a 404 error.

Enum: "active" "inactive"
Array of Self (object) or PreviewLink (object) non-empty

Related resource links.

Array (non-empty)
Any of:
href
required
string

Link URL.

rel
required
string

Type of link.

Value: "self"
201

Checkout form created.

Response Headers
Location
string <uri>

Location of the related resource.

Example: "https://api.rebilly.com/example"
Response Schema: application/json
websiteId
required
string (WebsiteId) <= 50 characters

Unique website identifier string. A website is where an organization obtains a customer through a subscription. For more information, see Obtain an organization ID and website ID.

required
Array of Fixed quantity (object) or Variable quantity (object) non-empty

List of plans that are applied to a customer order by default. Plans describe how the customer must pay for products. For more information, see Plans.

Array (non-empty)
One of:
planId
required
string <= 50 characters

ID of the plan.

type
required
string

Type of plan. If this value is set to fixed, customers cannot choose the plan quantity. If this value is set to variable, customers can choose the plan quantity.

Value: "fixed"
quantity
required
integer >= 1

Quantity of the plan.

name
required
string

Name of the checkout form. This name value is for internal display, and is not visible to your customers. Use this name to locate and organize your checkout forms.

id
string <= 50 characters

ID of the checkout form.

customDomain
string or null <= 255 characters

Custom domain for the checkout form.

Array of Fixed quantity (object) or Variable quantity (object)
Default: []

List of add-on plans that are displayed to the customer on the payment screen. Add-ons are plans that the customer has not already subscribed to.

The customer selects whether to add an add-on plan to their current order.

Array
One of:
planId
required
string <= 50 characters

ID of the plan.

type
required
string

Type of plan. If this value is set to fixed, customers cannot choose the plan quantity. If this value is set to variable, customers can choose the plan quantity.

Value: "fixed"
quantity
required
integer >= 1

Quantity of the plan.

Array of Fixed quantity (object) or Variable quantity (object)
Default: []

List of bump plans that are displayed to the customer on the payment screen. Use bump plans to offer purchase bonuses, discounts, and deals to the customer.

The customer selects whether to purchase bump plans, or to use the plans that are specified in their current order.

Array
One of:
planId
required
string <= 50 characters

ID of the plan.

type
required
string

Type of plan. If this value is set to fixed, customers cannot choose the plan quantity. If this value is set to variable, customers can choose the plan quantity.

Value: "fixed"
quantity
required
integer >= 1

Quantity of the plan.

accountsEnabled
boolean
Default: false

Specifies whether the account is enabled. If this value is true, the customer can sign-up and sign-in using the checkout form.

couponsEnabled
boolean
Default: false

Specifies whether coupons are enabled in the checkout form. If this value is true, the customer can use coupons in the checkout form. Use coupons to reward customers, generate sales, or to test new pricing strategies.

purchaseLimit
integer or null >= 0
Default: null

Limits the number of purchases that can be made using a specific checkout form. If a purchase limit value is set, each purchase decreases this value. When the purchases limit value reaches zero, the checkout form becomes inactive.

paymentMethods
Array of strings (PaymentMethod)

List of available payment methods. Payment methods must have at least one active gateway account. If not specified, all available payment methods are displayed.

Items Enum: "payment-card" "ach" "cash" "check" "paypal" "AdvCash" "Airpay" "Alfa-click" "Alipay" "AmazonPay" … 161 more
object

Visual customization options for the checkout form.

logoId
string <= 50 characters

Linked file object ID.

summary
string

Summary text.

buttonText
string
Default: "Pay {{amount}}"

Button text. Use the {{amount}} placeholder to display the checkout form total.

object

Primary color used in the checkout form and button text.

primary
string <= 6 characters
Default: "0044d4"

Primary color for the checkout form in hexadecimal format.

buttonText
string <= 6 characters
Default: "ffffff"

Button text color for the checkout form in hexadecimal format.

object

URLs that are displayed on the checkout form.

refundPolicy
string <url>

Website refund policy URL.

privacyPolicy
string <url>

Website privacy policy URL.

termsOfService
string <url>

Website terms of service URL.

object

Tracking system identifier strings.

googleAnalytics
string

Google Analytics tracking identifier string.

googleTagManager
string

Google Tag Manager tracking identifier string.

gtagJs
string

Google Analytics tracking identifier string. This value is used by Google Global Site Tag (gtag.js) service.

facebookPixel
string

Facebook Pixel tracking identifier string.

segmentAnalytics
string

Segment Analytics tracking identifier string.

heapIo
string

Heap.io tracking identifier string.

requiredAdditionalFields
Array of strings

List of required fields.

createdTime
string <date-time> (CreatedTime)

Date and time which is set automatically when the resource is created.

updatedTime
string <date-time> (UpdatedTime)

Date and time which updates automatically when the resource is updated.

status
string
Default: "active"

Status of the checkout form. If the status value is inactive, the checkout form URL produces a 404 error.

Enum: "active" "inactive"
Array of Self (object) or PreviewLink (object) non-empty

Related resource links.

Array (non-empty)
Any of:
href
required
string

Link URL.

rel
required
string

Type of link.

Value: "self"
401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

404

Resource not found.

422

Invalid data sent.

put/checkout-forms/{id}
Request samples
application/json
{
  • "websiteId": "example.com",
  • "customDomain": "string",
  • "plans": [
    ],
  • "addonPlans": [ ],
  • "bumpPlans": [ ],
  • "accountsEnabled": false,
  • "couponsEnabled": false,
  • "purchaseLimit": null,
  • "paymentMethods": [
    ],
  • "customization": {
    },
  • "name": "string",
  • "status": "active"
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "websiteId": "example.com",
  • "customDomain": "string",
  • "plans": [
    ],
  • "addonPlans": [ ],
  • "bumpPlans": [ ],
  • "accountsEnabled": false,
  • "couponsEnabled": false,
  • "purchaseLimit": null,
  • "paymentMethods": [
    ],
  • "customization": {
    },
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "status": "active",
  • "_links": [
    ]
}