Skip to content

Commit 5ecd00f

Browse files
authored
docs(payments): rename Refund and Pay Out, move void, merge capture pages (#2001)
Rename the Return and Pay Out group to Refund and Pay Out, move Void an Authorization into it, and merge Capture a Partial Amount into Capture an Authorization with a redirect. Regenerate AGENTS.md and llms files.
1 parent e1d4b52 commit 5ecd00f

10 files changed

Lines changed: 45 additions & 140 deletions

File tree

‎docs/AGENTS.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ npx skills add base/base-skills
4747
|Build on Base/Integrate DeFi:build-on-base/integrate-defi/integrate-trading,build-on-base/integrate-defi/integrate-lending,build-on-base/integrate-defi/integrate-borrowing,build-on-base/integrate-defi/integrate-earn-product,build-on-base/integrate-defi/list-tokenized-stocks
4848
|Build on Base/Tokenize Assets:build-on-base/issue-rwa/create-an-asset-token,build-on-base/issue-rwa/issue-units,build-on-base/issue-rwa/restrict-eligible-holders,build-on-base/issue-rwa/cancel-blocked-units,build-on-base/issue-rwa/announce-a-distribution,build-on-base/issue-rwa/apply-a-multiplier,build-on-base/issue-rwa/pause-transfers
4949
|Build on Base/Issue Stablecoins:build-on-base/issue-stablecoins/issue-your-stablecoin,build-on-base/issue-stablecoins/mint-supply,build-on-base/issue-stablecoins/burn-supply,build-on-base/issue-stablecoins/restrict-who-can-hold,build-on-base/issue-stablecoins/block-an-account,build-on-base/issue-stablecoins/recover-funds,build-on-base/issue-stablecoins/pause-activity,build-on-base/issue-stablecoins/reconcile-with-memos
50-
|Build on Base/Accept Payments/Process a Payment:build-on-base/accept-payments/make-a-simple-payment,build-on-base/accept-payments/request-a-payment,build-on-base/accept-payments/authorize-a-payment,build-on-base/accept-payments/capture-an-authorization,build-on-base/accept-payments/capture-a-partial-amount,build-on-base/accept-payments/void-an-authorization,build-on-base/accept-payments/charge-on-a-schedule
50+
|Build on Base/Accept Payments/Process a Payment:build-on-base/accept-payments/make-a-simple-payment,build-on-base/accept-payments/request-a-payment,build-on-base/accept-payments/authorize-a-payment,build-on-base/accept-payments/capture-an-authorization,build-on-base/accept-payments/charge-on-a-schedule
5151
|Build on Base/Accept Payments/Confirm and Reconcile:build-on-base/accept-payments/verify-a-payment,build-on-base/accept-payments/watch-for-payments,build-on-base/accept-payments/reconcile-payments
52-
|Build on Base/Accept Payments/Return and Pay Out:build-on-base/accept-payments/refund-a-payment,build-on-base/accept-payments/send-a-payout,build-on-base/accept-payments/split-a-payment
52+
|Build on Base/Accept Payments/Refund and Pay Out:build-on-base/accept-payments/refund-a-payment,build-on-base/accept-payments/void-an-authorization,build-on-base/accept-payments/send-a-payout,build-on-base/accept-payments/split-a-payment
5353
|Build on Base/Accept Payments/Accept Agentic Payments:build-on-base/accept-payments/charge-for-an-api,build-on-base/accept-payments/settle-usage-based-payments,build-on-base/accept-payments/batch-high-frequency-payments,build-on-base/accept-payments/call-a-paid-service
5454
|Build on Base/Private Transactions:build-on-base/ledgers/deposit,build-on-base/ledgers/transfer,build-on-base/ledgers/withdraw
5555
|Specifications/Specifications:specifications/overview,specifications/native-account-abstraction,specifications/flashblocks

‎docs/build-on-base/accept-payments/capture-a-partial-amount.mdx‎

Lines changed: 0 additions & 72 deletions
This file was deleted.

‎docs/build-on-base/accept-payments/capture-an-authorization.mdx‎

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
title: "Capture an Authorization"
3-
keywords: ["Commerce Payments capture", "capture escrowed USDC", "PaymentCaptured", "deferred settlement Base"]
4-
description: "Capture authorized funds from escrow before the authorization expires."
3+
keywords: ["Commerce Payments capture", "capture escrowed USDC", "PaymentCaptured", "deferred settlement Base", "Commerce Payments partial capture", "split shipment payment", "variable USDC capture", "capturableAmount"]
4+
description: "Capture all or part of an escrowed authorization, in one capture or across multiple fulfillment increments, before the authorization expires."
55
---
66

77
import { PaymentsDemo } from "/snippets/PaymentsDemo.jsx"
88

9-
Capture an authorization when the order is ready to settle. The operator transfers all or part of the escrowed amount to the receiver and fee receiver without collecting from the payer again.
9+
Capture an authorization when the order is ready to settle. The operator transfers all or part of the escrowed amount to the receiver and fee receiver without collecting from the payer again. Capture the full amount at once, capture less when the final total changes after checkout, or capture multiple increments as an order ships.
1010

1111
<Info>
1212
This guide's payment flow is based on the [Commerce Payments Protocol](https://github.com/base/commerce-payments).
@@ -59,15 +59,33 @@ Capture decreases `capturableAmount` and increases `refundableAmount` by the sam
5959
Verify `PaymentCaptured(paymentInfoHash, amount, feeAmount, feeReceiver)` and the expected receiver transfers before marking the fulfillment increment settled.
6060
</Check>
6161

62+
## Capture a Partial Amount
63+
64+
<PaymentsDemo flow="partial" />
65+
66+
Pass a smaller `amount` to the same `capture` call for every increment. The sum of successful captures cannot exceed `PaymentAuthorized.amount`, and each capture independently validates its fee bounds. The remaining reservation is tracked onchain without a custom checkout contract.
67+
68+
For a 100 USDC authorization, a 64 USDC capture leaves 36 USDC capturable and makes 64 USDC refundable. You can capture another increment or [void the remainder](/build-on-base/accept-payments/void-an-authorization).
69+
70+
<Check>
71+
After every capture, reconcile `PaymentCaptured.amount` with the new `capturableAmount` and `refundableAmount` before another worker advances the order.
72+
</Check>
73+
74+
<Warning>
75+
Fee bounds are evaluated per capture and use integer division. With low-decimal tokens, fragmenting one settlement into many small captures can reduce the aggregate minimum fee. Enforce a minimum capture size offchain when that matters.
76+
</Warning>
77+
78+
## Capture Deadline
79+
6280
<Warning>
6381
At `authorizationExpiry`, capture is no longer available and the payer can reclaim the remaining balance. Use chain time rather than an application server clock when enforcing the deadline.
6482
</Warning>
6583

6684
## See Also
6785

6886
<CardGroup cols={2}>
69-
<Card title="Capture a Partial Amount" icon="receipt" href="/build-on-base/accept-payments/capture-a-partial-amount">
70-
Settle split shipments or a reduced final total.
87+
<Card title="Void an Authorization" icon="ban" href="/build-on-base/accept-payments/void-an-authorization">
88+
Return the unneeded remainder to the payer.
7189
</Card>
7290
<Card title="Refund a Payment" icon="rotate-left" href="/build-on-base/accept-payments/refund-a-payment">
7391
Return previously captured value to the payer.

‎docs/build-on-base/accept-payments/settle-usage-based-payments.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,5 @@ Do not return billable output before middleware has verified the authorization.
7474

7575
<CardGroup cols={2}>
7676
<Card title="Charge for an API" icon="server" href="/build-on-base/accept-payments/charge-for-an-api">Use `exact` when price is known before work.</Card>
77-
<Card title="Capture a Partial Amount" icon="receipt" href="/build-on-base/accept-payments/capture-a-partial-amount">Build the wallet-checkout version with a constrained permit.</Card>
77+
<Card title="Capture an Authorization" icon="receipt" href="/build-on-base/accept-payments/capture-an-authorization#capture-a-partial-amount">Build the wallet-checkout version with a constrained permit.</Card>
7878
</CardGroup>

‎docs/docs.json‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,6 @@
145145
"build-on-base/accept-payments/request-a-payment",
146146
"build-on-base/accept-payments/authorize-a-payment",
147147
"build-on-base/accept-payments/capture-an-authorization",
148-
"build-on-base/accept-payments/capture-a-partial-amount",
149-
"build-on-base/accept-payments/void-an-authorization",
150148
"build-on-base/accept-payments/charge-on-a-schedule"
151149
]
152150
},
@@ -159,9 +157,10 @@
159157
]
160158
},
161159
{
162-
"group": "Return and Pay Out",
160+
"group": "Refund and Pay Out",
163161
"pages": [
164162
"build-on-base/accept-payments/refund-a-payment",
163+
"build-on-base/accept-payments/void-an-authorization",
165164
"build-on-base/accept-payments/send-a-payout",
166165
"build-on-base/accept-payments/split-a-payment"
167166
]
@@ -621,6 +620,10 @@
621620
]
622621
},
623622
"redirects": [
623+
{
624+
"source": "/build-on-base/accept-payments/capture-a-partial-amount",
625+
"destination": "/build-on-base/accept-payments/capture-an-authorization#capture-a-partial-amount"
626+
},
624627
{
625628
"source": "/upgrades/cobalt/validity-transactions",
626629
"destination": "/specifications/build-transaction/validity-transactions"

‎docs/get-started/accept-payments.mdx‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,7 @@ The demo above is mock only. If you want to see onchain demos on Vibenet, head t
3636
Reserve funds in escrow under immutable payment terms.
3737
</Card>
3838
<Card title="Capture an Authorization" icon="check" href="/build-on-base/accept-payments/capture-an-authorization">
39-
Settle escrowed funds before authorization expiry.
40-
</Card>
41-
<Card title="Capture a Partial Amount" icon="receipt" href="/build-on-base/accept-payments/capture-a-partial-amount">
42-
Settle split shipments or a reduced final total.
43-
</Card>
44-
<Card title="Void an Authorization" icon="ban" href="/build-on-base/accept-payments/void-an-authorization">
45-
Return the remainder now or let the payer reclaim after expiry.
39+
Settle all or part of the escrowed funds before authorization expiry.
4640
</Card>
4741
<Card title="Charge on a Schedule" icon="calendar" href="/build-on-base/accept-payments/charge-on-a-schedule">
4842
Create one protocol charge per billing period with a spend permission.
@@ -63,12 +57,15 @@ The demo above is mock only. If you want to see onchain demos on Vibenet, head t
6357
</Card>
6458
</CardGroup>
6559

66-
## Return and Pay Out
60+
## Refund and Pay Out
6761

6862
<CardGroup cols={2}>
6963
<Card title="Refund a Payment" icon="rotate-left" href="/build-on-base/accept-payments/refund-a-payment">
7064
Source refund liquidity and return captured value to the payer.
7165
</Card>
66+
<Card title="Void an Authorization" icon="ban" href="/build-on-base/accept-payments/void-an-authorization">
67+
Return the remainder now or let the payer reclaim after expiry.
68+
</Card>
7269
<Card title="Send a Payout" icon="money-bill-transfer" href="/build-on-base/accept-payments/send-a-payout">
7370
Pay a bounded recipient batch under one reference.
7471
</Card>

‎docs/llms-full.txt‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,7 @@ const client = createPublicClient({ chain: base, transport: http() })
188188

189189
- [Authorize a Payment](https://docs.base.org/build-on-base/accept-payments/authorize-a-payment): Move payer funds into escrow for later capture on Base.
190190

191-
- [Capture an Authorization](https://docs.base.org/build-on-base/accept-payments/capture-an-authorization): Capture authorized funds from escrow before the authorization expires.
192-
193-
- [Capture a Partial Amount](https://docs.base.org/build-on-base/accept-payments/capture-a-partial-amount): Capture less than the escrowed authorization or settle it across multiple fulfillment increments.
194-
195-
- [Void an Authorization](https://docs.base.org/build-on-base/accept-payments/void-an-authorization): Return the remaining escrowed authorization to the payer or let the payer reclaim it after expiry.
191+
- [Capture an Authorization](https://docs.base.org/build-on-base/accept-payments/capture-an-authorization): Capture all or part of an escrowed authorization, in one capture or across multiple fulfillment increments, before the authorization expires.
196192

197193
- [Charge on a Schedule](https://docs.base.org/build-on-base/accept-payments/charge-on-a-schedule): Create one escrow-backed charge per billing period using a wallet spend permission.
198194

@@ -204,10 +200,12 @@ const client = createPublicClient({ chain: base, transport: http() })
204200

205201
- [Reconcile Payments](https://docs.base.org/build-on-base/accept-payments/reconcile-payments): Build a settlement report from escrow charges, captures, fees, voids, reclaims, and refunds.
206202

207-
#### Return and Pay Out
203+
#### Refund and Pay Out
208204

209205
- [Refund a Payment](https://docs.base.org/build-on-base/accept-payments/refund-a-payment): Return captured value to the original payer within the refund window.
210206

207+
- [Void an Authorization](https://docs.base.org/build-on-base/accept-payments/void-an-authorization): Return the remaining escrowed authorization to the payer or let the payer reclaim it after expiry.
208+
211209
- [Send a Payout](https://docs.base.org/build-on-base/accept-payments/send-a-payout): Send a referenced batch of token payouts in one transaction without leaving funds in the payout contract.
212210

213211
- [Split a Payment](https://docs.base.org/build-on-base/accept-payments/split-a-payment): Split one token amount across marketplace recipients with exact basis-point accounting and no stranded dust.

‎docs/llms.txt‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,7 @@
122122

123123
- [Authorize a Payment](https://docs.base.org/build-on-base/accept-payments/authorize-a-payment): Move payer funds into escrow for later capture on Base.
124124

125-
- [Capture an Authorization](https://docs.base.org/build-on-base/accept-payments/capture-an-authorization): Capture authorized funds from escrow before the authorization expires.
126-
127-
- [Capture a Partial Amount](https://docs.base.org/build-on-base/accept-payments/capture-a-partial-amount): Capture less than the escrowed authorization or settle it across multiple fulfillment increments.
128-
129-
- [Void an Authorization](https://docs.base.org/build-on-base/accept-payments/void-an-authorization): Return the remaining escrowed authorization to the payer or let the payer reclaim it after expiry.
125+
- [Capture an Authorization](https://docs.base.org/build-on-base/accept-payments/capture-an-authorization): Capture all or part of an escrowed authorization, in one capture or across multiple fulfillment increments, before the authorization expires.
130126

131127
- [Charge on a Schedule](https://docs.base.org/build-on-base/accept-payments/charge-on-a-schedule): Create one escrow-backed charge per billing period using a wallet spend permission.
132128

@@ -138,10 +134,12 @@
138134

139135
- [Reconcile Payments](https://docs.base.org/build-on-base/accept-payments/reconcile-payments): Build a settlement report from escrow charges, captures, fees, voids, reclaims, and refunds.
140136

141-
#### Return and Pay Out
137+
#### Refund and Pay Out
142138

143139
- [Refund a Payment](https://docs.base.org/build-on-base/accept-payments/refund-a-payment): Return captured value to the original payer within the refund window.
144140

141+
- [Void an Authorization](https://docs.base.org/build-on-base/accept-payments/void-an-authorization): Return the remaining escrowed authorization to the payer or let the payer reclaim it after expiry.
142+
145143
- [Send a Payout](https://docs.base.org/build-on-base/accept-payments/send-a-payout): Send a referenced batch of token payouts in one transaction without leaving funds in the payout contract.
146144

147145
- [Split a Payment](https://docs.base.org/build-on-base/accept-payments/split-a-payment): Split one token amount across marketplace recipients with exact basis-point accounting and no stranded dust.

‎examples/verified-doc-samples/typescript/src/payments/partial.ts‎

Lines changed: 0 additions & 28 deletions
This file was deleted.

‎examples/verified-doc-samples/verification-manifest.json‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -515,15 +515,6 @@
515515
"compile"
516516
]
517517
},
518-
{
519-
"id": "usdc-variable-payment-ts",
520-
"document": "docs/build-on-base/accept-payments/capture-a-partial-amount.mdx",
521-
"fixture": "examples/verified-doc-samples/typescript/src/payments/partial.ts",
522-
"checks": [
523-
"sync",
524-
"compile"
525-
]
526-
},
527518
{
528519
"id": "usdc-void-ts",
529520
"document": "docs/build-on-base/accept-payments/void-an-authorization.mdx",

0 commit comments

Comments
 (0)