Create Default Custom Fields {#paybylink-default-fields-intro}
==============================================================

Use the information in this section to configure default custom fields for payment links.  
New default custom fields are only applied to payment links created after the field is added. They do not apply to existing payment links.

Endpoints
---------

**Production:** `POST ``https://api.cybersource.com``/ipl/v2/{referenceType}/merchantDefinedFields`  
**Test:** `POST ``https://apitest.cybersource.com``ipl/v2/{referenceType}/merchantDefinedFields`  
**India Production:** `POST ``https://api.in.cybersource.com``/ipl/v2/{referenceType}/merchantDefinedFields`

Required Fields for Creating Default Custom Fields {#paybylink-default-fields-req-fields}
=========================================================================================

[orderInformation.amountDetails.currency](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-currency.md "")
:

orderInformation.amountDetails.minAmount
:

[orderInformation.amountDetails.totalAmount](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-total-amount.md "")
:

[orderInformation.lineItems\[\].productName](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-line-items-product-name.md "")
:

[orderInformation.lineItems\[\].unitPrice](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-line-items-unit-price.md "")
:

processingInformation.linkType
:
Set to `DONATION`.

purchaseInformation.purchaseNumber
:
Set to a unique identifier for the customer-set price link.
{#paybylink-default-fields-req-fields_rest-customer-set-fields}

`REST` Example: Create Default Custom Fields {#paybylink-default-fields-ex-rest}
================================================================================

Request to Create Default Custom Dropdown Menu Field

```
{
  "fieldType": "Select",
  "label": "Delivery",
  "customerVisible": true,
  "readOnly": false,
  "merchantDefinedDataIndex": 1,
  "possibleValues": "Standard;Next Day"
}
```

Response to a Successful Create Default Custom Dropdown Menu Field

```
{
  "id": "5000000000000000693",
  "fieldType": "Select",
  "label": "Delivery",
  "customerVisible": true,
  "possibleValues": "Standard;Next Day",
  "merchantId": "pbldemo",
  "referenceType": "Invoice",
  "readOnly": false,
  "merchantDefinedDataIndex": 1
}
```

Request to Create Default Custom Text Field

```
{
  "fieldType": "Text",
  "label": "Order Reference",
  "customerVisible": true,
  "readOnly": false,
  "textMinLength": 1,
  "textMaxLength": 100,
  "textDefaultValue": "default text",
  "merchantDefinedDataIndex": 15
}
```

Response to a Successful Create Default Custom Text Field

```
{
  "id": 1515,
  "fieldType": "Text",
  "label": "Order Reference",
  "customerVisible": true,
  "readOnly": false,
  "textMinLength": 1,
  "textMaxLength": 100,
  "textDefaultValue": "default text",
  "merchantDefinedDataIndex": 15
}
```

