# Templating

Use templating to customize the customer details fields, as listed below, making them hidden, read only, optional or required. You can choose what customer details to capture in the checkout page. To use any active template, the template ID must be added to the checkout\_template\_id parameter, for the POST/v2/checkout call. This way you can manage customer details according to your business needs.\
Note: While creating the template, please check the mandatory fields for 3DS contract in the Customer API (Refer [here](https://verifone.cloud/api-catalog/customer-api)). The customer detail requirements are not the same for 3DS and non-3DS payments, and setting mandatory 3DS fields as optional might result in failed transactions.

## POST /v2/template/checkoutDetails

> Create Template

```json
{"openapi":"3.0.1","info":{"title":"Checkout API","version":"1.42.4"},"tags":[{"name":"Templating","description":"Manage checkout templates that pre-define the field visibility and layout for the customer data collection form. To apply a template, pass its ID in the `checkout_template_id` field when creating a checkout."}],"servers":[{"url":"https://emea.gsc.verifone.cloud/oidc/checkout-service","description":"EMEA"},{"url":"https://us.gsc.verifone.cloud/oidc/checkout-service","description":"Americas"},{"url":"https://nz.gsc.verifone.cloud/oidc/checkout-service","description":"New Zealand"},{"url":"https://cst.test-gsc.vfims.com/oidc/checkout-service","description":"Global Sandbox"},{"url":"https://uscst-gb.gsc.vficloud.net/oidc/checkout-service","description":"US Sandbox"}],"security":[{"BasicAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"HTTP Basic authentication using entity credentials (username:password encoded in Base64)."},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2.0 Bearer token obtained via the OIDC authentication endpoint."}},"schemas":{"CheckoutTemplate":{"title":"CreateTemplateRequest","required":["name"],"type":"object","properties":{"name":{"maxLength":255,"type":"string"},"entity_id":{"type":"string","description":"Entity Id can be located on the organization level as Organization ID (Administration > Organizations > [Organization] > Organisation ID value)"},"billing_is_same_as_shipping":{"type":"boolean","default":true,"description":"Indicates whether billing address is same as shipping address or not."},"shipping_first_billing_second":{"type":"boolean","default":false,"description":"Indicates the order of addresses in which the merchant wants to collect the information from the customer."},"field_settings":{"type":"object","properties":{"billing":{"$ref":"#/components/schemas/address_details"},"company_name":{"$ref":"#/components/schemas/template_field_mode"},"company_registration_number":{"$ref":"#/components/schemas/template_field_mode"},"email_address":{"$ref":"#/components/schemas/template_field_mode"},"entity_id":{"$ref":"#/components/schemas/template_field_mode"},"phone_number":{"$ref":"#/components/schemas/template_field_mode"},"shipping":{"$ref":"#/components/schemas/address_details"},"title":{"$ref":"#/components/schemas/template_field_mode"},"work_phone":{"$ref":"#/components/schemas/template_field_mode"},"tax":{"type":"object","properties":{"identifier":{"$ref":"#/components/schemas/template_field_mode"}}}}}}},"address_details":{"type":"object","properties":{"address_1":{"$ref":"#/components/schemas/template_field_mode"},"address_2":{"$ref":"#/components/schemas/template_field_mode"},"address_3":{"$ref":"#/components/schemas/template_field_mode"},"city":{"$ref":"#/components/schemas/template_field_mode"},"country_code":{"$ref":"#/components/schemas/template_field_mode"},"first_name":{"$ref":"#/components/schemas/template_field_mode"},"middle_name":{"$ref":"#/components/schemas/template_field_mode"},"last_name":{"$ref":"#/components/schemas/template_field_mode"},"phone":{"$ref":"#/components/schemas/template_field_mode"},"postal_code":{"$ref":"#/components/schemas/template_field_mode"},"state":{"$ref":"#/components/schemas/template_field_mode"}}},"template_field_mode":{"type":"object","properties":{"mode":{"type":"string","enum":["HIDDEN","READ_ONLY","OPTIONAL","REQUIRED"]}}},"ErrorResponse":{"type":"object","properties":{"code":{"type":"number","description":"A 3-digit code which uniquely identify an error."},"details":{"$ref":"#/components/schemas/details"},"message":{"maxLength":2048,"type":"string","description":"A description of the error."},"timestamp":{"type":"string","description":"Error timestamp","format":"date-time"}}},"details":{"type":"object"}}},"paths":{"/v2/template/checkoutDetails":{"post":{"tags":["Templating"],"summary":"Create Template","operationId":"postV2Template","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutTemplate"}}},"required":false},"responses":{"200":{"description":"Successful","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CheckoutTemplate"},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date"},"status":{"type":"string","description":"Indicates whether the template is active or not.","enum":["ACTIVE","INACTIVE"]}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## GET /v2/template/checkoutDetails/{id}

> Get a template by id

```json
{"openapi":"3.0.1","info":{"title":"Checkout API","version":"1.42.4"},"tags":[{"name":"Templating","description":"Manage checkout templates that pre-define the field visibility and layout for the customer data collection form. To apply a template, pass its ID in the `checkout_template_id` field when creating a checkout."}],"servers":[{"url":"https://emea.gsc.verifone.cloud/oidc/checkout-service","description":"EMEA"},{"url":"https://us.gsc.verifone.cloud/oidc/checkout-service","description":"Americas"},{"url":"https://nz.gsc.verifone.cloud/oidc/checkout-service","description":"New Zealand"},{"url":"https://cst.test-gsc.vfims.com/oidc/checkout-service","description":"Global Sandbox"},{"url":"https://uscst-gb.gsc.vficloud.net/oidc/checkout-service","description":"US Sandbox"}],"security":[{"BasicAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"HTTP Basic authentication using entity credentials (username:password encoded in Base64)."},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2.0 Bearer token obtained via the OIDC authentication endpoint."}},"schemas":{"CheckoutTemplate":{"title":"CreateTemplateRequest","required":["name"],"type":"object","properties":{"name":{"maxLength":255,"type":"string"},"entity_id":{"type":"string","description":"Entity Id can be located on the organization level as Organization ID (Administration > Organizations > [Organization] > Organisation ID value)"},"billing_is_same_as_shipping":{"type":"boolean","default":true,"description":"Indicates whether billing address is same as shipping address or not."},"shipping_first_billing_second":{"type":"boolean","default":false,"description":"Indicates the order of addresses in which the merchant wants to collect the information from the customer."},"field_settings":{"type":"object","properties":{"billing":{"$ref":"#/components/schemas/address_details"},"company_name":{"$ref":"#/components/schemas/template_field_mode"},"company_registration_number":{"$ref":"#/components/schemas/template_field_mode"},"email_address":{"$ref":"#/components/schemas/template_field_mode"},"entity_id":{"$ref":"#/components/schemas/template_field_mode"},"phone_number":{"$ref":"#/components/schemas/template_field_mode"},"shipping":{"$ref":"#/components/schemas/address_details"},"title":{"$ref":"#/components/schemas/template_field_mode"},"work_phone":{"$ref":"#/components/schemas/template_field_mode"},"tax":{"type":"object","properties":{"identifier":{"$ref":"#/components/schemas/template_field_mode"}}}}}}},"address_details":{"type":"object","properties":{"address_1":{"$ref":"#/components/schemas/template_field_mode"},"address_2":{"$ref":"#/components/schemas/template_field_mode"},"address_3":{"$ref":"#/components/schemas/template_field_mode"},"city":{"$ref":"#/components/schemas/template_field_mode"},"country_code":{"$ref":"#/components/schemas/template_field_mode"},"first_name":{"$ref":"#/components/schemas/template_field_mode"},"middle_name":{"$ref":"#/components/schemas/template_field_mode"},"last_name":{"$ref":"#/components/schemas/template_field_mode"},"phone":{"$ref":"#/components/schemas/template_field_mode"},"postal_code":{"$ref":"#/components/schemas/template_field_mode"},"state":{"$ref":"#/components/schemas/template_field_mode"}}},"template_field_mode":{"type":"object","properties":{"mode":{"type":"string","enum":["HIDDEN","READ_ONLY","OPTIONAL","REQUIRED"]}}},"ErrorResponse":{"type":"object","properties":{"code":{"type":"number","description":"A 3-digit code which uniquely identify an error."},"details":{"$ref":"#/components/schemas/details"},"message":{"maxLength":2048,"type":"string","description":"A description of the error."},"timestamp":{"type":"string","description":"Error timestamp","format":"date-time"}}},"details":{"type":"object"}}},"paths":{"/v2/template/checkoutDetails/{id}":{"get":{"tags":["Templating"],"summary":"Get a template by id","operationId":"getTemplateById","parameters":[{"name":"id","in":"path","description":"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.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CheckoutTemplate"},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date"},"status":{"type":"string","description":"Indicates whether the template is active or not.","enum":["ACTIVE","INACTIVE"]}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## DELETE /v2/template/checkoutDetails/{id}

> Delete a template by id

```json
{"openapi":"3.0.1","info":{"title":"Checkout API","version":"1.42.4"},"tags":[{"name":"Templating","description":"Manage checkout templates that pre-define the field visibility and layout for the customer data collection form. To apply a template, pass its ID in the `checkout_template_id` field when creating a checkout."}],"servers":[{"url":"https://emea.gsc.verifone.cloud/oidc/checkout-service","description":"EMEA"},{"url":"https://us.gsc.verifone.cloud/oidc/checkout-service","description":"Americas"},{"url":"https://nz.gsc.verifone.cloud/oidc/checkout-service","description":"New Zealand"},{"url":"https://cst.test-gsc.vfims.com/oidc/checkout-service","description":"Global Sandbox"},{"url":"https://uscst-gb.gsc.vficloud.net/oidc/checkout-service","description":"US Sandbox"}],"security":[{"BasicAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"HTTP Basic authentication using entity credentials (username:password encoded in Base64)."},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2.0 Bearer token obtained via the OIDC authentication endpoint."}},"schemas":{"ErrorResponse":{"type":"object","properties":{"code":{"type":"number","description":"A 3-digit code which uniquely identify an error."},"details":{"$ref":"#/components/schemas/details"},"message":{"maxLength":2048,"type":"string","description":"A description of the error."},"timestamp":{"type":"string","description":"Error timestamp","format":"date-time"}}},"details":{"type":"object"}}},"paths":{"/v2/template/checkoutDetails/{id}":{"delete":{"tags":["Templating"],"summary":"Delete a template by id","operationId":"deleteTemplateById","parameters":[{"name":"id","in":"path","description":"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.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Success. Template was successfully deleted."},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## PATCH /v2/template/checkoutDetails/{id}

> Update Template

```json
{"openapi":"3.0.1","info":{"title":"Checkout API","version":"1.42.4"},"tags":[{"name":"Templating","description":"Manage checkout templates that pre-define the field visibility and layout for the customer data collection form. To apply a template, pass its ID in the `checkout_template_id` field when creating a checkout."}],"servers":[{"url":"https://emea.gsc.verifone.cloud/oidc/checkout-service","description":"EMEA"},{"url":"https://us.gsc.verifone.cloud/oidc/checkout-service","description":"Americas"},{"url":"https://nz.gsc.verifone.cloud/oidc/checkout-service","description":"New Zealand"},{"url":"https://cst.test-gsc.vfims.com/oidc/checkout-service","description":"Global Sandbox"},{"url":"https://uscst-gb.gsc.vficloud.net/oidc/checkout-service","description":"US Sandbox"}],"security":[{"BasicAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"HTTP Basic authentication using entity credentials (username:password encoded in Base64)."},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2.0 Bearer token obtained via the OIDC authentication endpoint."}},"schemas":{"CheckoutTemplate":{"title":"CreateTemplateRequest","required":["name"],"type":"object","properties":{"name":{"maxLength":255,"type":"string"},"entity_id":{"type":"string","description":"Entity Id can be located on the organization level as Organization ID (Administration > Organizations > [Organization] > Organisation ID value)"},"billing_is_same_as_shipping":{"type":"boolean","default":true,"description":"Indicates whether billing address is same as shipping address or not."},"shipping_first_billing_second":{"type":"boolean","default":false,"description":"Indicates the order of addresses in which the merchant wants to collect the information from the customer."},"field_settings":{"type":"object","properties":{"billing":{"$ref":"#/components/schemas/address_details"},"company_name":{"$ref":"#/components/schemas/template_field_mode"},"company_registration_number":{"$ref":"#/components/schemas/template_field_mode"},"email_address":{"$ref":"#/components/schemas/template_field_mode"},"entity_id":{"$ref":"#/components/schemas/template_field_mode"},"phone_number":{"$ref":"#/components/schemas/template_field_mode"},"shipping":{"$ref":"#/components/schemas/address_details"},"title":{"$ref":"#/components/schemas/template_field_mode"},"work_phone":{"$ref":"#/components/schemas/template_field_mode"},"tax":{"type":"object","properties":{"identifier":{"$ref":"#/components/schemas/template_field_mode"}}}}}}},"address_details":{"type":"object","properties":{"address_1":{"$ref":"#/components/schemas/template_field_mode"},"address_2":{"$ref":"#/components/schemas/template_field_mode"},"address_3":{"$ref":"#/components/schemas/template_field_mode"},"city":{"$ref":"#/components/schemas/template_field_mode"},"country_code":{"$ref":"#/components/schemas/template_field_mode"},"first_name":{"$ref":"#/components/schemas/template_field_mode"},"middle_name":{"$ref":"#/components/schemas/template_field_mode"},"last_name":{"$ref":"#/components/schemas/template_field_mode"},"phone":{"$ref":"#/components/schemas/template_field_mode"},"postal_code":{"$ref":"#/components/schemas/template_field_mode"},"state":{"$ref":"#/components/schemas/template_field_mode"}}},"template_field_mode":{"type":"object","properties":{"mode":{"type":"string","enum":["HIDDEN","READ_ONLY","OPTIONAL","REQUIRED"]}}},"ErrorResponse":{"type":"object","properties":{"code":{"type":"number","description":"A 3-digit code which uniquely identify an error."},"details":{"$ref":"#/components/schemas/details"},"message":{"maxLength":2048,"type":"string","description":"A description of the error."},"timestamp":{"type":"string","description":"Error timestamp","format":"date-time"}}},"details":{"type":"object"}}},"paths":{"/v2/template/checkoutDetails/{id}":{"patch":{"tags":["Templating"],"summary":"Update Template","operationId":"patchV2Template","parameters":[{"name":"id","in":"path","description":"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.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutTemplate"}}},"required":false},"responses":{"200":{"description":"Successful","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CheckoutTemplate"},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date"},"status":{"type":"string","description":"Indicates whether the template is active or not.","enum":["ACTIVE","INACTIVE"]}}}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## GET /v2/template/checkoutDetails/

> List Templates

```json
{"openapi":"3.0.1","info":{"title":"Checkout API","version":"1.42.4"},"tags":[{"name":"Templating","description":"Manage checkout templates that pre-define the field visibility and layout for the customer data collection form. To apply a template, pass its ID in the `checkout_template_id` field when creating a checkout."}],"servers":[{"url":"https://emea.gsc.verifone.cloud/oidc/checkout-service","description":"EMEA"},{"url":"https://us.gsc.verifone.cloud/oidc/checkout-service","description":"Americas"},{"url":"https://nz.gsc.verifone.cloud/oidc/checkout-service","description":"New Zealand"},{"url":"https://cst.test-gsc.vfims.com/oidc/checkout-service","description":"Global Sandbox"},{"url":"https://uscst-gb.gsc.vficloud.net/oidc/checkout-service","description":"US Sandbox"}],"security":[{"BasicAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"HTTP Basic authentication using entity credentials (username:password encoded in Base64)."},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2.0 Bearer token obtained via the OIDC authentication endpoint."}},"schemas":{"TemplateList":{"type":"array","items":{"$ref":"#/components/schemas/CheckoutTemplate"}},"CheckoutTemplate":{"title":"CreateTemplateRequest","required":["name"],"type":"object","properties":{"name":{"maxLength":255,"type":"string"},"entity_id":{"type":"string","description":"Entity Id can be located on the organization level as Organization ID (Administration > Organizations > [Organization] > Organisation ID value)"},"billing_is_same_as_shipping":{"type":"boolean","default":true,"description":"Indicates whether billing address is same as shipping address or not."},"shipping_first_billing_second":{"type":"boolean","default":false,"description":"Indicates the order of addresses in which the merchant wants to collect the information from the customer."},"field_settings":{"type":"object","properties":{"billing":{"$ref":"#/components/schemas/address_details"},"company_name":{"$ref":"#/components/schemas/template_field_mode"},"company_registration_number":{"$ref":"#/components/schemas/template_field_mode"},"email_address":{"$ref":"#/components/schemas/template_field_mode"},"entity_id":{"$ref":"#/components/schemas/template_field_mode"},"phone_number":{"$ref":"#/components/schemas/template_field_mode"},"shipping":{"$ref":"#/components/schemas/address_details"},"title":{"$ref":"#/components/schemas/template_field_mode"},"work_phone":{"$ref":"#/components/schemas/template_field_mode"},"tax":{"type":"object","properties":{"identifier":{"$ref":"#/components/schemas/template_field_mode"}}}}}}},"address_details":{"type":"object","properties":{"address_1":{"$ref":"#/components/schemas/template_field_mode"},"address_2":{"$ref":"#/components/schemas/template_field_mode"},"address_3":{"$ref":"#/components/schemas/template_field_mode"},"city":{"$ref":"#/components/schemas/template_field_mode"},"country_code":{"$ref":"#/components/schemas/template_field_mode"},"first_name":{"$ref":"#/components/schemas/template_field_mode"},"middle_name":{"$ref":"#/components/schemas/template_field_mode"},"last_name":{"$ref":"#/components/schemas/template_field_mode"},"phone":{"$ref":"#/components/schemas/template_field_mode"},"postal_code":{"$ref":"#/components/schemas/template_field_mode"},"state":{"$ref":"#/components/schemas/template_field_mode"}}},"template_field_mode":{"type":"object","properties":{"mode":{"type":"string","enum":["HIDDEN","READ_ONLY","OPTIONAL","REQUIRED"]}}},"ErrorResponse":{"type":"object","properties":{"code":{"type":"number","description":"A 3-digit code which uniquely identify an error."},"details":{"$ref":"#/components/schemas/details"},"message":{"maxLength":2048,"type":"string","description":"A description of the error."},"timestamp":{"type":"string","description":"Error timestamp","format":"date-time"}}},"details":{"type":"object"}}},"paths":{"/v2/template/checkoutDetails/":{"get":{"tags":["Templating"],"summary":"List Templates","operationId":"listV2Template","parameters":[{"name":"search","in":"query","description":"Filter templates using RSQL syntax. Combine expressions with `;` (AND) or `,` (OR).\n\n**Filterable fields:**\n\n| Field | Type | Operators |\n|-------|------|-----------|\n| `name` | string | `==` `!=` `=in=` `=out=` `=regex=` `=contains=` |\n| `created_at` | date | `==` `!=` `=in=` `=out=` `=gt=` `=ge=` `=lt=` `=le=` |\n| `updated_at` | date | `==` `!=` `=in=` `=out=` `=gt=` `=ge=` `=lt=` `=le=` |\n| `entity_id` | string | `==` `!=` `=in=` `=out=` `=regex=` |\n\n**Examples:**\n- `name==MyTemplate;entity_id==a6b45428-0296-4394-8ddd-0b50b5b20aa9`\n- `name==TemplateName`","schema":{"type":"string"}},{"name":"order_criteria","in":"query","schema":{"type":"string","enum":["name","created_at","updated_at"]}},{"name":"order_by","in":"query","description":"The ordering sequence of the selected templates If not selected then Descending order is the default order.","schema":{"type":"string","enum":["ASC","DESC"]}},{"name":"page_number","in":"query","description":"A filter query in RSQL format to retrieve templates based on page number. If not selected then a default pageNumber is 1.","schema":{"minimum":1,"type":"number"}},{"name":"page_size","in":"query","description":"A filter query in RSQL format to retrieve templates based on page size. If not selected then a default pageSize is 50","schema":{"minimum":0,"type":"number"}}],"responses":{"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateList"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## GET /v2/template/checkoutDetails/count

> Count Templates

```json
{"openapi":"3.0.1","info":{"title":"Checkout API","version":"1.42.4"},"tags":[{"name":"Templating","description":"Manage checkout templates that pre-define the field visibility and layout for the customer data collection form. To apply a template, pass its ID in the `checkout_template_id` field when creating a checkout."}],"servers":[{"url":"https://emea.gsc.verifone.cloud/oidc/checkout-service","description":"EMEA"},{"url":"https://us.gsc.verifone.cloud/oidc/checkout-service","description":"Americas"},{"url":"https://nz.gsc.verifone.cloud/oidc/checkout-service","description":"New Zealand"},{"url":"https://cst.test-gsc.vfims.com/oidc/checkout-service","description":"Global Sandbox"},{"url":"https://uscst-gb.gsc.vficloud.net/oidc/checkout-service","description":"US Sandbox"}],"security":[{"BasicAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"HTTP Basic authentication using entity credentials (username:password encoded in Base64)."},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2.0 Bearer token obtained via the OIDC authentication endpoint."}},"schemas":{"TemplateCountResponse":{"type":"object","properties":{"count":{"type":"number","description":"Count"}}},"ErrorResponse":{"type":"object","properties":{"code":{"type":"number","description":"A 3-digit code which uniquely identify an error."},"details":{"$ref":"#/components/schemas/details"},"message":{"maxLength":2048,"type":"string","description":"A description of the error."},"timestamp":{"type":"string","description":"Error timestamp","format":"date-time"}}},"details":{"type":"object"}}},"paths":{"/v2/template/checkoutDetails/count":{"get":{"tags":["Templating"],"summary":"Count Templates","operationId":"getV2TemplateCount","parameters":[{"name":"search","in":"query","description":"Filter templates using RSQL syntax. Combine expressions with `;` (AND) or `,` (OR).\n\n**Filterable fields:**\n\n| Field | Type | Operators |\n|-------|------|-----------|\n| `name` | string | `==` `!=` `=in=` `=out=` `=regex=` `=contains=` |\n| `created_at` | date | `==` `!=` `=in=` `=out=` `=gt=` `=ge=` `=lt=` `=le=` |\n| `updated_at` | date | `==` `!=` `=in=` `=out=` `=gt=` `=ge=` `=lt=` `=le=` |\n| `entity_id` | string | `==` `!=` `=in=` `=out=` `=regex=` |\n\n**Examples:**\n- `name==MyTemplate;entity_id==a6b45428-0296-4394-8ddd-0b50b5b20aa9`\n- `name==TemplateName`","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateCountResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.verifone.com/api-reference/open-api-references/checkout/templating.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
