Skip to main content
Handles fiat-style payments via a payment gateway. Manages payment creation, confirmation, refunds, fee disbursement, and fund withdrawal for campaigns.
Two treasury variants, one SDK methodThe paymentTreasury() method works with both on-chain implementations:Both contracts share the same ABI and the same SDK interface. Time enforcement is handled entirely on-chain — simply pass the deployed contract address regardless of which variant was deployed.

Methods

Reads

Writes

All write methods return Promise<Hex> (transaction hash).

Types

LineItem

ExternalFees

PaymentData

Returned by getPaymentData():

Usage examples

Create and confirm a payment

Query payment data

Process a crypto payment

Batch operations

Withdraw and disburse

When using a TimeConstrainedPaymentTreasury, calls made outside the allowed time window will revert on-chain. For example, createPayment() will revert if called before launch or after the deadline + buffer period.