# Receipt

## Download receipt as PDF

> Retrieves a transaction receipt in PDF format using a secure signed token.\
> \
> \## Token-Based Security\
> The token is a JWT containing:\
> \- \*\*receiptProvider\*\*: Source system identifier (e.g., "cegid", "shopify")\
> \- \*\*receiptNumber\*\*: Transaction/receipt identifier\
> \- \*\*storeId\*\*: Optional store context\
> \
> \## Receipt Providers\
> System supports multiple providers:\
> \- POS system integrations\
> \- E-commerce platforms\
> \- Custom receipt generators\
> \
> \## Token Generation\
> Tokens must be generated server-side using the security token generator with appropriate claims.\
> \
> \## Use Cases\
> \- Email receipt links\
> \- Customer portal receipt downloads\
> \- Embedded receipts in passes\
> \- Order history displays\
> \
> \## Security\
> \- Tokens are time-limited and signed\
> \- Cannot be forged or tampered with\
> \- Single-use recommended for sensitive transactions

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Receipt"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"paths":{"/api/{tenantId}/receipts/{token}/pdf":{"get":{"tags":["Receipt"],"summary":"Download receipt as PDF","description":"Retrieves a transaction receipt in PDF format using a secure signed token.\n\n## Token-Based Security\nThe token is a JWT containing:\n- **receiptProvider**: Source system identifier (e.g., \"cegid\", \"shopify\")\n- **receiptNumber**: Transaction/receipt identifier\n- **storeId**: Optional store context\n\n## Receipt Providers\nSystem supports multiple providers:\n- POS system integrations\n- E-commerce platforms\n- Custom receipt generators\n\n## Token Generation\nTokens must be generated server-side using the security token generator with appropriate claims.\n\n## Use Cases\n- Email receipt links\n- Customer portal receipt downloads\n- Embedded receipts in passes\n- Order history displays\n\n## Security\n- Tokens are time-limited and signed\n- Cannot be forged or tampered with\n- Single-use recommended for sensitive transactions","parameters":[{"name":"token","in":"path","description":"JWT containing receiptProvider, receiptNumber, and optional storeId claims.","required":true,"schema":{"type":"string"}},{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Receipt PDF returned","content":{"text/plain":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"string","format":"binary"}},"text/json":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid or malformed token","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"Receipt number missing or not found","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"500":{"description":"Internal server error while generating receipt"}}}}},"components":{"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.thewalletcrew.io/docs/fr/developper/api-reference/internal/receipt.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
