# 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":["null","object"],"additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}}}
```
