SDK reference · Rails
dealTokenGetter
dealTokenGetter in @provenanceauth/rails/deals, Rails. Buyer side: a getToken for intentPaymentFetch that accepts the 402's offer through accept (usually ) and pays with the acceptance token.
Signature
dealTokenGetter(accept: (offer: string, challenge: X402IntentChallenge) => Promise<{ status: string; intent_token?: string } | null>): voidParameters
accept(offer: string, challenge: X402IntentChallenge) => Promise<{ status: string; intent_token?: string } | null>Required
Returns
void
HTTP operation
Runs locally, with no request to the API.