Card checkouts
A plain card checkout with the card/seller-reference pairing and the agreement step.
A plain card checkout uses the pairing card/seller-reference. The card payment carries nothing the buyer signs, so
the door checks nothing at claim, the seller's report is the settlement, and the agreement step
supplies the public proof of H.
| Call | What to send |
|---|---|
issue | A card option {scheme: "seller-reference", checkout}; the checkout as shown to the buyer, in content; its lifetime. |
claim | Not applicable: it answers 422 claim/nothing-to-check. |
report | outcome: "paid", the processor's payment reference as it comes, and network: "card", once the agreement is recorded. |
The whole checkout
Vector CV9 runs it end to end: issue, the claim that has nothing to check, the report after the agreement is
recorded, and the status.
import type { IssueResponse, RecordView } from "@integraledger/agentic-connectors";
const = .. ?? "https://seller.example/door";
const = .. ?? "";
const = { : `Bearer ${}`, "content-type": "application/json" };
const = (: string, : unknown) => (`${}${}`, { : "POST", , : .() });
// The checkout exactly as the platform shows it, as one JSON value.
const = '{"id":"chk_1001","total":{"currency":"USD","amount":27999}}';
const = { : "seller-reference", : "chk_1001" };
const = (await (
await ("/issue", {
: "chk_1001:v1",
: "checkout",
: 900,
: [{ : "card/seller-reference", }],
: [{ : "checkout", : .().("base64") }],
})
).()) as IssueResponse;
.("agreement URL:", .?.);
const = await ("/claim", { : "checkout", : "card/seller-reference", : {}, : , : "card" });
.("claim:", ., ((await .()) as { : string }).);
// After status shows agreement.state "recorded" and the processor has charged the card:
const = await ("/report", {
: .,
: "card/seller-reference",
: "paid",
: "pi_3Nma8hD7mauJ7ZJt0bKKZkRT",
: "card",
});
const = (await .()) as RecordView;
.("report:", ., ., .?., ..);agreement URL: https://seller.example/agreement/0xcfa3a6589bf1e273ab105bb7144a2d5944af1caed14f58b39145d46842f825d8
claim: 422 claim/nothing-to-check
report: 200 paid pi_3Nma8hD7mauJ7ZJt0bKKZkRT seller-reportWrite atrHash into the platform's cart and order fields so the report can be keyed by it, and show the buyer the
link and the agreement URL beside the checkout.
Edit on GitHub
Last updated on