With your link, you can customise a couple of details to ensure that the flow is best suited to your needs

  1. Provide an existing wallet for the user on your app
  2. Create one-time purchase links

Provide an existing wallet

If your app already has a wallet for your users, you can provide the user's wallet address via a query parameter. The buyer will be taken directly to choose their payment method.

Remember to URI encode your query parameters!

const url = new URL(PAPER_CHECKOUT_LINK);

// Required
// Show your dApp's name on the wallet to clarify to
// the buyer this wallet is provided by your dApp. 
url.searchPrams.append('app_name', 'YOUR_APP_NAME_HERE');

// Required. 
// The buyer cannot change the wallet where their purchase will be delivered.
//
// The buyer will be able to native mint to this wallet by connecting 
// this same wallet address in the checkout flow. 
// They'll also be able to pay with crypto with another wallet.
url.searchParams.append('wallet', 'USER_WALLET_HERE');

// Optional
// If an email address is provided, Paper will automatically email them when their purchase is completed.
url.searchParams.append('username', 'USERNAME_HERE');

console.log(url.href); // The final url
Provide your user's walletProvide your user's wallet

Provide your user's wallet

Creating one-time purchase links

Refer to the API documentation for more info.

Who should use it?

If you're looking for granular control of who can make purchases from your checkout, consider creating unique links that each only allow one purchase. Your checkout won't be publicly accessible, and buyers without a One-Time Purchase link will be redirected to your landing page.

When creating a link, you can lock certain fields like walletAddress and email to ensure your purchase is made by the right buyer

Can the link be shared?

The link can be opened multiple times if the purchase is not completed. For instance, a buyer can start a purchase but decide to complete it from another device. If they shared this link with a friend, the friend would be able to complete the purchase on behalf of the original recipient.

But the link can only be used to make a purchase once. After the purchase is completed, the unique link redirects to the “Your purchase is completed!” page.

Why would I use this link?

By allowing you to gate purchases, you can support the following behaviors (some may require disabling native mints):

  • Use your own off-chain data for presale and allowlists
  • Ensure a buyer can only make a certain number of purchases

What's next

Hooray! You have a checkout ready to go! Tweet it, snap it, go share your checkout with the world!

We can now look into listening and triggering customer work whenever a purchase is made. Let's read into how we can extend the Paper checkout!