Skip to content

Custom Fields

This page provides details on how to create, update, delete, and retrieve custom fields.

Create custom field

Request Method: POST

URL Endpoint: /api/customfield

NameTypeDefaultDescriptionRequiredRegex
namestringdisplay nametrue([0-9a-z -]{0-100})
typestringgroup name for referencing groups of custom fields([0-9a-z]{0-50})
group_namestringgroup name for referencing groups of custom fields([0-9a-z]{0-50})
requiredbooleanshould we require this fieldfalse
validation_typestringHow should we validate these values.(open - alpha - numeric - alphanumeric - sentence)
valuesarray({name:string, value: string})Values are an array of objects with keys of name and value

Get all custom fields

Retrieve all custom fields

Request Method: GET

URL Endpoint: /api/customfields

json
{
  "status": "success",
  "msg": "success",
  "total_count": 1,
  "data": [
    {
      "id": "d0cdss7svrv2303ovkfg",
      "name": "TESTCUSTOMFIELD",
      "group_name": "default",
      "type": "radio",
      "required": false,
      "validation_type": "open",
      "values": [
        {
          "name": "safely",
          "value": "safely"
        }
      ],
      "default": "",
      "created_at": "2025-05-05T15:51:13Z",
      "updated_at": "2025-05-05T15:51:13Z",
      "deleted_at": "0001-01-01T00:00:00Z"
    }
  ]
}

Get custom fields for merchant

Retrieve all custom fields pertaining to a particular merchant

Request Method: GET

URL Endpoint: /api/customfields/{merchantid}

json
{
  "status": "success",
  "msg": "success",
  "data": [
    {
      "id": "d0cdss7svrv2303ovkfg",
      "name": "TESTCUSTOMFIELD",
      "group_name": "default",
      "type": "radio",
      "required": false,
      "validation_type": "open",
      "values": [
        {
          "name": "safely",
          "value": "safely"
        },
        {
          "name": "growth",
          "value": "growth"
        }
      ],
      "default": "",
      "created_at": "2025-05-05T15:51:13Z",
      "updated_at": "2025-05-05T15:51:13Z",
      "deleted_at": "0001-01-01T00:00:00Z"
    }
  ],
  "total_count": 1
}

Get single custom field

Retrieve all custom fields pertaining to a particular merchant

Request Method: GET

URL Endpoint: /api/customfield/{customfield_id}

json
{
  "status": "success",
  "msg": "success",
  "data": {
    "id": "d0cdss7svrv2303ovkfg",
    "name": "TESTCUSTOMFIELD",
    "group_name": "default",
    "type": "radio",
    "required": false,
    "validation_type": "open",
    "values": [
      {
        "name": "safely",
        "value": "safely"
      },
      {
        "name": "growth",
        "value": "growth"
      }
    ],
    "default": "",
    "created_at": "2025-05-05T15:51:13Z",
    "updated_at": "2025-05-05T15:51:13Z",
    "deleted_at": "0001-01-01T00:00:00Z"
  }
}

Update custom field

Update a single custom field

Request Method: POST

URL Endpoint: /api/customfield/{customfield_id}

json
{
  "name": "TESTCUSTOMFIELD",
  "type": "text",
  "required": false,
  "group_name": "SimplePayments",
  "validation_type": "open",
  "values": null
}

Delete custom field

Delete a single custom field

Request Method: DELETE

URL Endpoint: /api/customfield/{customfield_id}

json
{
  "status": "success",
  "msg": "success"
}