myTU Docs

API reference

Every endpoint of the myTU API, with its fields, examples and responses.

The myTU API is a REST API with JSON requests and responses. The documentation explains how to combine the endpoints into a working integration; this reference describes each endpoint in detail.

Base URLs

URLUse it for
https://api.gw.mytu.coEvery endpoint, except storing cards.
https://tokens.gw.mytu.coStoring cards in the card vault, for card details you collect yourself. Never send card data to https://api.gw.mytu.co.

The API is only available over HTTPS with TLS 1.2 or newer.

Authentication

Authenticate every request with HTTP Basic authentication. Your project's API key is the username, and the password is empty:

curl https://api.gw.mytu.co/v1/orders/$ORDER_ID/ \
  --user "$API_KEY:"

Keep your API key secret

The API key gives full access to your project. Only use it from your server. Never put it in a browser, mobile app or public repository.

Responses and errors

A 2xx response means myTU accepted your request, not that the payment succeeded: check the status of the order. Rejected requests return an error object with the HTTP status, a type and a short explanation in value.

See API basics for all status codes and error types.

Endpoints