Get Active Mytpe Pay Instances
Retrieves a paginated list of all active Mytpe Pay instances for the authenticated user.
Get Active Mytpe Pay Instances
GET
https://dev.mytpe.app/api/v2/mytpe-pay/activeRetrieves a paginated list of all Mytpe Pay instances with an 'active' status for the authenticated user.
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
const response = await fetch('https://dev.mytpe.app/api/v2/mytpe-pay/active?per_page=10', {
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);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 ActiveInstancesResponse {
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/active?per_page=10', {
method: 'GET',
headers: {
'X-API-KEY': '{your_api_key}',
'X-API-SECRET': '{your_api_secret}',
'Accept': 'application/json'
}
});
const data: ActiveInstancesResponse = await response.json();
console.log(data);import requests
params = {
'per_page': 10
}
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/active',
params=params,
headers=headers
)
data = response.json()
print(data)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/active', [
'per_page' => 10,
]);
$data = $response->json();
dd($data);$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'https://dev.mytpe.app/api/v2/mytpe-pay/active?per_page=10',
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);const axios = require('axios');
axios.get('https://dev.mytpe.app/api/v2/mytpe-pay/active', {
params: {
per_page: 10
},
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": "Active instances retrieved successfully",
"data": {
"current_page": 1,
"data": [
{
"id": "instance-123",
"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"
}
},
{
"id": "instance-456",
"name": "Sample Instance",
"description": "Another dummy instance.",
"logo": null,
"application_id": "app-abc",
"status": "active",
"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"
}
}
],
"first_page_url": "https://dev.mytpe.app/api/v2/mytpe-pay/active?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://dev.mytpe.app/api/v2/mytpe-pay/active?page=1",
"links": [
{
"url": null,
"label": "\u00ab Previous",
"active": false
},
{
"url": "https://dev.mytpe.app/api/v2/mytpe-pay/active?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/active",
"per_page": 10,
"prev_page_url": null,
"to": 2,
"total": 2
}
}Response Fields
Instance Object
Each instance in the data array contains:
Prop
Type
Active Instances Only
This endpoint returns only instances with status: "active". These are the instances that can generate payment links and accept payments. Note that the brand object is not included in the active instances response.
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 useful for:
- Instance Selector Dropdown: Populate a dropdown with only operational instances
- Payment Link Creation: Get available instances before creating a new payment link
- Quick Status Check: Verify which instances are currently operational
- Dashboard Overview: Display active payment terminals
When to Use This vs List All
Use this endpoint when you only need operational instances (e.g., for creating payment links). Use the /api/v2/mytpe-pay/ endpoint when you need to see all instances including pending or inactive ones.