Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug]: Mandate Receipt fields in agent_authorization.md (`result`) do not match the receipt schemas and SDK (`status`)

Open Beginner friendly
#374 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
json, python

Research direction

Read the Mandate Receipt section in docs/ap2/agent_authorization.md and compare it with code/sdk/schemas/ap2/checkout_receipt.json, payment_receipt.json, and the Python generated model and tests cited in the issue. Confirm the intended fields against those schemas and SDK references; done when the specification and published receipt definitions agree on outcome field, enum values, and required fields.

Written by the indexing model from the issue text.

Description

What happened?

What happened?
The Mandate Receipt format is described in two places, and they disagree on the
name and values of the field that carries the outcome, and on whether some
fields are required.

1. docs/ap2/agent_authorization.md (Action Authorization, lines 503–516)

  • iss: REQUIRED. ...
  • result: REQUIRED. An Enum with value ["success", "error"]
    indicating the result of the action authorization.
  • reference: REQUIRED. ...
  • error: OPTIONAL. ... MUST be present when the result is "error".
  • error_description: OPTIONAL. A human-readable error description String.

2. code/sdk/schemas/ap2/checkout_receipt.json and payment_receipt.json

  • the outcome field is status (via types/receipt_status.json), with values
    "Success" / "Error"
  • status, iss, iat, reference are required
  • when status is "Error", both error and error_description are required

3. Python SDK

The generated models follow the schemas, e.g.
code/sdk/python/ap2/sdk/generated/checkout_receipt.py:

status: Literal['Success']

code/sdk/python/ap2/tests/receipt_wrapper_tests.py asserts
receipt.root.status == 'Success', and the samples create receipts with
status='Success'
(code/samples/python/src/roles/merchant_payment_processor_agent/tools.py).

Differences

agent_authorization.md receipt schemas / SDK
outcome field result status
values success / error Success / Error
iat not listed required
error_description on error optional required

Impact

An implementer who follows the specification text produces
{"result": "success", ...}, which does not validate against the published
schemas and is not understood by the SDK. Because field names and enum values
must match exactly, two implementations that each follow one of these
definitions cannot read each other's receipts.

Expected

A single definition of the Mandate Receipt. Since the schemas, the SDK, and the
samples already use status with Success / Error, it looks like
agent_authorization.md was not updated. Either:

  • update agent_authorization.md to use status / Success / Error, list
    iat as required, and require error_description when the status is
    "Error", or
  • if result is the intended name, update the schemas and regenerate the SDK.

I understand that specification changes now go through FIDO. I am filing this
here because the schemas and SDK in this repository are affected, and in case it
should be forwarded to the specification work.

Relevant log output

Code of Conduct
  • I agree to follow this project's Code of Conduct
Dominant language
Python
Stars
3.2k
Forks
514
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from google-agentic-commerce/AP2

All issues in google-agentic-commerce/AP2

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.