SDK reference · Node SDK
prov.authorize.network
prov.authorize.network in the Node SDK: 13 methods. The authorize.network methods.
Methods
requestGrant
prov.authorize.network.requestGrant(params: { agentId: string; proposed: NetworkConstraints; returnUrl?: string; /** #180: how far above your ask a person may raise (never below `proposed`); leave out for no ceiling. */ hardMax?: Partial<GrantHardMax>; /** #180: this grant's near-limit channels, overriding your setting. */ limitNoticeChannels?: Partial<LimitNoticeChannels>; }): Promise<NetworkGrantRequest>Ask a person for a network mandate for one of your verified agents.
Calls POST /v1/mandate/grant_requests.
getGrant
prov.authorize.network.getGrant(id: string): Promise<NetworkGrant>A network grant your agent holds, with its version.
Calls GET /v1/mandate/network_grants/{id}.
waitForGrantChange
prov.authorize.network.waitForGrantChange(grantId: string, version: number, opts?: { timeoutMs?: number; minIntervalMs?: number; maxIntervalMs?: number; signal?: AbortSignal }): Promise<NetworkGrant | null>Wait until the person changes the grant past version (after you showed them an adjust link), polling with backoff from 1 to 15 seconds.
getLimitNoticeSettings
prov.authorize.network.getLimitNoticeSettings(): Promise<LimitNoticeSettings>The channels your agents' near-limit notices go on.
Calls GET /v1/mandate/settings/limit_notices.
setLimitNoticeSettings
prov.authorize.network.setLimitNoticeSettings(channels: Partial<LimitNoticeChannels>): Promise<LimitNoticeSettings>Turn push, text or email on or off for near-limit notices (an admin key).
Calls PUT /v1/mandate/settings/limit_notices.
getGrantRequest
prov.authorize.network.getGrantRequest(id: string): Promise<NetworkGrantRequest>The request, with networkMandate (the token) once granted.
Calls GET /v1/mandate/grant_requests/{id}.
createOrder
prov.authorize.network.createOrder(params: { networkMandate: string; order: Record<string, unknown>; aud: string; approvalId?: string; paymentMethod?: NetworkOrderPaymentMethod; }): Promise<NetworkAuthorization>Buy under a network mandate: a cart-bound intent token within the limits, else the person is asked.
Calls POST /v1/mandate/network_orders.
accept
prov.authorize.network.accept(intentToken: string): Promise<NetworkAcceptance>Store side: accept the order online (the reservation becomes spend).
Calls POST /v1/authorize/network_orders/confirm.
cancel
prov.authorize.network.cancel(intentToken: string): Promise<{ object: "network_cancellation"; id: string; status: "cancelled"; amount: number; currency: string }>Store side: a cancelled or refunded order gives the budget back.
Calls POST /v1/authorize/network_orders/cancel.
report
prov.authorize.network.report(params: { intentJti?: string; decisionId?: string; kind: NetworkReportKind; occurredAt: string; note?: string }): Promise<NetworkReport>Report an order your account verified or accepted.
Calls POST /v1/authorize/agent_reports.
listReports
prov.authorize.network.listReports(params?: { limit?: number; startingAfter?: string }): Promise<{ object: "list"; data: NetworkReport[]; hasMore: boolean; nextCursor: string | null }>The reports your account filed, with your notes.
Calls GET /v1/authorize/agent_reports.
withdrawReport
prov.authorize.network.withdrawReport(id: string): Promise<{ id: string; object: "network_report"; deleted: true; status: "withdrawn" }>Withdraw a report within 30 days.
Calls DELETE /v1/authorize/agent_reports/{id}.
agentRecord
prov.authorize.network.agentRecord(agentId: string): Promise<{ object: "agent_record"; agentId: string; showRecord: boolean; networkSignals: NetworkSignals; weeks: { week: string; requests: number; accepted: number; reports: number }[]; reports: NetworkReport[]; }>Agent makers: your agent's record as merchants see it, with the counts behind it by week.
Calls GET /v1/mandate/agents/{id}/record.