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();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/intents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"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()
intent_token = step1["intent_token"]
step2 = httpx.post(f"{api}/v1/authorize/verifications", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"intent_token": intent_token,
"action_payload": {
"type": "payment",
"amount": 1850,
"currency": "USD",
"payee": "acct_brindlecote_supplies"
}
}).json()
verification_id = step2["id"]
data = httpx.get(f"{api}/v1/authorize/verifications/{verification_id}/receipt", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()