Adding custom fields
Learn how to add custom fields to a low-code checkout
Last updated
Learn how to add custom fields to a low-code checkout
Last updated
If you’d like to collect additional customer information during a low-code checkout, you can add custom fields to the experience.
Digital River adds what these fields contain to the so that you can use it in downstream processes.
On Digital River Dashboard’s Prebuilt Checkout page, you can configure a maximum of two custom fields, each of which can accept a number, text (i.e., string), or a set of pre-defined drop-down options.
For each field, you need to:
Indicate whether it’s required or optional.
If you mark it as required, then express checkout is disabled in Prebuilt Checkout.
Define a unique key and make sure it contains no whitespaces.
Define a label that will be displayed to customers in the experience.
If you’re using the drop-down field, you must enumerate acceptable values and provide a display label for each.
Physical products in items[]
Digital only products in items[]
If you mark a field as required and customers don't provide a value, they are prompted for input.
Number-only fields provide help text if customers enter a non-digit character.
Number and text fields accept values with a maximum length of 500 characters.
If your application is set up correctly, this should block customers from proceeding to the checkout's next stage.
For details, refer to Controlling the checkout flow.
You can access this data by:
Assigning a callback to onCheckoutComplete
in Prebuilt Checkout's configuration object and then implementing a handler.
Assigning a callback to onSuccess
in the Component's configuration object and then implementing a handler.
Once you have this metadata
, you can use it to populate email notifications, fulfill an order’s goods, or perform other operations of your choice.
Depending on whether you add physical or digital-only products to the Digital River renders your custom fields in the shipping or billing information forms.
Labels aren't translated into the of the , but instead default to English.
The done()
function, which submits the data collected by the address component in an update request, returns false
if the user (1) fails to enter a value in a custom field that you marked as required or (2) enters a value that exceeds 500 characters in a custom number or text field.
You might want to disable the wallet component, if you mark a custom field as required in the Digital River Dashboard, When users click a button in this component, they are redirected to a payment provider. However, the form in the provider's interface lacks a field to collect your custom data, so it won't get added to the .
After customers successfully submit the form, Digital River adds the key and value of each field they completed to the metadata
.
Configuring a webhook to listen for certain types of , such as checkout_session.order.created
, order.accepted
, fulfillment.created
, order.fulfilled
, and order.refunded
.
Making a call to .