OpenPermit Docs
Guides

Onchain Seller and Buyer Flow

Use OpenPermit policy with non-custodial onchain payment execution.

OpenPermit supports resource-configured evmStablecoin flows where the seller stores onchain defaults and the buyer submits the transaction.

Store paymentConfig.onchain with chain, payTo, and optional contract/token overrides.

The seller middleware emits an onchain payment challenge for the resource.

The SDK asks OpenPermit for a transaction plan, broadcasts with caller-provided clients, and submits settlement.

The SDK returns retry headers including OPENPERMIT-INTENT-ID and OPENPERMIT-ONCHAIN-SETTLEMENT.

import { executeOnchainSellerChallenge } from '@openpermit/sdk/buyer';

const result = await executeOnchainSellerChallenge({
	client: openpermit,
	mandateId: 'mandate_...',
	challenge,
	walletClient,
	publicClient,
});

OpenPermit remains non-custodial in this flow. Your app owns wallet connection and transaction submission.