Retrieve a request

Request Data

/** Interface request data */
export interface IRequestData extends Omit<RequestLogic.IRequest, 'currency'> {
currency: string;
meta: RequestLogic.IReturnMeta | null;
balance: Payment.IBalanceWithEvents<any> | null;
contentData: any;
currencyInfo: RequestLogic.ICurrency;
pending: RequestLogic.IPendingRequest | null;

Retrieve a request by ID

fromRequestId Function Signature

* Create a Request instance from an existing Request's ID
* @param requestId The ID of the Request
* @param options options
* @returns the Request
public async fromRequestId(
requestId: RequestLogicTypes.RequestId,
options?: {
disablePaymentDetection?: boolean;
disableEvents?: boolean;
): Promise<Request>

fromRequestId Usage Example

import { RequestNetwork, Types } from '@requestnetwork/request-client.js';
const requestId = '01c9190b6d015b3a0b2bbd0e492b9474b0734ca19a16f2fda8f7adec10d0fa3e7a'
const request = await requestNetwork.fromRequestId(requestId);
const requestData = await request.getData();

Retrieve requests for a given Ethereum address

fromIdentity Function Signature

* Create an array of request instances from an identity
* @param updatedBetween filter the requests with time boundaries
* @param options options
* @returns the Requests
public async fromIdentity(
identity: IdentityTypes.IIdentity,
updatedBetween?: Types.ITimestampBoundaries,
options?: { disablePaymentDetection?: boolean; disableEvents?: boolean },
): Promise<Request[]>

fromIdentity Usage Example

import { RequestNetwork, Types } from '@requestnetwork/request-client.js';
const address = '0x7eB023BFbAeE228de6DC5B92D0BeEB1eDb1Fd567';
const requests = await requestNetwork.fromIdentity(
type: Types.Identity.TYPE.ETHEREUM_ADDRESS,
value: address,

Compute a Request ID without creating it

/** Create request parameters */
export interface ICreateRequestParameters {
requestInfo: RequestLogic.ICreateParameters | IRequestInfo;
signer: Identity.IIdentity;
paymentNetwork?: Payment.PaymentNetworkCreateParameters;
topics?: any[];
contentData?: any;
disablePaymentDetection?: boolean;
disableEvents?: boolean;
* Gets the ID of a request without creating it.
* @param requestParameters Parameters to create a request
* @returns The requestId
public async computeRequestId(
parameters: Types.ICreateRequestParameters,
): Promise<RequestLogicTypes.RequestId>