> For the complete documentation index, see [llms.txt](https://docs.velafi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.velafi.com/api-reference/beneficiary/get-payment-templates-metamessage.md).

# Get Payment Templates Metamessage

#### Get Payment Method Templates Metamessage

This API retrieves the template details for various payment methods metamessage on the provided payment method ID.

#### Endpoint Information

* **Request Header**: `X-BH-TOKEN: ******`
* **Request Method**: `GET`
* **Request Path**: `/v2/payments/templates/metamessage`
* **Authorization Required**: Yes

#### Query Parameters

* **paymentId**: (int) The ID of the payment method.

#### Response Structure

**Field metadata description:**

* **index:** (number) The sequential number identifying the field's position.
* **indexCode:** (string) A unique code or identifier for the field. <mark style="color:$danger;">If this field is not empty, then when adding the payment method, use this field for submission.</mark>
* **title:** (string) The display label or name of the field. <mark style="color:$danger;">When the indexCode is empty, use this field name when providing payment method information.</mark>
* **textType:** (enum) Numeric code indicating the type or format of the text input.
  * **1: number** — Numeric characters only (0–9).
  * **2: letter** — Alphabetic characters only (A–Z, a–z).
  * **3: alphanumeric** — Letters and numbers only.
  * **4: string** — Any free‑text string.
  * **5: image** — Image data or a reference to an image. This type of field needs to be uploaded through the `/v2/base/file/upload` interface, and the returned relative path should be submitted as a parameter. If you are submitting multiple photos, please separate them with commas.
  * **6: ISO 3166‑1** — Country code (e.g., US, CN, JP).
  * **7: ISO 3166‑2** — Subdivision code (e.g., US‑CA, CN‑BJ).
  * **8: international dialing code** — Country calling code (e.g., 1, 86).
  * **9: date (fixed format)** — Date in `yyyy‑MM‑dd` format (e.g., 2026‑01‑01).
  * **10: dropdown list** — The field is an enumerated value presented as a dropdown. The `extendInfo` field stores a JSON string that defines the options, e.g., `[{"code":"CURP","name":"Curp type"},{"code":"RFC","name":"Rfc type"}]`.
* **promptText:** (string) Placeholder or instructional text shown inside the input field.
* **minLimit:** (number) Minimum allowed value or length for the field input.
* **maxLimit:** (number) Maximum allowed value or length for the field input.
* **isOptional:** (boolean) Indicates whether the field is optional (true) or required (false).
* **isAccount:** (boolean) Specifies whether the field is used for account-related purposes.
* **extendInfo:** (string) Additional metadata or extended configuration data in string format.

The response will include the following fields:

```json
{
		"code": 200, // (number: response code)
		"msg": "SUCCESS",	// (string: message)
		"data": { // (object: template fields)
				"id": 120, // (number: payment ID)
				"paymentName": "Wire (CPN)", // (string: payment name)
				"paymentType": 5,	 // (string: payment type)
				"trench": "Circle Payment Network", //(string: trench)
				"fieldList": [{	//(list: List of original field information)
						"index": 1, 
						"indexCode": "beneficiaryName", 
						"textType": 4, 
						"title": "Beneficiary Name", 
						"promptText": "Please enter Beneficiary Name", 
						"minLimit": 1, 
						"maxLimit": 300,
						"isOptional": false,
						"isAccount": false, 
						"extendInfo": ""
					}, {
						"index": 2,
						"indexCode": "country",
						"textType": 6,
						"title": "Nationality",
						"promptText": "Please select Nationality",
						"minLimit": 1,
						"maxLimit": 300,
						"isOptional": false,
						"isAccount": false,
						"extendInfo": ""
					}, {
						"index": 3,
						"indexCode": "dateOfBirth",
						"textType": 9,
						"title": "Date of Birth / Date of Incorporation",
						"promptText": "Please enter Date of Birth / Date of Incorporation (yyyy-MM-dd)",
						"minLimit": 1,
						"maxLimit": 10,
						"isOptional": true,
						"isAccount": false,
						"extendInfo": ""
					}, {
						"index": 13,
						"indexCode": "useCase",
						"textType": 10,
						"title": "Use Case",
						"promptText": "Please select Use Case",
						"minLimit": 1,
						"maxLimit": 100,
						"isOptional": false,
						"isAccount": false,
						"extendInfo": "[{\"code\":\"B2B\",\"name\":\"B2B\"},{\"code\":\"B2C\",\"name\":\"B2C\"}]"
					}, {
						"index": 24,
						"indexCode": "accountNumber",
						"textType": 4,
						"title": "Account Number",
						"promptText": "Please enter Account Number",
						"minLimit": 1,
						"maxLimit": 34,
						"isOptional": false,
						"isAccount": true,
						"extendInfo": ""
					}]
		}
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.velafi.com/api-reference/beneficiary/get-payment-templates-metamessage.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
