Mytpe Pay
Delete Mytpe Pay Instance
Deletes a specific Mytpe Pay instance by its ID.
Delete Mytpe Pay Instance
DELETE
https://dev.mytpe.app/api/v2/mytpe-pay/{id}Permanently deletes a Mytpe Pay instance. This action cannot be undone.
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
Path Parameters
Prop
Type
Destructive Action
This action is irreversible. Once an instance is deleted, all associated data, including payment links and transaction history, will be permanently lost.
Example Request
const instanceId = 'INSTANCE_ID';
const response = await fetch(`https://dev.mytpe.app/api/v2/mytpe-pay/${instanceId}`, {
method: 'DELETE',
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 DeleteInstanceResponse {
success: boolean;
message: string;
data: {
deleted: boolean;
};
}
const instanceId = 'INSTANCE_ID';
const response = await fetch(`https://dev.mytpe.app/api/v2/mytpe-pay/${instanceId}`, {
method: 'DELETE',
headers: {
'X-API-KEY': '{your_api_key}',
'X-API-SECRET': '{your_api_secret}',
'Accept': 'application/json'
}
});
const data: DeleteInstanceResponse = await response.json();
console.log(data);import requests
instance_id = 'INSTANCE_ID'
headers = {
'X-API-KEY': '{your_api_key}',
'X-API-SECRET': '{your_api_secret}',
'Accept': 'application/json'
}
response = requests.delete(
f'https://dev.mytpe.app/api/v2/mytpe-pay/{instance_id}',
headers=headers
)
data = response.json()
print(data)use Illuminate\Support\Facades\Http;
$instanceId = 'INSTANCE_ID';
$response = Http::withHeaders([
'X-API-KEY' => '{your_api_key}',
'X-API-SECRET' => '{your_api_secret}',
'Accept' => 'application/json',
])->delete("https://dev.mytpe.app/api/v2/mytpe-pay/{$instanceId}");
$data = $response->json();
dd($data);$instanceId = 'INSTANCE_ID';
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://dev.mytpe.app/api/v2/mytpe-pay/{$instanceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
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');
const instanceId = 'INSTANCE_ID';
axios.delete(`https://dev.mytpe.app/api/v2/mytpe-pay/${instanceId}`, {
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": "MytpePay instance deleted successfully",
"data": {
"deleted": true
}
}Error Responses
401 Authentication Failed
{
"errors": [
{
"status": "401",
"code": "API_KEY_INVALID",
"title": "Invalid API key",
"detail": "Authentication failed. Please check your API credentials."
}
]
}404 Not Found
{
"errors": [
{
"status": "404",
"code": "NOT_FOUND",
"title": "MytpePay instance not found",
"detail": "The specified MytpePay instance does not exist or you do not have access to it"
}
]
}