Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.rako.sh/llms.txt

Use this file to discover all available pages before exploring further.

Mock Conversion Artifact

The MCP checkout-link flow ends when the agent receives a hosted checkout URL:
search_offers -> get_checkout_requirements -> get_checkout_link
get_checkout_link is a handoff step. It does not process payment, confirm an order, prove eligibility, or record a real conversion. A conversion event is a later merchant or platform-side confirmation that something eligible happened after checkout. In the runnable examples, conversion-event.json is a fake local payload used only to teach the shape of that concept.
Do not treat the mock conversion artifact as a production API contract. It is local education data with placeholder IDs and a .invalid checkout URL.

Mock payload fields

FieldMeaning in this tutorial
event_idFake event identifier for idempotency examples.
event_typeMock event type, not a production event contract.
environmentAlways mock for this artifact.
merchant_id / offer_idFake merchant and offer identifiers.
session_idFake search/session context from the MCP flow.
recommendation_idFake recommendation context from the SDK examples.
checkout_idFake checkout-link creation ID.
conversion_idFake conversion identifier.
amount / statusMock eligible-conversion amount and status.
attribution.aap_codeFake AAP offer URI used to preserve attribution context.
attribution.recordedEducational flag showing that the mock event links back to attribution context.

Inspect the local artifact

After cloning the docs repository, inspect the mock payload with jq:
cat examples/mock-conversion/conversion-event.json | jq .event_type,.environment,.status,.attribution.recorded
Expected output:
"conversion.eligible"
"mock"
"eligible_conversion"
true

What this teaches

  1. Checkout-link creation and conversion recording are separate steps.
  2. The agent should not collect payment credentials or claim a payment occurred.
  3. The checkout link can preserve attribution context for the hosted checkout handoff.
  4. Conversion confirmation happens later through merchant or platform-side systems, not through the chat transcript alone.
  5. Production webhook, ledger, security, and settlement behavior are outside this local mock example.

JS and Python mock paths

The JavaScript and Python examples show the local hello-world path that reaches the same mock checkout URL. Use them before connecting a non-mock API key.

JavaScript mock example

Run the TypeScript SDK example against the local mock AAP server.

Python mock example

Run the Python SDK example against the local mock AAP server.
The mock conversion payload lives at examples/mock-conversion/conversion-event.json.

What this does not prove

This artifact does not prove or imply:
  • A real payment happened.
  • A real order was placed.
  • A real merchant accepted the conversion.
  • A payout, commission, settlement, or transfer occurred.
  • Production webhook or ledger behavior is implemented or approved.
  • A user is eligible for a real-world offer.