Skip to Content
Docs
Design profiles

Publish a design profile

POST/design_profiles/{design_profile_id}/publish

Publishes the draft as a new version. Sessions created from then on use it, and open sessions keep theirs. With no unpublished changes, it returns the profile as it is and adds no version. The draft needs a display_name, and its text needs at least 4.5:1 contrast, or the request returns 422 with display_name_required or low_contrast. In the Commerce tab, publishing asks the person to confirm it's you.

Headers

AuthorizationstringRequired
HTTP Basic auth: your API key as the password, with an empty username. See Authentication.
idempotency-keystring

A unique key, such as a UUID, that makes a POST safe to retry. Pay.com keeps each key for 24 hours, separately for each workspace. A retry with the same key, endpoint and body gets the first response. Another endpoint or body gets 400 idempotency_error, and a retry while the first is running gets 409.

Path parameters

design_profile_idstringRequired

The design profile's ID (dprof_).

Returns

The design profile.

idstring
resourcestring
namestring

For you. The Commerce tab lists profiles by name.

is_defaultboolean

Sessions and links that name no profile use it.

statusstring

draft until the first publish.

One of live, draft or archived.

live_versioninteger or null
liveobject or null

What buyers see, or null before the first publish.

Show 2 child attributesHide child attributes
Option 1object

What a design profile sets. Sessions and payment links can override flow, collection and express_methods.

Show 14 child attributesHide child attributes
display_namestring

The business name buyers see.

flowstring

one_page shows everything on one page. steps splits it into Details, Shipping (only when something ships and there's more than one rate) and Payment, with no review step. Details asks for the country when tax needs it, so the total is final before Payment, and billing details sit in Payment. Defaults to the design profile's flow (in the checkout builder: Layout, Flow).

One of one_page or steps.

layoutstring

One of two_panes, one_column or compact.

Default: two_panes

summary_positionstring

One of left, right or top.

Default: left

blocksobject
Show 2 child attributesHide child attributes
shippingboolean

Shows the shipping section when an order has items that ship.

Default: true

header_imageboolean

Default: false

header_image_urlstring or null

The image shown when blocks.header_image is on.

colorsobject

Brand colors as #RRGGBB, or null for Pay.com's default look in light and dark.

Show 3 child attributesHide child attributes
accentstring or null
backgroundstring or null
textstring or null
themestring

One of light, dark or system.

Default: system

fontstring

One of system, google_sans or serif.

Default: google_sans

corner_radiusstring

One of none, small, medium or large.

Default: medium

express_methodsobject

Where Apple Pay, Google Pay and the other express methods show. Both default to true.

Show 2 child attributesHide child attributes
express_rowobject
Show 1 child attributeHide child attributes
enabledboolean

Default: true

method_listobject
Show 1 child attributeHide child attributes
enabledboolean

Default: true

collectionobject

The details the checkout asks for. Pay.com adds any a payment method or tax needs, and lists them in collection.added.

Show 6 child attributesHide child attributes
nameobject
Show 1 child attributeHide child attributes
enabledboolean

Default: false

emailobject
Show 1 child attributeHide child attributes
enabledboolean

Default: true

phone_numberobject
Show 1 child attributeHide child attributes
enabledboolean

Default: false

billing_addressobject
Show 1 child attributeHide child attributes
levelstring

One of none, country, postal_code or full.

Default: country

shipping_addressobject

Asked for whenever an item ships, even if you leave this out. Use it to limit countries, or to ask for an address with no shippable items.

Show 2 child attributesHide child attributes
enabledboolean
allowed_countriesarray of strings
tax_idobject
Show 1 child attributeHide child attributes
enabledboolean

Default: false

submit_labelstring

The word on the button before the total, such as Pay.

One of pay, buy, book or donate.

Default: pay

custom_cssstring or null

Applies only once approved: publishing changed CSS that isn't approved returns 422 with custom_css_not_approved. See Submit custom CSS for review.

Option 2null
draftobject or null

Unpublished changes, or null when the draft equals the live version.

Show 2 child attributesHide child attributes
Option 1object

What a design profile sets. Sessions and payment links can override flow, collection and express_methods.

Show 14 child attributesHide child attributes
display_namestring

The business name buyers see.

flowstring

one_page shows everything on one page. steps splits it into Details, Shipping (only when something ships and there's more than one rate) and Payment, with no review step. Details asks for the country when tax needs it, so the total is final before Payment, and billing details sit in Payment. Defaults to the design profile's flow (in the checkout builder: Layout, Flow).

One of one_page or steps.

layoutstring

One of two_panes, one_column or compact.

Default: two_panes

summary_positionstring

One of left, right or top.

Default: left

blocksobject
Show 2 child attributesHide child attributes
shippingboolean

Shows the shipping section when an order has items that ship.

Default: true

header_imageboolean

Default: false

header_image_urlstring or null

The image shown when blocks.header_image is on.

colorsobject

Brand colors as #RRGGBB, or null for Pay.com's default look in light and dark.

Show 3 child attributesHide child attributes
accentstring or null
backgroundstring or null
textstring or null
themestring

One of light, dark or system.

Default: system

fontstring

One of system, google_sans or serif.

Default: google_sans

corner_radiusstring

One of none, small, medium or large.

Default: medium

express_methodsobject

Where Apple Pay, Google Pay and the other express methods show. Both default to true.

Show 2 child attributesHide child attributes
express_rowobject
Show 1 child attributeHide child attributes
enabledboolean

Default: true

method_listobject
Show 1 child attributeHide child attributes
enabledboolean

Default: true

collectionobject

The details the checkout asks for. Pay.com adds any a payment method or tax needs, and lists them in collection.added.

Show 6 child attributesHide child attributes
nameobject
Show 1 child attributeHide child attributes
enabledboolean

Default: false

emailobject
Show 1 child attributeHide child attributes
enabledboolean

Default: true

phone_numberobject
Show 1 child attributeHide child attributes
enabledboolean

Default: false

billing_addressobject
Show 1 child attributeHide child attributes
levelstring

One of none, country, postal_code or full.

Default: country

shipping_addressobject

Asked for whenever an item ships, even if you leave this out. Use it to limit countries, or to ask for an address with no shippable items.

Show 2 child attributesHide child attributes
enabledboolean
allowed_countriesarray of strings
tax_idobject
Show 1 child attributeHide child attributes
enabledboolean

Default: false

submit_labelstring

The word on the button before the total, such as Pay.

One of pay, buy, book or donate.

Default: pay

custom_cssstring or null

Applies only once approved: publishing changed CSS that isn't approved returns 422 with custom_css_not_approved. See Submit custom CSS for review.

Option 2null
Show 6 more attributesShow fewer attributes
draft_saved_atstring or null
custom_css_reviewobject
Show 2 child attributesHide child attributes
statusstring

One of none, in_review, approved or not_approved.

reasonsarray of strings

Why it wasn't approved.

metadataobject

Your key-value pairs. Up to 50 keys of 40 characters, with string values of up to 500 characters.

createdstring
updatedstring
test_modeboolean

Errors

400
The request is invalid.
401
The API key is missing or wrong.
403
The key's permissions don't allow this route.
404
No such object in this workspace and environment.
409
A request with this idempotency key is still running.
422
The request is valid but can't be done. Codes include: - amount_mismatch: amount doesn't equal the line items' total. - price_inactive, product_inactive: an item can't be sold. - currency_mismatch: the items or rates use different currencies. - no_shipping_rate: an item ships and no active rate covers the session's currency. - checkout_not_open: the session is completed or expired. - order_not_refundable: the order is fully refunded, or under a dispute. - amount_exceeds_refundable: more than what's left to refund. - quantity_exceeds_refundable: more of an item than was sold and not yet refunded. - order_not_shippable: shipped_at was sent for an order with nothing that ships. - shipping_rate_inactive: a rate in shipping_options is archived. - tax_exceeds_amount: inclusive tax figures are more than an item's amount. - refund_failed: the payment method refused the refund. Nothing was refunded. - custom_css_not_approved: the draft's changed custom CSS isn't approved yet. - default_profile: your default design profile can't be archived. - profile_not_published: the design profile has nothing published yet, so sessions and links can't use it and it can't be your default. - profile_archived: the design profile is archived, so new sessions and links can't use it and it can't be your default. - display_name_required: the draft to publish has no display_name. - low_contrast: white text on colors.accent, or colors.text on colors.background, is under 4.5:1. - number_in_use: the next number is one the series has already used. - tax_rate_required: a subscription sent with your own tax figures has a tax_breakdown entry without a percentage_decimal or a flat_amount, so it can't be applied to renewals. - seller_engine_conflict: the request names an external engine for a sale that can resolve to Pay.com as seller. - engine_not_allowed_for_seller: the engine can't run a subscription this seller sells. - processor_not_allowed_for_seller: Pay.com sells only on accounts it controls, and the processor isn't one of them. - engine_capability_missing: the engine or its connection can't do what the request needs. - connection_not_ready: the engine's connection isn't connected, or needs action. - product_refused: a product failed review for merchant of record, and you can't sell it yourself in this request. Subscription and seller refusals come at creation, never at renewal.
Was this page helpful?