API reference
API reference
Base URL, authentication, conventions, and the list of external API resources.
The MyTPE Pay external API is a REST API over HTTPS. It uses resource‑oriented URLs, returns JSON, and authenticates with an API key + secret pair.
| Base URL | https://api.mytpe.appp/api/ext |
| Local dev | http://localhost:8010/api/ext |
| Auth | X-Api-Key + X-Api-Secret headers (details) |
| Format | JSON request and response bodies; multipart/form-data for uploads |
| IDs | UUID strings |
| Money | Decimal strings (e.g. "4500.00"), currency DZD unless noted |
Conventions
- Responses are wrapped in a
dataenvelope; lists are paginated withlinksandmeta. See Responses. - Errors use a consistent shape:
{ "error": "CODE", "message": "..." }. Validation errors (422) add a Laravel‑styleerrorsmap. See Responses → Errors. - Statuses & enums for every resource (KYC, instances, links, transactions, webhooks) are centralised in Statuses & enums. Each API page links to its relevant statuses.
Resources
| Resource | Use it to |
|---|---|
| Authentication | Manage and send API credentials. |
| Identifications | Manage your KYC dossier. |
| Brands | Manage customer‑facing brand identities. |
| Bank accounts | Manage settlement RIBs. |
| Payment instances | Request and manage virtual TPEs. |
| Payment links | Create and control shareable payment URLs. |
| Forms | Build forms collected at checkout. |
| Webhooks | Subscribe to real‑time events. |
All endpoints are scoped to the trader that owns the API key. You can only read and modify your own
resources; requesting another trader's resource returns 404.