You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 15/umbraco-commerce/how-to-guides/payment-links.md
+97Lines changed: 97 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,3 +4,100 @@ description: Learn how to send a payment links to customers in Umbraco Commerce.
4
4
5
5
# Sending Payment Links to Customers
6
6
7
+
A common scenario in ecommerce can be when a store owner wants to send a pre-filled cart to a customer for them to complete the purchase. This can be useful in many scenarios, for example, if a customer has requested a quote and the store owner wants to send a link to the customer to make payment.
8
+
9
+
In Umbraco Commerce, you can easily create a payment link and send it to the customer. The customer can then click on the link and complete the purchase.
10
+
11
+
{% hint style="info" %}
12
+
The payment links feature was introduced in Umbraco Commerce version 15.3.0
13
+
{% endhint %}
14
+
15
+
## Generating a Payment Link
16
+
17
+
1. In the Umbraco backoffice, go to the **Commerce** section, expand the associated store and click on the **Carts** menu item.
18
+
2. Click on the **Create Cart** button.
19
+
3. Populate the cart with the products you want to include in the payment link.
20
+
4. Click on the **Save** button to save the cart.
21
+
5. Click on the **Generate Payment Link** button to launch the payment link generator modal.
6. In the payment link generator modal, you can configure the payment link settings. You can set the following options:
26
+
27
+
-**Validity Period**: The period in minutes for which the payment link will be valid.
28
+
-**Landing Page URL**: The URL to which the customer will be directed when clicking on the payment link.
29
+
30
+

31
+
32
+
7. With the form filled out, you now have two options to send the payment link to the customer:
33
+
34
+
-[**Copy to Clipboard**](#copy-to-clipboard)
35
+
-[**Send via Email**](#send-via-email)
36
+
37
+
### Copy to Clipboard
38
+
39
+
Clicking on the **Copy to Clipboard** button will generate the payment link and then copy it to the clipboard. A notification will display to confirm the copy was successful. You can then paste the link into an email or other communication method.
40
+
41
+

42
+
43
+
### Send via Email
44
+
45
+
Clicking on the **Send via Email** button will launch the send email modal allowing the selection of the email template to use, along with the email address of the recipient.
Clicking on the **Send** button will send the email to the recipient with the payment link included.
52
+
53
+

54
+
55
+
{% hint style="info" %}
56
+
Umbraco Commerce includes a default email template for sending payment links. You can customize this template by going to the **Settings** section in the Umbraco backoffice and selecting the **Email Templates** menu item.
57
+
{% endhint %}
58
+
59
+
## Payment Link Usage
60
+
61
+
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.
62
+
63
+

64
+
65
+
The customer can then proceed to the checkout and complete the purchase as normal.
66
+
67
+
{% hint style="info" %}
68
+
The payment link cart will be held in session until the cart is completed or the session expires. Once completed, any previously open carts will be restored.
69
+
{% endhint %}
70
+
71
+
## Handling Expired Payment Links
72
+
73
+
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.
74
+
75
+
Developers should use this querystring parameter to display a message to the customer explaining that the payment link has expired.
76
+
77
+
## Headless Considerations
78
+
79
+
For standard Razor site implementations the handling of the payment links is done automatically, however for headless Storefront API implementations you will need to handle the payment links manually.
80
+
81
+
Developers should check for a `payment_link_token` querystring parameter when a customer lands on the site. If this parameter is present, the developer should use the [Storefront API](../reference/storefront-api) to retrieve the cart associated with the payment link token and load the cart into the session.
82
+
83
+
## Configuration Options
84
+
85
+
The payment links feature has a number of configuration options you can set via `appsettings.json`:
86
+
87
+
{% code title="appsettings.json" %}
88
+
```json
89
+
{
90
+
"Umbraco": {
91
+
"Commerce": {
92
+
"PaymentLinks": {
93
+
"TokenSigningSecret": "your_secret_here",
94
+
"TokenQueryParameterName": "payment_link_token",
95
+
"ErrorQueryParameterName": "payment_link_error",
96
+
}
97
+
}
98
+
}
99
+
}
100
+
```
101
+
{% endcode %}
102
+
103
+
By default Umbraco Commerce payment link tokens are based on the JWT format and are signed using the `TokenSigningSecret` value. The `TokenQueryParameterName` and `ErrorQueryParameterName` values are used to configure the querystring parameter names used for the payment link token and error messages respectively.
0 commit comments