Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Update docs to reflect docs-v2 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Mukherjee committed Dec 15, 2023
1 parent 8bc3696 commit 511d8f9
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 46 deletions.
36 changes: 17 additions & 19 deletions docs/onboarding/22 NFT Checkouts/0 Overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@ title: Overview
Checkouts delivers the easiest NFT payments experience for you and your buyers. Sell NFTs on any one of our supported EVM chains and allow your users to pay with
any supported payment option. You and your buyers can expect instant payouts and instant NFT processing - all done through your smart contract.

![Checkouts overview](./assets/checkouts-overview.svg)
![Checkouts overview](./assets/checkouts-overview.png)

### Payment options for buyers

- **Fiat**

- Credit and debit cards
- Apple Pay, Google Pay
- iDEAL

- **Crypto**
- ETH
| Payment Type | Supported Options |
| :----------- | :------------------------------------------ |
| Fiat | Credit & Debit Cards, Apple Pay, Google Pay |
| Crypto | ETH |

Card and other fiat payments are accepted from all 50 US states and most countries.

Expand All @@ -33,16 +29,18 @@ Card and other fiat payments are accepted from all 50 US states and most countri
| Polygon | MATIC, USDC\*, USDC.e\*, WETH\* |
| Zora | ETH |

| Blockchain (Testnet) | Supported Currencies |
| :------------------- | :------------------------------ |
| Arbitrum Sepolia | ETH |
| Avalanche Fuji | AVAX |
| Base Goerli | ETH |
| Goerli | ETH, USDC |
| Mumbai | MATIC, USDC |
| Optimism Goerli | ETH |
| Sepolia | ETH |
| Zora Testnet | ETH |
###

| Blockchain (Testnet) | Supported Currencies |
| :------------------- | :------------------- |
| Arbitrum Sepolia | ETH |
| Avalanche Fuji | AVAX |
| Base Goerli | ETH |
| Goerli | ETH, USDC |
| Mumbai | MATIC, USDC |
| Optimism Goerli | ETH |
| Sepolia | ETH |
| Zora Testnet | ETH |

\* - ERC-20 tokens are available for pro or enterprise customers only.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Before you start, ensure your contract is set up properly for Checkouts.
### Dashboard

1. Navigate into your contract from the [Contracts > Deploy dashboard page](https://thirdweb.com/dashboard/contracts/deploy).
2. Navigate to the "Payments" page from the sidebar.
2. Navigate to the "Payments" page from the sidebar.
3. Click the "Enable Payments" button
![Enable payments for contract](./assets/enable-contract/enable-payments-for-contract.jpg)
![Enable payments for contract](./assets/enable-contract/enable-payments-for-contract.jpg)

### API

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Checkout Embedded Elements are modular components that can be embedded directly

### Accepting fiat payment options (credit/debit card, Apple Pay, Google Pay)

Embed CheckoutWithCard in your app.
Embed [CheckoutWithCard](/checkouts/checkout-with-card) in your app.

### Accepting crypto payment options (ETH)

Embed CheckoutWithEth in your app. (TODO: Currently not available on thirdweb)
Embed [CheckoutWithEth](/checkouts/checkout-with-eth) in your app.
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ Configure webhook URLs to have thirdweb notify your backend when successful or f

The following webhook events are supported.

| Event | Description |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `transfer:succeeded` | The NFT has been delivered to the buyer's wallet. |
| `transfer:failed` | The NFT was unable to be delivered after multiple retries. A refund will automatically be processed. |
| `payment:succeeded` | A buyer's payment has been successfully completed. |
| `payment:failed` | A buyer's payment attempt has been rejected. Extra data fields may be available with information from our payment processor on the failure reason. |
| `payment:refunded` | A buyer's payment has been refunded because the mint failed multiple attempts. Extra data fields may be available with the reason for the refund. |
| `payment:hold_created` | This is only emitted if `capturePaymentLater` is set. A buyer's payment method has a pre-authorization hold created for the given amount. They have not been charged yet. You can [capture this hold](ref:capture-transaction-hold) to complete their purchase, or [cancel it](ref:cancel-transaction-hold). |
| Event | Description |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `transfer:succeeded` | The NFT has been delivered to the buyer's wallet. |
| `transfer:failed` | The NFT was unable to be delivered after multiple retries. A refund will automatically be processed. |
| `payment:succeeded` | A buyer's payment has been successfully completed. |
| `payment:failed` | A buyer's payment attempt has been rejected. Extra data fields may be available with information from our payment processor on the failure reason. |
| `payment:refunded` | A buyer's payment has been refunded because the mint failed multiple attempts. Extra data fields may be available with the reason for the refund. |
| `payment:hold_created` | This is only emitted if `capturePaymentLater` is set. A buyer's payment method has a pre-authorization hold created for the given amount. They have not been charged yet. You can [capture this hold](<https://redocly.github.io/redoc/?url=https://payments.thirdweb.com/api/doc#tag/Transaction-Holds-(Off-chain-Auctions)/paths/~1api~12022-08-12~1transaction-hold~1%7BtransactionId%7D/post>) to complete their purchase, or [cancel it](ref:cancel-transaction-hold). |

## Request format

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Integration is identical to a checkout using a `CUSTOM_CONTRACT` contract type.
Your contract method should do the following:

- Accepts the wallet address where the NFT should be delivered.
- Accepts payment in the chain's native coin or [USDC / ERC-20 tokens](usdc-pricing) from the caller (`msg.sender`) of the method.
- Accepts payment in the chain's native coin or [USDC / ERC-20 tokens](erc20-pricing) from the caller (`msg.sender`) of the method.
- Transfers the NFT from the seller to the recipient's wallet address. Remember: `msg.sender` is thirdweb's minter wallet and not the buyer's wallet address. Your function needs to ensure the recipient is specified in the argument list.

## Third-party marketplaces
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Each unique link allows at most one purchase and expires after the specified dur

## Prerequisites

Make sure you've [enabled your contract for Payments](enable-contraact).
Make sure you've [enabled your contract for Payments](enable-contract).

## Use cases

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Your smart contract method that mints the NFT must satisfy these requirements:

1. The method must accept the buyer's wallet address as an argument.
2. The method must allow thirdweb's minter wallets to mint an unlimited amount as the `msg.sender`. Any restrictions on the minting wallet address or quantity is not allowed.
3. (If priced in USDC) The method must explicitly [request USDC token](/checkouts/usdc-pricing) from the `msg.sender`.
3. (If priced in USDC) The method must explicitly [request USDC token](/checkouts/erc20-pricing) from the `msg.sender`.

## MintMethod

Expand All @@ -86,7 +86,7 @@ The generic format of the mintMethod is:

> 🚧 Don't know the values?
>
> thirdweb supports two template variables -`$WALLET` and `$QUANTITY` that you may use if you don't know the buyer's wallet address and quantity. Note that for **all other** fields such as `value` and `currency`, you would need to hardcode the actual values.
> thirdweb supports two template variables -`$WALLET` and `$QUANTITY` that you may use if you don't know the buyer's wallet address and quantity. Note that for **all other** fields such as `value` and `currency`, you would need to hardcode the actual values.
Template variables will be replaced when calling your contract:

Expand All @@ -109,13 +109,11 @@ Example: `"payment": { value: "0 * $QUANTITY", currency: "MATIC" }`

### NFTs priced in USDC

Ensure your mint method **explicitly requests USDC tokens from msg.sender**. See [USDC Pricing](/checkouts/usdc-pricing) for more details.
Ensure your mint method **explicitly requests USDC tokens from msg.sender**. See [USDC Pricing](/checkouts/erc20-pricing) for more details.

### Delegate a different ERC-20 payment address

>
> 📘 This is required when interacting with the [Seaport contract](https://docs.opensea.io/reference/seaport-overview).
>
By default thirdweb's float wallet approves your NFT contract to request ERC-20 tokens.

Expand All @@ -142,4 +140,3 @@ Please provide the full signature as your mintMethod. thirdweb will not try to "
> Provide your mintMethod as `mint(address)`.
You **do not** need to modify your contract.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
slug: /checkouts/usdc-pricing
title: USDC (ERC-20) Pricing
slug: /checkouts/erc20-pricing
title: ERC-20 Pricing
---

> thirdweb supports selling NFTs that accept the USDC token **for enterprise customers only**.
Expand Down Expand Up @@ -33,7 +33,6 @@ title: USDC (ERC-20) Pricing
2. Configure your checkout to accept USDC payment:
1. **Shareable Checkout Links:** When creating the checkout set the **Price per NFT** currency to **USDC**.
2. **One-Time Checkout Links:** When [creating a One-Time Checkout Link](/checkouts/one-time-checkout-link) set `mintMethod` with `"payment": { "value": "50 * $QUANTITY", currency: "USDC" }`.
3. **Checkout Elements:** When [creating a Client Secret](/checkouts/elements) set `mintMethod` with `"payment": { "value": "50 * $QUANTITY", currency: "USDC" }`.

## Accepting the correct USDC token

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 511d8f9

Please sign in to comment.