Payments2Us ManualsPayments2Us - Frequently Asked QuestionsCustom Fields - FAQHow to I pass values to Checkout Form custom fields using URL Parameters customField[1...10]Name / customField[1...10]Value?

How to I pass values to Checkout Form custom fields using URL Parameters customField[1...10]Name / customField[1...10]Value?

The Checkout Form allows you to populate custom field values using URL Parameters.

Before you can populate a custom field on the form, you first need to use Salesforce Object Manager to Add the field to the Payment Txn Object, then make it Publicly Visible and then you can use the Payment Form Builder to add the custom field to the Checkout Form.

The ability to pass in values to a custom field is ONLY available to custom fields that your organisations has added to the Payment Txn.  It cannot be used to update any of the Payments2Us Managed Package fields.

There is a possibility of 10 custom fields that can be populated.  The [1...10] represents Custom Field 1, Custom Field 2, Custom Field 3.... all the way through to Custom Field 10.

The customField[1..10]Name is used to pass in the api name of the custom field you wish to update.

The customField[1..10]Value is used to pass in the value for the field that you wish to update.

If you have a custom picklist field called with an API name of  make__c and a second custom field with an API name of model___c, you could use the URL Parameters below to pass in "Toyota" as the make and "Corolla" as the model.

..../AAkPay__checkoutM?customField1Name=make__c&customField1Value=Toyota&customField2Name=model__c&customField2Value=Corolla
Click to copy

If the field you are trying to update is a Date field type, the format of the value passed in must be in your local format.  See examples in the Apex Date Class Parse documentation.

If the field you are trying to update is a DateTime field type, the format of the value passed in must be in your local format.  See examples in the Apex DateTime Class Parse documentation.