MyTPEMyTPE Pay
Mytpe Pay

List Own Mytpe Pay Instances

Retrieves a paginated list of Mytpe Pay instances owned by the authenticated user, with filtering options.

List Own Mytpe Pay Instances

GET https://dev.mytpe.app/api/v2/mytpe-pay/

Retrieves a paginated list of Mytpe Pay instances owned by the authenticated user. Various query parameters can be used to filter the results.

Authentication

Authentication: API Key (X-API-KEY + X-API-SECRET headers)

This endpoint requires authentication using X-API-KEY and X-API-SECRET headers.

X-API-KEY: {your_api_key}
X-API-SECRET: {your_api_secret}

Request Parameters

Query Parameters

Prop

Type

Example Request

list-instances.js
const response = await fetch('https://dev.mytpe.app/api/v2/mytpe-pay/?per_page=10&page=1', {
  method: 'GET',
  headers: {
    'X-API-KEY': '{your_api_key}',
    'X-API-SECRET': '{your_api_secret}',
    'Accept': 'application/json'
  }
});

const data = await response.json();
console.log(data);
list-instances.ts
interface MytpePayInstance {
  id: string;
  name: string;
  description: string | null;
  logo: string | null;
  application_id: string;
  status: string;
  registre_commerce_id: string;
  bank_account_id: string;
  brand_id: string;
  user_id: string;
  created_at: string;
  updated_at: string;
}

interface ListInstancesResponse {
  success: boolean;
  message: string;
  data: {
    current_page: number;
    data: MytpePayInstance[];
    per_page: number;
    total: number;
  };
}

const response = await fetch('https://dev.mytpe.app/api/v2/mytpe-pay/?per_page=10&page=1', {
  method: 'GET',
  headers: {
    'X-API-KEY': '{your_api_key}',
    'X-API-SECRET': '{your_api_secret}',
    'Accept': 'application/json'
  }
});

const data: ListInstancesResponse = await response.json();
console.log(data);
list_instances.py
import requests

params = {
    'per_page': 10,
    'page': 1
}

headers = {
    'X-API-KEY': '{your_api_key}',
    'X-API-SECRET': '{your_api_secret}',
    'Accept': 'application/json'
}

response = requests.get(
    'https://dev.mytpe.app/api/v2/mytpe-pay/',
    params=params,
    headers=headers
)

data = response.json()
print(data)
ListInstances.php
use Illuminate\Support\Facades\Http;

$response = Http::withHeaders([
    'X-API-KEY' => '{your_api_key}',
    'X-API-SECRET' => '{your_api_secret}',
    'Accept' => 'application/json',
])->get('https://dev.mytpe.app/api/v2/mytpe-pay/', [
    'per_page' => 10,
    'page' => 1,
]);

$data = $response->json();
dd($data);
list-instances.php
$ch = curl_init();

curl_setopt_array($ch, [
    CURLOPT_URL => 'https://dev.mytpe.app/api/v2/mytpe-pay/?per_page=10&page=1',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'X-API-KEY: {your_api_key}',
        'X-API-SECRET: {your_api_secret}',
        'Accept: application/json',
    ],
]);

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
print_r($data);
list-instances.cjs
const axios = require('axios');

axios.get('https://dev.mytpe.app/api/v2/mytpe-pay/', {
  params: {
    per_page: 10,
    page: 1
  },
  headers: {
    'X-API-KEY': '{your_api_key}',
    'X-API-SECRET': '{your_api_secret}',
    'Accept': 'application/json'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error.response?.data || error.message);
});

Example Success Response

200 OK

{
  "success": true,
  "message": "Instances retrieved successfully",
  "data": {
    "current_page": 1,
    "data": [
      {
        "id": "instance-001",
        "name": "Demo Instance",
        "description": "This is a dummy instance.",
        "logo": "dummy/logo/path.png",
        "application_id": "app-xyz",
        "status": "active",
        "registre_commerce_id": "rc-001",
        "bank_account_id": "ba-001",
        "brand_id": "brand-001",
        "user_id": "user-001",
        "created_at": "2026-01-01T00:00:00.000Z",
        "updated_at": "2026-01-01T00:00:00.000Z",
        "registre_commerce": {
          "id": "rc-001",
          "raison_sociale": "Dummy Company",
          "file_url": "dummy/file/url.pdf"
        },
        "bank_account": {
          "id": "ba-001",
          "rib": "00000000000000000000"
        },
        "brand": {
          "id": "brand-001",
          "name": "Dummy Brand"
        }
      },
      {
        "id": "instance-002",
        "name": "Sample Instance",
        "description": "Another dummy instance.",
        "logo": null,
        "application_id": "app-abc",
        "status": "pending",
        "registre_commerce_id": "rc-002",
        "bank_account_id": "ba-002",
        "brand_id": "brand-002",
        "user_id": "user-002",
        "created_at": "2026-01-02T00:00:00.000Z",
        "updated_at": "2026-01-02T00:00:00.000Z",
        "registre_commerce": {
          "id": "rc-002",
          "raison_sociale": "Sample Company",
          "file_url": null
        },
        "bank_account": {
          "id": "ba-002",
          "rib": "11111111111111111111"
        },
        "brand": {
          "id": "brand-002",
          "name": "Sample Brand"
        }
      }
    ],
    "first_page_url": "https://dev.mytpe.app/api/v2/mytpe-pay?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://dev.mytpe.app/api/v2/mytpe-pay?page=1",
    "links": [
      {
        "url": null,
        "label": "\u00ab Previous",
        "active": false
      },
      {
        "url": "https://dev.mytpe.app/api/v2/mytpe-pay?page=1",
        "label": "1",
        "active": true
      },
      {
        "url": null,
        "label": "Next \u00bb",
        "active": false
      }
    ],
    "next_page_url": null,
    "path": "https://dev.mytpe.app/api/v2/mytpe-pay",
    "per_page": 10,
    "prev_page_url": null,
    "to": 2,
    "total": 2
  }
}

Response Fields

Instance Object

Each instance in the data array contains:

Prop

Type

Instance Status

Only active instances can generate payment links and accept payments. Instances must go through compliance verification before becoming active.

Error Responses

401 Authentication Failed

{
    "errors": [
        {
            "status": "401",
            "code": "API_KEY_INVALID",
            "title": "Invalid API key",
            "detail": "Authentication failed. Please check your API credentials."
        }
    ]
}

Use Cases

This endpoint is essential for:

  • Instance Management Dashboard: Display all instances in your account
  • Multi-Store Integration: Map each instance to stores/branches in your system
  • Status Monitoring: Track which instances are active and operational
  • Compliance Tracking: Monitor pending instances awaiting approval

Integration Best Practice

Store the id of each instance in your database alongside your store/branch records. This mapping is crucial for creating payment links for the correct business unit.

On this page