Your flow

  1. Create the Invoice

    Use the Create Invoice API method to generate a TON/USDT invoice.

  2. Redirect the User

    Redirect the user to the deeplink provided in the API response.

  3. Receive the Payment Notification

    Once the user completes payment, your webhook server will receive a POST request containing:

API

Endpoint: https://pay.mytonwallet.io/api/v1

Authentication

You must use your API key for requests. Pass it in the X-Project-Api-Key header in each request.

Response format

All responses are either:

{
    "ok": true,
    "result": {...}
}

or

{
    "ok": false,
    "error": "Error Type (string)",
    "message": "Optional error message (string)",
    "details": "Optional validation errors info (array)"
}

Below the documentation we will display successful responses, which will actually be in the result key if the request is successful.

Optional keys in the success response schema are either null or the described type. Optional request schema fields can be sent as null or be omitted.

Methods

Create Invoice

POST /api/v1/invoices

Request Body: