| Requires the role: | Merchant |
| POST | /customfields | Creates a new custom field that can be either 'pending' or 'active'. |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Name | model | string | Yes | The name of the custom field. Cannot exceed 50 characters. Should be unique. |
| IsNumeric | model | bool? | Yes | Indicates the IsNumeric value for the field. |
| ActivationStatus | model | ActivationStatus? | Yes | Indicates the initial activation status value for the field.Allowable Values
|
| DecimalPlaces | model | int? | No | Indicates the number of decimal places for the field (used with numeric fields). |
| RegularExpression | model | string | No | Indicates the regular expression value for the field. |
| IsRequired | model | bool? | No | Indicates if the field is required. |
| Description | model | string | No | Indicates the description value for the field. Cannot exceed 50 characters. |
| ErrorMessage | model | string | No | Indicates the error message value for the field. Cannot exceed 50 characters. |
| MinValue | model | double? | No | Indicates the minimum numeric value for the field (used with numeric fields). |
| MaxValue | model | double? | No | Indicates the minimum numeric value for the field (used with numeric fields). |
| MaxLength | model | int? | No | Indicates the maximum text length value for the field (used with non-numeric fields). |
| Position | model | int? | No | Indicates the position value for the field. |
| DisplayOnVTReceipt | model | bool? | No | Indicates if the field should be displayed on virtual terminal receipt. |
| DisplayOnReports | model | bool? | No | Indicates if the field should be displayed on reports. |
| DisplayOnHpp | model | bool? | No | Indicates if the field should be displayed on the hosted payments page. |
| ReadOnlyOnHpp | model | bool? | No | Indicates if the field should not be editable on the hosted payments page. |
| VisibleOnHpp | model | bool? | No | Indicates if the field should be visible on the hosted payments page. |
| Pending | |
| Active | |
| Inactive | |
| Deleted |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Key | model | int | No | The unique identifier of the custom field. |
| Name | model | string | No | The name of the custom field. Cannot exceed 50 characters. Should be unique. |
| MerchantKey | model | int | No | The key of the merchant that has this custom field. |
| IsNumeric | model | bool | No | Indicates if the field is numeric. |
| DecimalPlaces | model | int? | No | Indicates the number of decimal places. |
| RegularExpression | model | string | No | A validation expression. |
| IsRequired | model | bool? | No | Indicates if the field should be required input. |
| ActivationStatus | model | ActivationStatus | No | Indicates the activation status of the field.Allowable Values
|
| Description | model | string | No | The description of the field. |
| ErrorMessage | model | string | No | Indicates the validation error message of the field. |
| MinValue | model | double? | No | Indicates the minimum numeric value of the field. |
| MaxValue | model | double? | No | Indicates the maximum numeric value of the field. |
| MaxLength | model | int? | No | Indicates the maximum character length of the field. |
| Position | model | int | No | Indicates the position the field, relative to other custom fields being displayed. |
| DisplayOnVTReceipt | model | bool? | No | Indicates if the field is displayed on VT receipts. |
| DisplayOnReports | model | bool? | No | Indicates if the field is displayed on reports. |
| DisplayOnHpp | model | bool? | No | Indicates if the field is displayed on the HPP. |
| ReadOnlyOnHpp | model | bool? | No | Indicates if the field is read-only on the HPP. |
| VisibleOnHpp | model | bool? | No | Indicates if the field is visible on the HPP. |
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /customfields HTTP/1.1
Host: syntch.simpay.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<PostCustomField xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Gateway.RestApi.CustomFields.Requests">
<ActivationStatus>Pending</ActivationStatus>
<DecimalPlaces>0</DecimalPlaces>
<Description>String</Description>
<DisplayOnHpp>false</DisplayOnHpp>
<DisplayOnReports>false</DisplayOnReports>
<DisplayOnVTReceipt>false</DisplayOnVTReceipt>
<ErrorMessage>String</ErrorMessage>
<IsNumeric>false</IsNumeric>
<IsRequired>false</IsRequired>
<MaxLength>0</MaxLength>
<MaxValue>0</MaxValue>
<MinValue>0</MinValue>
<Name>String</Name>
<Position>0</Position>
<ReadOnlyOnHpp>false</ReadOnlyOnHpp>
<RegularExpression>String</RegularExpression>
<VisibleOnHpp>false</VisibleOnHpp>
</PostCustomField>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CustomFieldResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Gateway.RestApi.CustomFields.Responses"> <ActivationStatus>Pending</ActivationStatus> <DecimalPlaces>0</DecimalPlaces> <Description>String</Description> <DisplayOnHpp>false</DisplayOnHpp> <DisplayOnReports>false</DisplayOnReports> <DisplayOnVTReceipt>false</DisplayOnVTReceipt> <ErrorMessage>String</ErrorMessage> <IsNumeric>false</IsNumeric> <IsRequired>false</IsRequired> <Key>0</Key> <MaxLength>0</MaxLength> <MaxValue>0</MaxValue> <MerchantKey>0</MerchantKey> <MinValue>0</MinValue> <Name>String</Name> <Position>0</Position> <ReadOnlyOnHpp>false</ReadOnlyOnHpp> <RegularExpression>String</RegularExpression> <VisibleOnHpp>false</VisibleOnHpp> </CustomFieldResponse>