Onramp.status

Retrieves the status of an Onramp session created via Bridge.Onramp.prepare. The status will include any on-chain transactions that have occurred as a result of the onramp as well as any arbitrary purchaseData that was supplied when the onramp was prepared.

Example

import { Bridge } from "thirdweb";
const onrampStatus = await Bridge.Onramp.status({
id: "022218cc-96af-4291-b90c-dadcb47571ec",
client: thirdwebClient,
});
// Possible results:
// {
// status: "CREATED",
// transactions: [],
// purchaseData: {
// orderId: "abc-123",
// },
// }
//
// or
// {
// status: "PENDING",
// transactions: [],
// purchaseData: {
// orderId: "abc-123",
// },
// }
//
// or
// {
// status: "COMPLETED",
// transactions: [
// {
// chainId: 1,
// transactionHash:
// "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
// },
// ],
// purchaseData: {
// orderId: "abc-123",
// },
// }
function status(options: Options): Promise<Result>;

Parameters

The options for fetching the onramp status.

Type

let options: Options;

Returns

let returnType: Promise<Result>;

A promise that resolves to the status of the onramp session.