Skip to main content

Pre-populate gift code via URL

Zuora

Pre-populate gift code via URL

The Gift Redemption form in Zephr supports automatic population of the gift code input field using a query parameter in the URL. This feature streamlines the user experience by reducing manual input, particularly helpful when sharing gift redemption links via email or other communication channels.

If the redemption page URL includes the giftCode query parameter, the gift code field will be pre-filled automatically when the page loads. This means the recipient only needs to click the Submit button to complete the redemption.

To enable this behavior, you must create a custom page that includes a Gift Redemption form and assign it a custom page URL, such as /redeem. The form will automatically recognize the giftCode parameter from the URL.

While /redeem is Zuora's recommended convention for gift redemption pages, the custom page path can be configured to any URL path that you prefer.

Example:

https://yourwebsite.com/redeem?giftCode=abcdabcdabcd

In this example, the gift code abcdabcdabcd will be automatically inserted into the input field on the /redeem page. The form submits the code to the endpoint:

POST /zephr/public/gifts/v1/redeem

This behavior is supported out-of-the-box, and no configuration is required in Zephr. You can implement this feature as part of your own emailing or campaign workflow by embedding the gift code directly in the redemption link.