Creating Payout Selection Templates

This guide outlines the process of creating and using payout selection templates to enhance the flexibility of your order creation workflow. By defining payout types in templates, you can easily reuse them across multiple orders, streamlining the payout selection experience for your users.

Using Payout Templates

1. Creating Payout Type Templates

Visit Payout Selection to create payout type templates. These templates allow you to predefine payout options that can be applied to orders during the creation process.

2. Template ID

Upon creating a Payout Type Template, you will be assigned a unique template ID. This ID is essential for associating your predefined payout types with specific products on the Runa API.

3. Integrating Payout Type Template into API requests

The products section in the Create Order API accepts TEMPLATE type on the payload.

Use the template ID you have obtained from the previous step in the template_id field while making your order when you specify TEMPLATE type.

Example API Request

{
  "payment_method": {
    "type": "ACCOUNT_BALANCE",
    "currency": "GBP"
  },
  "items": [
    {
      "face_value": 10,
      "products": {
        "type": "TEMPLATE",
        "template_id": "YOUR_TEMPLATE_ID"
      },
      "distribution_method": {
        "type": "PAYOUT_LINK"
      }
    }
  ]
}

Replace YOUR_TEMPLATE_ID with your payout selection template ID you have created earlier.

You will be able to retrieve the template_id used on an order on Get Order Details endpoint. The payout options that were used are listed in the values field.

4. Minimum payout value

In order for the payout link to contain all the selected payout options, you will need to meet a minimum face value requirement during ordering. Although it is not strict requirement, it ensures that any of the payout options can be redeemed and also reduces validation problems you might face at the time of ordering.

Payout templates will show the minimum value as depicted in the screenshot below.

Limitations

We currently support a maximum of 10 unique payout selection templates usage per order. Please talk to your Account Managers if you need support with this.