> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/transit-digitization/integrate-d1-transit-api/api-reference/inbound-api-to-d1-transit/notification-api.md).

# Notification API

### Download OpenAPI specification

[D1-Transit-API-IN-Notification-oas3.yaml](https://openapi.gitbook.com/o/fwy1mtbRONGA2YDKDBr0/spec/D1-Transit-API-IN-Notification-oas3.yaml)

## Handle Event

> API used by Transit Issuer to trigger events:\
> \<li>notify transactions (purchase, rides...)\
> \<li>balance updates\
> \<li>count updates\
> \<li>fare products updates\
> \<li>update and retrieve bundle data\
> \<li>notify messages (alerts, promotions...)<br>

```json
{"openapi":"3.1.0","info":{"title":"D1 Transit Notification Inbound API","version":"1.0"},"servers":[{"url":"https://THALES-PROD/d1/transit/notification/api/v1","description":"Prod URL"},{"url":"https://THALES-STG/d1/transit/notification/api/v1","description":"Staging URL"}],"paths":{"/issuers/{issuerId}/wallets/{walletIndicator}/events/{eventType}/handleEvent":{"post":{"summary":"Handle Event","description":"API used by Transit Issuer to trigger events:\n<li>notify transactions (purchase, rides...)\n<li>balance updates\n<li>count updates\n<li>fare products updates\n<li>update and retrieve bundle data\n<li>notify messages (alerts, promotions...)\n","operationId":"handleEvent","parameters":[{"$ref":"#/components/parameters/eventType"},{"$ref":"#/components/parameters/issuerId"},{"$ref":"#/components/parameters/walletIndicator"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandleEventReq"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandleEventRes"}}}},"500":{"$ref":"#/components/responses/error500"},"503":{"$ref":"#/components/responses/error503"}}}}},"components":{"parameters":{"eventType":{"name":"eventType","in":"path","description":"Indicates the type of event to be handled.<br/>Value can be:\n|Value|Description|\n|---|---|\n|transaction|Used to notify a transaction.|\n|message|Used to notify a message.| \n|update_balance|Used to notify balance update.|            \n|update_count|Used to notify count update of a count based fare product.|\n|update_fare_products|Used to update fare products (e.g. purchase of a new product, removal or renewal).|\n|update_bundle_data|Used to notify that a digital card bundle shall be updated.|\n|retrieve_bundle_data|Used to notify that digital card bundle data shall be retrieved.|              ","required":true,"schema":{"type":"string"}},"issuerId":{"name":"issuerId","in":"path","description":"Issuer unique identifier. Assigned by Thales during onboarding.","required":true,"schema":{"type":"string","maxLength":10}},"walletIndicator":{"name":"walletIndicator","in":"path","description":"Indicates which digital wallet is involved in the use case.\n|Value|Description|\n|---|---|\n|1|Apple|\n|2|Google|\n|3|Samsung|        ","required":true,"schema":{"type":"number"}}},"schemas":{"HandleEventReq":{"type":"object","properties":{"requestContext":{"$ref":"#/components/schemas/requestContext"},"digitalCardId":{"$ref":"#/components/schemas/digitalCardId"},"cardAccountId":{"$ref":"#/components/schemas/cardAccountId"},"eventTime":{"type":"string","description":"The event time","format":"date-time"}},"required":["requestContext","cardAccountId","eventTime"]},"requestContext":{"type":"object","properties":{"requestId":{"type":"string","description":"Request unique identifier. Should be different for every retry.","maxLength":64},"correlationId":{"type":"string","description":"Random identifier which can be used to correlate the different API calls done as part of a usecase.\nThere is no strong guarantee of the uniqueness of this identifier, so it should not be used for purposes other than logging and troubleshooting.","maxLength":64}},"required":["requestId","correlationId"]},"digitalCardId":{"type":"string","description":"Digital card unique identifier","maxLength":64},"cardAccountId":{"type":"string","description":"Card account unique identifier","maxLength":64},"HandleEventRes":{"type":"object","properties":{"responseContext":{"$ref":"#/components/schemas/responseContext"}},"required":["responseContext"]},"responseContext":{"type":"object","description":"Should be used for most of responses, even if the request processing was not successful.\nIf there was an issue encountered during request processing, the statusCode and statusMessage are used to give more details about what has gone wrong.\n","properties":{"requestId":{"type":"string","description":"requestId value from the corresponding request.","maxLength":64},"statusCode":{"type":"number"},"statusMessage":{"type":"string"}},"required":["requestId","statusCode"]}},"responses":{"error500":{"description":"An unexpected error occurred while processing the request.<br/>\nThe request cannot be retried.<br/>\nOnly used in cases where it's not be possible to provide more information about what went wrong with the request (i.e. return <b>HTTP 200</b> with '<b>responseContext</b>').\n"},"error503":{"description":"Indicates that the system is unavailable.<br/>\nThe request can be retried.\n"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.payments.thalescloud.io/transit-digitization/integrate-d1-transit-api/api-reference/inbound-api-to-d1-transit/notification-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
