Skip to content

Pay with signature

Pay for a gasless session with a signature

Import

import { payWithSignature } from "@paywithglide/glide-js";

Usage

index.ts
import { payWithSignature } from "@paywithglide/glide-js";
import { config } from ""./config";
 
const { success } = await payWithSignature(config, {
  sessionId: "c165e159-1f0e-44a1-8fa8-8c963444752e",
  signature: "0x...",
});

Parameters

sessionId*
string

The unique identifier of the session.

signature*
string

The signature that will be used to pay for the session.

Return Type

success*
boolean

Indicates whether the payment was successful.