AIOT Payment x402 is in public beta. Install the skill for your AI agent.
ReferenceAIOTShopifyClient

Class: AIOTShopifyClient

Defined in: client.ts:61

Constructors

Constructor

new AIOTShopifyClient(config): AIOTShopifyClient

Defined in: client.ts:73

Parameters

config

AIOTShopifyClientConfig

Returns

AIOTShopifyClient

Methods

completePayment()

completePayment(sessionId, input): Promise<PaymentResult>

Defined in: client.ts:186

Complete a payment: settle → complete draft order → mark as paid → add note. Settle performs full validation (signature, balance, allowance, nonce) internally. Idempotent: checks status before each step.

Parameters

sessionId

string

input

CompletePaymentInput

Returns

Promise<PaymentResult>


createCheckout()

createCheckout(items, currency?): Promise<CreateCheckoutResult>

Defined in: client.ts:101

Create a checkout: converts price, creates Shopify draft order, creates x402 order, and returns session info.

Parameters

items

CartItem[]

currency?

string = "usd"

Returns

Promise<CreateCheckoutResult>


getCallbackUrl()

getCallbackUrl(): string | undefined

Defined in: client.ts:355

Get the configured callback URL.

Returns

string | undefined


getCheckoutStatus()

getCheckoutStatus(sessionId): Promise<CheckoutSession | undefined>

Defined in: client.ts:175

Get current checkout session status.

Parameters

sessionId

string

Returns

Promise<CheckoutSession | undefined>


getPriceConverter()

getPriceConverter(): PriceConverter

Defined in: client.ts:350

Access price converter for standalone conversions.

Returns

PriceConverter


getSessionManager()

getSessionManager(): CheckoutSessionManager

Defined in: client.ts:345

Access underlying session manager for custom flows.

Returns

CheckoutSessionManager


getSupported()

getSupported(): Promise<SupportedResponse>

Defined in: client.ts:340

Query supported chains and contracts from the facilitator.

Returns

Promise<SupportedResponse>