Skip to content

Commit 177ec10

Browse files
Added payment link docs
1 parent 60f9d1c commit 177ec10

File tree

10 files changed

+6328
-2281
lines changed

10 files changed

+6328
-2281
lines changed

15/umbraco-commerce/.gitbook/assets/storefront_swagger.json

Lines changed: 6226 additions & 2280 deletions
Large diffs are not rendered by default.
59.8 KB
Loading
94.8 KB
Loading
33.5 KB
Loading
120 KB
Loading
116 KB
Loading
123 KB
Loading
103 KB
Loading

15/umbraco-commerce/how-to-guides/payment-links.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,100 @@ description: Learn how to send a payment links to customers in Umbraco Commerce.
44

55
# Sending Payment Links to Customers
66

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.
22+
23+
![Generate Payment Link](images/payment-links/generate-payment-link-button.png)
24+
25+
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+
![Payment Link Generator](images/payment-links/generate-payment-link-modal.png)
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+
![Copy to Clipboard Notification](images/payment-links/payment-link-copied-to-clipboard.png)
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.
46+
47+
![Email Template Selection](images/payment-links/choose-payment-link-email-template.png)
48+
49+
![Recipient Configuration](images/payment-links/send-payment-link-email.png)
50+
51+
Clicking on the **Send** button will send the email to the recipient with the payment link included.
52+
53+
![Email Payment Link Example](images/payment-links/email.png)
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+
![Payment Link Populated Cart](images/payment-links/checkout.png)
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.

15/umbraco-commerce/reference/storefront-api/endpoints/order.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ The Order endpoints are where you will manage your carts/orders and perform cart
1010
[storefront_swagger.json](../../../.gitbook/assets/storefront_swagger.json)
1111
{% endswagger %}
1212

13+
{% swagger src="../../../.gitbook/assets/storefront_swagger.json" path="/umbraco/commerce/storefront/api/v1/order/{paymentLinkToken}" method="get" %}
14+
[storefront_swagger.json](../../../.gitbook/assets/storefront_swagger.json)
15+
{% endswagger %}
16+
1317
{% swagger src="../../../.gitbook/assets/storefront_swagger.json" path="/umbraco/commerce/storefront/api/v1/order/{orderId}" method="patch" %}
1418
[storefront_swagger.json](../../../.gitbook/assets/storefront_swagger.json)
1519
{% endswagger %}
@@ -56,4 +60,4 @@ The Order endpoints are where you will manage your carts/orders and perform cart
5660

5761
{% swagger src="../../../.gitbook/assets/storefront_swagger.json" path="/umbraco/commerce/storefront/api/v1/order/{orderId}/bundle/{bundleId}/item/{orderLineId}" method="delete" %}
5862
[storefront_swagger.json](../../../.gitbook/assets/storefront_swagger.json)
59-
{% endswagger %}
63+
{% endswagger %}

0 commit comments

Comments
 (0)