Create payment template
A payment template allows you to save the payment information and create templates for regular payments.
Use case
Here we will create a payment template for outgoing SEPA payments with sample data.
Use case data
API parameters with values
The path parameter is the technical ID of the account to which the payment is being made.
Sample API call
To create the payment template, use the following endpoint:
Sample request
The sample request body is as follows:
{
"templateName": "Payment template",
"amount": {
"amount": 10,
"currencyCode": "EUR"
},
"paymentTemplateParties": [
{
"typeCode": "COUNTERPARTY",
"name": "Ben",
"surname": "Eficiary",
"personTypeCode": "P",
"accountNumber": {
"value": "EE212227575393349708",
"type": "IBAN"
},
"accountNumberCountryCode": "EE",
"financialInstitutionId": "PARXEE22XXX"
}
]
}
curl --location 'https://payment-api.sandbox.tuumplatform.com/api/v2/accounts/ID-1002/payment-templates' \
--header 'x-channel-code: SYSTEM' \
--header 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjQtMDItMTRUMTQ6NTc6NDQiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE3MDc5MjI2NjR9.ndC26HBHThoHB88W3q4bktkhUHjXXj4Wp0LJmGRUWwM' \
--header 'Content-Type: application/json' \
--data '{
"templateName": "Payment template",
"amount": {
"amount": 10,
"currencyCode": "EUR"
},
"paymentTemplateParties": [
{
"typeCode": "COUNTERPARTY",
"name": "Ben",
"surname": "Eficiary",
"personTypeCode": "P",
"accountNumber": {
"value": "EE212227575393349708",
"type": "IBAN"
},
"accountNumberCountryCode": "EE",
"financialInstitutionId": "PARXEE22XXX"
}
]
}'
Sample response
Below you will find the response to the sample request:
Response
{
"errors": null,
"validationErrors": null,
"data": {
"templateId": "ID-1002",
"templateName": "Payment template",
"paymentTypeCode": null,
"amount": {
"amount": 10.00,
"currencyCode": "EUR"
},
"details": null,
"referenceNumber": null,
"paymentTemplateParties": [
{
"paymentTemplatePartyId": "ID-1002",
"typeCode": "COUNTERPARTY",
"name": "Ben",
"givenName": null,
"surname": "Eficiary",
"personTypeCode": "P",
"accountNumber": {
"value": "EE212227575393349708",
"type": "IBAN"
},
"accountNumberCountryCode": "EE",
"financialInstitutionId": {
"value": "PARXEE22XXX",
"type": "BIC"
},
"address": null
}
]
}
}
Result
The payment template is created with a template ID.