Sending Payment Links to Customers
Learn how to send a payment link to customers in Umbraco Commerce.
Last updated
Was this helpful?
Learn how to send a payment link to customers in Umbraco Commerce.
Last updated
Was this helpful?
A common scenario in e-commerce is when a store owner wants to send a pre-filled cart to a customer for them to complete. This can be useful in many scenarios. It could be when customers request a quote, and the store owner wants to send a link to the customer to make the payment.
In Umbraco Commerce, it only takes a few clicks to create and send a payment link. The customer can then click the link and complete the purchase.
Go to the Commerce section in the Umbraco backoffice.
Expand the associated store and click on the Carts menu item.
Click on the Create Cart button.
Populate the cart with the products you want to include in the payment link.
Click on the Save button to save the cart.
Click on the Generate Payment Link button to launch the payment link generator modal.
Configure the payment link settings in the Payment Link Generator modal. You can set the following options:
Validity Period: The period in minutes for which the payment link will be valid.
Landing Page URL: The URL to which the customer will be directed when clicking on the payment link.
Use one of the two options to send the payment link to the customer:
Clicking on the Copy to Clipboard button generates the payment link and then copies it to the clipboard. A notification will display to confirm the copy was successful. You can paste the link into an email or other communication form.
Clicking on the Send via Email button launches the Send Email modal. From here, you can select an email template and set the recipient's email address.
Clicking the Send button will send the email to the recipient with the payment link.
When the customer receives the payment link, they can click on the link to open the cart in the store. The cart will be pre-filled with the products and quantities that were added when the payment link was generated.
The customer can proceed to the checkout and complete the purchase as normal.
If a customer tries to use an expired payment link, they will be redirected to the configured landing page URL along with a payment_link_error
querystring parameter. The value of this parameter will contain the reason for the error.
Developers should use this querystring parameter to display a message to the customer explaining that the payment link has expired.
The payment links handling is done automatically for standard Razor site implementations. You need to handle the payment links manually for headless Storefront API implementations.
The payment links feature has different configuration options you can set via appsettings.json
:
By default, Umbraco Commerce payment link tokens are based on the JSON Web Token (JWT) format and are signed using the TokenSigningSecret
value. The TokenQueryParameterName
value is used to configure the querystring parameter name used for the payment link token. The ErrorQueryParameterName
value is used to configure the querystring parameter name used for an error message.
Developers should check for a payment_link_token
querystring parameter when a customer lands on the site. If present, the developer should use the to retrieve the cart associated with the payment link token. This can then be loaded into the session for the customer to complete payment.