> ## 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

> Understand the difference between checkout-link creation and a later fake conversion event.

# Mock Conversion Artifact

The MCP checkout-link flow ends when the agent receives a hosted checkout URL:

```text theme={null}
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.

<Warning>
  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.
</Warning>

## Mock payload fields

| Field                      | Meaning in this tutorial                                                        |
| -------------------------- | ------------------------------------------------------------------------------- |
| `event_id`                 | Fake event identifier for idempotency examples.                                 |
| `event_type`               | Mock event type, not a production event contract.                               |
| `environment`              | Always `mock` for this artifact.                                                |
| `merchant_id` / `offer_id` | Fake merchant and offer identifiers.                                            |
| `session_id`               | Fake search/session context from the MCP flow.                                  |
| `recommendation_id`        | Fake recommendation context from the SDK examples.                              |
| `checkout_id`              | Fake checkout-link creation ID.                                                 |
| `conversion_id`            | Fake conversion identifier.                                                     |
| `amount` / `status`        | Mock eligible-conversion amount and status.                                     |
| `attribution.aap_code`     | Fake AAP offer URI used to preserve attribution context.                        |
| `attribution.recorded`     | Educational 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`:

```sh theme={null}
cat examples/mock-conversion/conversion-event.json | jq .event_type,.environment,.status,.attribution.recorded
```

Expected output:

```text theme={null}
"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.

<CardGroup cols={2}>
  <Card title="JavaScript mock example" href="https://github.com/rakohq/developer-docs/tree/main/examples/js-sdk-basic">
    Run the TypeScript SDK example against the local mock AAP server.
  </Card>

  <Card title="Python mock example" href="https://github.com/rakohq/developer-docs/tree/main/examples/python-sdk-basic">
    Run the Python SDK example against the local mock AAP server.
  </Card>
</CardGroup>

The mock conversion payload lives at [`examples/mock-conversion/conversion-event.json`](https://github.com/rakohq/developer-docs/blob/main/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.
