For the complete documentation index, see llms.txt. This page is also available as Markdown.

Templating

Checkout templates pre-define the field visibility and layout for the customer data collection form on the hosted payment page. Once created, apply a template to a checkout session by passing its id in the checkout_template_id field when calling POST /v2/checkout.

Templates have a status of either ACTIVE or INACTIVE. Only ACTIVE templates can be applied to checkout sessions.

How It Works

1

Create a template

Call POST /v2/template/checkoutDetails with your desired field configuration. The response includes the assigned id — store this for use when creating checkouts.

2

Apply to a checkout

Pass the template id as checkout_template_id in the POST /v2/checkout request body. See Checkout Sessions.

3

Update or deactivate as needed

Use PATCH /v2/template/checkoutDetails/{id} to modify an existing template, or DELETE /v2/template/checkoutDetails/{id} to remove it.

API Reference

Create Template

Create Template

post
/v2/template/checkoutDetails
Authorizations
AuthorizationstringRequired

HTTP Basic authentication using entity credentials (username:password encoded in Base64).

Body
namestring · max: 255Required
entity_idstringOptional

Entity Id can be located on the organization level as Organization ID (Administration > Organizations > [Organization] > Organisation ID value)

billing_is_same_as_shippingbooleanOptional

Indicates whether billing address is same as shipping address or not.

Default: true
shipping_first_billing_secondbooleanOptional

Indicates the order of addresses in which the merchant wants to collect the information from the customer.

Default: false
Responses
post
/v2/template/checkoutDetails

List Templates

List Templates

get
/v2/template/checkoutDetails/
Authorizations
AuthorizationstringRequired

HTTP Basic authentication using entity credentials (username:password encoded in Base64).

Query parameters
searchstringOptional

Filter templates using RSQL syntax. Combine expressions with ; (AND) or , (OR).

Filterable fields:

FieldTypeOperators
namestring== != =in= =out= =regex= =contains=
created_atdate== != =in= =out= =gt= =ge= =lt= =le=
updated_atdate== != =in= =out= =gt= =ge= =lt= =le=
entity_idstring== != =in= =out= =regex=

Examples:

  • name==MyTemplate;entity_id==a6b45428-0296-4394-8ddd-0b50b5b20aa9
  • name==TemplateName
order_criteriastring · enumOptionalPossible values:
order_bystring · enumOptional

The ordering sequence of the selected templates If not selected then Descending order is the default order.

Possible values:
page_numbernumber · min: 1Optional

A filter query in RSQL format to retrieve templates based on page number. If not selected then a default pageNumber is 1.

page_sizenumberOptional

A filter query in RSQL format to retrieve templates based on page size. If not selected then a default pageSize is 50

Responses
get
/v2/template/checkoutDetails/

Get a templates by ID

Get a template by id

get
/v2/template/checkoutDetails/{id}
Authorizations
AuthorizationstringRequired

HTTP Basic authentication using entity credentials (username:password encoded in Base64).

Path parameters
idstringRequired

The id parameter in the GET API uniquely identifies a checkout template, allowing you to retrieve detailed information about a specific template by providing its associated identifier.

Responses
get
/v2/template/checkoutDetails/{id}

Update Template

Update Template

patch
/v2/template/checkoutDetails/{id}
Authorizations
AuthorizationstringRequired

HTTP Basic authentication using entity credentials (username:password encoded in Base64).

Path parameters
idstringRequired

The id parameter in the GET API uniquely identifies a checkout template, allowing you to retrieve detailed information about a specific template by providing its associated identifier.

Body
namestring · max: 255Required
entity_idstringOptional

Entity Id can be located on the organization level as Organization ID (Administration > Organizations > [Organization] > Organisation ID value)

billing_is_same_as_shippingbooleanOptional

Indicates whether billing address is same as shipping address or not.

Default: true
shipping_first_billing_secondbooleanOptional

Indicates the order of addresses in which the merchant wants to collect the information from the customer.

Default: false
Responses
patch
/v2/template/checkoutDetails/{id}

Delete a template by ID

Delete a template by id

delete
/v2/template/checkoutDetails/{id}
Authorizations
AuthorizationstringRequired

HTTP Basic authentication using entity credentials (username:password encoded in Base64).

Path parameters
idstringRequired

The id parameter in the GET API uniquely identifies a checkout template, allowing you to retrieve detailed information about a specific template by providing its associated identifier.

Responses
delete
/v2/template/checkoutDetails/{id}

No content

Count Templates

Count Templates

get
/v2/template/checkoutDetails/count
Authorizations
AuthorizationstringRequired

HTTP Basic authentication using entity credentials (username:password encoded in Base64).

Query parameters
searchstringRequired

Filter templates using RSQL syntax. Combine expressions with ; (AND) or , (OR).

Filterable fields:

FieldTypeOperators
namestring== != =in= =out= =regex= =contains=
created_atdate== != =in= =out= =gt= =ge= =lt= =le=
updated_atdate== != =in= =out= =gt= =ge= =lt= =le=
entity_idstring== != =in= =out= =regex=

Examples:

  • name==MyTemplate;entity_id==a6b45428-0296-4394-8ddd-0b50b5b20aa9
  • name==TemplateName
Responses
get
/v2/template/checkoutDetails/count

Last updated

Was this helpful?