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: docs/developers/modules/paynow.mdx
+87-1Lines changed: 87 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,58 @@ import { Callout } from 'nextra-theme-docs'
5
5
6
6
## Overview
7
7
8
+
The Pay Now module allows Lunar Client users to complete purchases directly within the game, providing a faster, more seamless checkout experience.
8
9
10
+
**Overlay Mode**
11
+
12
+
This mode displays the Pay Now checkout flow as an overlay on the Minecraft window, similar to opening an inventory. It provides the most seamless experience and is the preferred method. Overlay mode is only available on **Windows**.
13
+
14
+
**Window Mode**
15
+
16
+
As a fallback, and for **macOS** and **Linux** users, a separate window opens to display the Pay Now checkout flow. While not as seamless as overlay mode, this ensures compatibility across all operating systems.
17
+
18
+
## Usage Guidelines
19
+
20
+
To ensure a smooth user experience, servers must only open checkout windows from user-initiated actions. Examples include, but aren't limited to:
21
+
22
+
**Allowed (User-Initiated Actions):**
23
+
- Clicking a link in chat
24
+
- Running a command
25
+
- Clicking a button in a GUI
26
+
27
+
**Not Allowed (Automated/Intrusive Actions):**
28
+
- Triggering on login
29
+
- Automatically opening at set intervals (e.g., every 30 minutes)
30
+
- Automatically opening during flash sales, events, or other promotions without user interaction
31
+
32
+
This feature is designed to enhance the user experience by providing a seamless checkout process, misuse of this module, such as creating a disruptive or intrusive purchase flow, will result in restricted access in the future.
33
+
34
+
## Integration
35
+
36
+
The only piece of information sent from the server to the client to trigger a checkout window is the **PayNow checkout token**. This unique identifier represents an in-progress checkout.
37
+
38
+
If a player is not using Lunar Client, the same PayNow checkout can be used on the web at: `https://checkout.paynow.gg/?t=<token>`
39
+
40
+
**Example flow**
41
+
1. Create a checkout token using the PayNow API that includes the desired products in the basket.
42
+
2. If the player is using Lunar Client: Send an Apollo packet to open the checkout modal.
43
+
3. If the player is not using Lunar Client: Send a chat message with a PayNow payment link.
44
+
45
+
**PayNow API**
46
+
47
+
Checkout tokens are created via the [PayNow Checkout API](https://docs.paynow.gg/management/management-api/checkout). This API allows programmatic checkout creation and more.
0 commit comments