SDK reference · Node SDK

prov.authorize.verifications.receipt

prov.authorize.verifications.receipt in Node SDK.

Signature

prov.authorize.verifications.receipt(id: string): Promise<Receipt<DecisionReceipt>>

Parameters

idstringRequired

Request fields

idstringpathRequired
The object's ID.

Returns

Promise<Receipt<DecisionReceipt>> The receipt.

HTTP operation

GET /v1/authorize/verifications/{id}/receipt: Get a verification receipt

Errors

Example

const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/intents`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "action_description": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
      "type": "payment",
      "amount": 1850,
      "currency": "USD",
      "payee": "acct_brindlecote_supplies"
    },
    "agent_session_id": "sess_reference_1",
    "device_id": "dev_00000000000000000000000000000001"
  }),
})).json();
const intentToken = step1.intent_token;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/verifications`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "intent_token": intentToken,
    "action_payload": {
      "type": "payment",
      "amount": 1850,
      "currency": "USD",
      "payee": "acct_brindlecote_supplies"
    }
  }),
})).json();
const verificationId = step2.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/verifications/${verificationId}/receipt`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.