Payment Service User-Defined Fields (UDFs)

Configure User-Defined Fields (UDFs) to map fields in the MtxChargeMethodExtension object in an incoming payment request to the fields in the message sent to the Payment Gateway Provider. A Payment Gateway Provider may add additional fields in a message structure to allow merchants to specify additional values. Some providers allow you to add new fields or replace existing ones.

Create a UDF using a map structure in the payment-service.yaml file. The key is the name of the field you are defining. The value is an object that specifies an MDC field name, the default value, and the value if the request was system-initiated.

For example:
payment:
  gateway:
    paymentGatewayProvider:
      configs:
        default:
          userDefinedFields: customField
            mdcFieldName: value
            defaultValue: value
            systemInitiatedValue: value

Where paymentGatewayProvider is the name of a Payment Gateway Provider (such as Braintree), customField is the name of the field defined in the gateway provider, and value is the property value.

For example:
payment:
  gateway:
    braintree:
      configs:
        default:
          userDefinedFields: customFieldOne
            mdcFieldName: SpecialNumber
            defaultValue: NotPresent        
            systemInitiatedValue: 12345

This example defines a new UDF, customFieldOne. The name of the field in the outgoing message is customFieldOne and the value is determined by the MtxChargeMethodExtension object using the name SpecialNumber. If the field does not exist, then the default value of NotPresent is used. If the MtxChargeMethodExtension does not exist and the payment request was initiated by MATRIXX Engine (not by an action of an end-user), then the value is set to 12345.

For more information, see the example about configuring UDFs for Braintree.