Skip to content

Commit 0f1c10b

Browse files
Merge pull request #80 from ar-io/PE-8786_x402_upload_payments
docs(x402): update upload payment docs with x402 info PE-8786
2 parents caa58c3 + 541fe48 commit 0f1c10b

File tree

1 file changed

+169
-67
lines changed

1 file changed

+169
-67
lines changed

content/build/upload/turbo-credits.mdx

Lines changed: 169 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,23 @@ description: "Understanding Turbo's credit system for flexible payment options a
44
---
55

66
import {
7-
CreditCard,
8-
Upload,
7+
Bot,
98
Code,
9+
CreditCard,
1010
FileText,
11-
Tag,
1211
FolderOpen,
12+
Tag,
13+
Upload,
14+
Zap,
1315
} from "lucide-react";
1416

15-
Turbo Credits are the payment medium used by Turbo's upload service, providing a 1:1 conversion from Arweave's native AR token with additional benefits and flexible payment options.
17+
Data storage on Arweave is paid for in Arweave's native [AR](https://www.coingecko.com/en/coins/arweave) token — divisible to the "Winston" (10¹² per AR). Turbo makes paying for data storage on Arweave faster and even simpler via Turbo Credits.
1618

1719
## What are Turbo Credits?
1820

19-
Turbo Credits represent upload power on the Arweave network, divisible down to 1 trillionth of a credit (Winston Credit). Unlike traditional crypto tokens, Turbo Credits cannot be traded, transferred, or exchanged - they exist solely for uploading data to Arweave.
21+
Turbo Credits are the payment medium used by Turbo's upload service, providing a 1:1 representation of upload power on the Arweave network, and enabling precise pricing for uploads of any size.
22+
23+
Unlike traditional crypto tokens, Turbo Credits cannot be traded or exchanged on secondary markets - they exist solely for uploading data to Arweave. However, credit holders can [share their credits](#credit-sharing) with other wallets, enabling organizational and collaborative use cases.
2024

2125
<Callout type="warning">
2226
**Important:** Turbo Credits are non-refundable and cannot be withdrawn or
@@ -25,70 +29,160 @@ Turbo Credits represent upload power on the Arweave network, divisible down to 1
2529

2630
## How to Purchase Credits
2731

32+
There are two important choices to make when purchasing credits:
33+
34+
1. Pay in either fiat via Stripe or via crypto tokens on a supported network
35+
2. The address of a [supported crypto wallet](#supported-payment-wallets) type to make the primary holder of the credits
36+
37+
When paying in fiat or crypto, the destination wallet address can be one from any [supported crypto wallet](#supported-payment-wallets). It is optional, however, when paying in crypto; the payer wallet is simply used as the default choice in its absence.
38+
2839
### Payment Methods
2940

30-
- **Fiat Currency**: Credit/debit cards or USDC via Stripe
31-
- **Crypto Tokens**: AR, ETH, SOL, POLYGON, ARIO, USDC, KYVE via transfer transactions
32-
- **Spending Wallets**: Ethereum, Solana, Arweave, and Kyve wallets supported
33-
34-
### Supported Tokens & Purchase Methods
35-
36-
| Payment Method | Turbo SDK | Turbo CLI | Turbo API | Turbo App | ArDrive App |
37-
| ---------------------------- | --------- | --------- | --------- | --------- | ----------- |
38-
| **Fiat (credit/debit card)** ||||||
39-
| **AR** ||||||
40-
| **ETH** ||||||
41-
| **ETH (BASE)** ||||||
42-
| **SOL** ||||||
43-
| **POLYGON** ||||||
44-
| **ARIO** ||||||
45-
| **USDC (ETH)** ||||||
46-
| **USDC (BASE)** ||||||
47-
| **USDC (POLYGON)** ||||||
48-
| **KYVE** ||||||
49-
50-
<Callout type="info">
51-
**Wallet Compatibility:** When purchasing with cryptocurrencies, credits are
52-
deposited into the wallet described by optional parameter
53-
`turboCreditDestinationAddress`. When not provided, credits will be added to
54-
the signing wallet of the transfer.
55-
</Callout>
41+
Add credits to your wallet and they will be deducted automatically on each upload. For faster payment networks, it's possible to pay [just-in-time](#just-in-time-payments) with each upload.
42+
43+
#### Fiat Payments
44+
45+
Top up any address of a [supported wallet type](#supported-wallet-types) by paying with a credit or debit card via Stripe.
46+
47+
#### Crypto Tokens
48+
49+
Top up any address of a [supported wallet type](#supported-wallet-types) by paying in any of these supported crypto tokens:
5650

57-
### Purchase Options
51+
| Network | Tokens |
52+
| ----------- | -------------- |
53+
| Arweave | [AR](https://www.coingecko.com/en/coins/arweave) |
54+
| AO | [ARIO](https://www.coingecko.com/en/coins/ar-io-network) |
55+
| Base | [ARIO](https://basescan.org/token/0x138746adfA52909E5920def027f5a8dc1C7EfFb6), [ETH](https://www.coingecko.com/en/coins/ethereum), [USDC](https://basescan.org/token/0x833589fcd6edb6e08f4c7c32d4f71b54bda02913), [ARIO](https://basescan.org/token/0x138746adfA52909E5920def027f5a8dc1C7EfFb6)|
56+
| Ethereum | [ETH](https://www.coingecko.com/en/coins/ethereum), [USDC](https://etherscan.io/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48) |
57+
| Polygon | [POL](https://www.coingecko.com/en/coins/polygon), [USDC](https://polygonscan.com/address/0x3c499c542cef5e3811e1192ce70d8cc03d5c3359) |
58+
| Solana | [SOL](https://www.coingecko.com/en/coins/solana) |
59+
| Cosmos | [KYVE](https://www.coingecko.com/en/coins/kyve-network) |
5860

59-
**Option 1: Turbo App**
61+
### Supported Payment Wallets
6062

61-
- Visit [turbo.ar.io](https://turbo.ar.io)
62-
- Purchase with USD, ARIO, USDC, SOL, ETH, POL, KYVE tokens
63-
- Credits can be purchased for Arweave, Ethereum, Solana, or Kyve native wallet addresses
63+
| Network Type | Signature Types | Supported Wallets |
64+
| ------------ | -------------- | ------------------------------------------------------ |
65+
| Arweave | RSA | JWK Keyfile, [Wander](https://www.wander.app/), [Beacon](https://getbeaconapp.com/) |
66+
| AO | RSA | JWK Keyfile, [Wander](https://www.wander.app/), [Beacon](https://getbeaconapp.com/) |
67+
| AO | ECDSA (secp256k1) | JSON Keystore File, [MetaMask](https://metamask.io/), [Rainbow](https://rainbow.me/), [Brave](https://brave.com/wallet/), [WalletConnect](https://walletconnect.com/), [Privy](https://www.privy.io/) |
68+
| EVM | ECDSA (secp256k1) | JSON Keystore File, [MetaMask](https://metamask.io/), [Rainbow](https://rainbow.me/), [Brave](https://brave.com/wallet/), [WalletConnect](https://walletconnect.com/), [Privy](https://www.privy.io/) |
69+
| Solana | ED25519 | JSON Keypair File, [Phantom](https://phantom.com/), [Solflare](https://www.solflare.com/) |
70+
| Cosmos | secp256k1 | Keyfile |
6471

65-
**Option 2: ArDrive App**
72+
### Purchasing Interfaces
6673

67-
- Use [ArDrive](https://app.ardrive.io) for simple purchases
68-
- Buy credits with USD directly in the app
69-
- Perfect for occasional users
74+
#### Turbo App
7075

71-
**Option 3: Turbo SDK/CLI**
76+
Visit [turbo.ar.io](https://turbo.ar.io) to purchase credits with fiat or crypto using a connected wallet.
77+
78+
#### ArDrive App
79+
80+
Visit [app.ardrive.io](https://app.ardrive.io) to purchase credits with fiat for Arweave wallets.
81+
82+
#### Turbo Typescript SDK
7283

7384
```js
74-
// Purchase credits programmatically
75-
const { winc, status, id, ...fundResult } = await TurboFactory.authenticated({
76-
signer,
77-
token: "base-usdc",
78-
}).topUpWithTokens({
79-
tokenAmount: USDCToTokenAmount(1), // 1 USDC on base network
80-
turboCreditDestinationAddress:
81-
"any-valid-evm-arweave-solana-kyve-native-wallet-address",
85+
import { TurboFactory, USDCToTokenAmount } from "@ardrive/turbo-sdk";
86+
87+
const turbo = TurboFactory.authenticated({ signer, token: "base-usdc" });
88+
89+
// Top up with crypto
90+
const result = await turbo.topUpWithTokens({
91+
tokenAmount: USDCToTokenAmount(1),
92+
destinationAddress: "optional-different-wallet-address",
8293
});
8394

84-
// Check your balance
85-
const balance = await turbo.getBalance();
86-
console.log(`Balance: ${balance.winc} Winston Credits`);
95+
// Check balance
96+
const { winc } = await turbo.getBalance();
97+
```
98+
99+
See the [Turbo SDK documentation](/sdks/turbo-sdk) and [GitHub repository](https://github.com/ardriveapp/turbo-sdk) for complete examples.
100+
101+
#### Turbo CLI
102+
103+
```bash
104+
# Top up with crypto
105+
turbo top-up --token base-usdc --amount 1
106+
107+
# Check balance
108+
turbo balance
87109
```
88110

111+
See the [Turbo Node.js CLI documentation](https://github.com/ardriveapp/turbo-sdk/?tab=readme-ov-file#cli) for installation and usage.
112+
113+
#### HTTP API
114+
115+
Direct API integration is available at [payment.ardrive.io/api-docs](https://payment.ardrive.io/api-docs) for custom implementations.
116+
117+
#### Payment Interfaces By Token
118+
119+
| Payment Method | Turbo SDK | Turbo CLI | Turbo API | Turbo App | ArDrive App | x402 |
120+
| ---------------------------- | --------- | --------- | --------- | --------- | ----------- | ---- |
121+
| **Fiat (credit/debit card)** |||||||
122+
| **AR** |||||||
123+
| **ETH (L1)** |||||||
124+
| **ETH (Base)** |||||||
125+
| **SOL** |||||||
126+
| **POL** |||||||
127+
| **ARIO (AO)** |||||||
128+
| **ARIO (Base)** |||||||
129+
| **USDC (L1)** |||||||
130+
| **USDC (Base)** |||||||
131+
| **USDC (Polygon)** |||||||
132+
| **KYVE** |||||||
133+
134+
## Just-in-Time Payments
135+
136+
Just-in-time (JIT) payments allow you to pay for uploads at the moment of upload rather than pre-funding a credit balance. This is ideal for agentic workflows, automated pipelines, and systems that prefer pay-per-upload over balance management.
137+
138+
JIT payments are available via the Turbo SDK, CLI, or direct HTTP API integration for tokens with sufficiently fast confirmation times:
139+
140+
| Token / Currency | Network | JIT Supported |
141+
| ---------------------- | -------- | ------------- |
142+
| ARIO | AO ||
143+
| ARIO | Base ||
144+
| SOL | Solana ||
145+
| ETH | Base ||
146+
| USDC | Base ||
147+
| POL | Polygon ||
148+
| USDC | Polygon ||
149+
| AR | Arweave ||
150+
| ETH | L1 ||
151+
| KYVE | Cosmos ||
152+
| Fiat | Stripe ||
153+
154+
### x402 Protocol
155+
156+
[x402](https://www.x402.org/) is a protocolized approach to JIT payments that leverages the HTTP 402 "Payment Required" status code. Turbo currently supports x402 payments made in **USDC on Base**. The following Turbo features can utilize x402:
157+
158+
<Callout type="warning">
159+
**Note:** x402 facilitator fees may be applicable for each x402 payment.
160+
</Callout>
161+
162+
- **Uploads:** pay for storage at the time of upload
163+
- **Top up:** useful when x402 is the preferred payment medium, but facilitator fees on individual uploads are undesirable
164+
165+
Example SDK usage:
166+
167+
```js
168+
import { TurboFactory, X402Funding } from "@ardrive/turbo-sdk";
169+
170+
const turbo = TurboFactory.authenticated({ signer, token: "base-usdc" });
171+
172+
const result = await turbo.uploadFile({
173+
fileStreamFactory: () => fs.createReadStream("./myfile.jpg"),
174+
fileSizeFactory: () => fs.statSync("./myfile.jpg").size,
175+
fundingMode: new X402Funding({ maxMUSDCAmount: 1_000_000 }), // Max 1 USDC
176+
});
177+
```
178+
179+
See the [Turbo SDK documentation](/sdks/turbo-sdk) and [HTTP API docs](https://payment.ardrive.io/api-docs) for complete integration details.
180+
89181
## Credit Sharing
90182

91-
Turbo Credits can be shared with other users without transferring ownership, perfect for organizations and teams.
183+
Turbo Credits can be shared with other users to fund their uploads while maintaining total control over who may spend them, how many they may spend, and for how long they can do so. This is perfect for organizations, collaborations, and teams.
184+
185+
Credits can be shared via the Turbo App at [turbo.ar.io](https://turbo.ar.io) or programmatically via the [Turbo CLI](https://github.com/ardriveapp/turbo-sdk/?tab=readme-ov-file#cli), [SDK](/sdks/turbo-sdk), or [API](https://payment.ardrive.io/api-docs).
92186

93187
### How Credit Sharing Works
94188

@@ -104,17 +198,20 @@ Turbo Credits can be shared with other users without transferring ownership, per
104198
- **Collaboration**: Share credits with project contributors
105199
- **Educational Programs**: Provide students with controlled access
106200

107-
<Callout type="info">
108-
**Perfect for:** Companies, teams, educational institutions, and any
109-
organization needing controlled access to upload power.
110-
</Callout>
111-
112201
## Pricing & Fees
113202

114-
- **23.4% fee** applied to credit purchases (covers infrastructure and benefits)
115-
- **No additional fees** when using credits for uploads
116-
- **Same value per GiB** as AR regardless of price fluctuations
117-
- **Subsidized uploads** under 100 KiB are completely free
203+
- Turbo top up fees cover the costs of managing infrastructure and, in the case of crypto-based top ups, token liquidity.
204+
- No additional fees are applied when credits are spent.
205+
- Credits maintain a 1:1 peg of storage purchasing power as Arweave's data storage rates and token price fluctuate.
206+
- **Uploads under 100 KiB are completely free and do not require a prior top up.**
207+
208+
209+
| Currency | Top Up Fee Percentage |
210+
| ----------------- | --------------------- |
211+
| ARIO (AO or Base) | NO FEE |
212+
| KYVE | 50% |
213+
| All others | 23.4% |
214+
118215

119216
## Getting Started
120217

@@ -138,12 +235,17 @@ Ready to start using Turbo Credits? Choose your path:
138235
Learn how to upload data with your new credits
139236
</Card>
140237

141-
<Card
142-
href="/sdks/turbo-sdk"
143-
title="Turbo SDK"
144-
icon={<Code />}
238+
{" "}
239+
<Card href="/sdks/turbo-sdk" title="Turbo SDK" icon={<Code />}>
240+
Integrate credit sharing and advanced features
241+
</Card>
242+
243+
<Card
244+
href="#just-in-time-payments"
245+
title="Just-in-Time Payments"
246+
icon={<Zap />}
145247
>
146-
Integrate credit sharing and advanced features
248+
Pay-per-upload for automated workflows
147249
</Card>
148250
</Cards>
149251

0 commit comments

Comments
 (0)