Why use custom fields?

If you sell in-app products, you might want to collect and receive additional information about your customers eg. playerId or serverName.

In order to do that, you should define custom fields that you require to be filled by the customer when buying the product.

Custom fields are defined on the project level in the Dashboard. They are required to be filled by customer when buying any product included in that project.

How to receive the data?

The data provided by the customer in custom fields for each product will be included in the webhook event payload under the customFields key.

Example event payload with custom fields

{
  "id": "6f97c060-570d-46e8-81af-033539210df3",
  "data": {
    "items": [
      {
        "id": "a0bf335d-25b9-4eda-bf92-f45f7bd2ed18",
        "name": "Legendary Sword",
        "quantity": "1",
        "internalId": null,
        "customFields": {
          "playerId": "123",
          "serverName": "US-1"
        }
      },
      {
        "id": "adb745b7-b23a-4960-ab21-7f21b7312840",
        "name": "Legendary Shield",
        "quantity": "1",
        "internalId": null,
        "customFields": {
          "playerId": "123",
          "serverName": "US-1"
        }
      }
    ]
    // ...
}