---
title: "Creating a payment request from a template."
method: POST
path: "/v1/payments/templates/{id}/initiate"
tags: ["PaymentTemplates"]
---

# Creating a payment request from a template.

`POST /v1/payments/templates/{id}/initiate`

## Request

- Base URL: `https://oas.finshark.io/api.finshark.io`
- URL: `https://oas.finshark.io/api.finshark.io/v1/payments/templates/{id}/initiate`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/finshark/apis/finshark-api/docs/v1/payments/templates/:id/initiate/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `id` string, required

## Request body

- PaymentRequestInit
  - `amount` PaymentRequestAmount
    - `currency` string, required
    - `value` number, double, required
  - `remittanceInformation` PaymentRequestRemittanceInformation
    - `value` string, required
    - `type` 'UNSTRUCTURED' | 'OCR', required
  - `debtor` PaymentDebtor, required
    - `account` PaymentAccount, required
      - `accountNumber` string, required
      - `accountType` 'IBAN' | 'BBAN' | 'BG' | 'PG', required
      - `bic` string, nullable
      - `currencyCode` string, nullable
    - `message` string, nullable
    - `name` string, nullable
  - `executionDate` integer, nullable

## Response `201`

The request has been fulfilled and a payment request is created.

- PaymentRequestModel
  - `id` string, uuid, required
  - `clientId` string, nullable
  - `ClientAccess` string, nullable
  - `status` string, nullable
  - `amount` PaymentRequestAmount, required
    - `currency` string, required
    - `value` number, double, required
  - `creditor` PaymentCreditor, required
    - `account` PaymentAccount, required
      - `accountNumber` string, required
      - `accountType` 'IBAN' | 'BBAN' | 'BG' | 'PG', required
      - `bic` string, nullable
      - `currencyCode` string, nullable
    - `message` string, nullable
    - `name` string, required
  - `debtor` PaymentDebtor
    - `account` PaymentAccount, required
      - `accountNumber` string, required
      - `accountType` 'IBAN' | 'BBAN' | 'BG' | 'PG', required
      - `bic` string, nullable
      - `currencyCode` string, nullable
    - `message` string, nullable
    - `name` string, nullable
  - `executionDate` integer, nullable
  - `remittanceInformation` PaymentRequestRemittanceInformation, required
    - `value` string, required
    - `type` 'UNSTRUCTURED' | 'OCR', required
  - `region` string, required
  - `paymentProductId` string, required
  - `paymentTemplateId` string, nullable

## Other responses

- `400`: Error caused by invalid or missing data.
- `401`: Authentication failed due to missing or invalid credentials.
- `403`: Error caused by end user (PSU) not permitted access to the resource.
- `404`: Endpoint does not exist or URL is not constructed correctly.
- `500`: Error caused by remote technical issues, this status code is used for unforeseen technical issues.
- `503`: Returned when service is unavailable due to scheduled reasons, such as maintenance.

---

[API](https://skmtc.dev/finshark/apis/finshark-api.md) - [All operations](https://skmtc.dev/finshark/apis/finshark-api/llms.txt) - [OpenAPI document](https://skmtc.dev/finshark/apis/finshark-api/revisions/7fc3b4f800ae?raw)
