Get Pay Link Details
Retrieve the details of a specific payment link.
GET
https://dev.mytpe.app/api/v2/mytpe-pay/links/{id}Retrieves the details of a specific payment link by its unique ID.
Authentication: API Key (X-API-KEY + X-API-SECRET headers)
This API requires authentication via X-API-KEY and X-API-SECRET headers.
Path Parameters
Prop
Type
Example Request
const linkId = 'd5bb42f0-3a50-4c78-aba6-4e66ac7750af';
const response = await fetch(
`https://dev.mytpe.app/api/v2/mytpe-pay/links/${linkId}`,
{
method: 'GET',
headers: {
'X-API-KEY': 'your_api_key',
'X-API-SECRET': 'your_api_secret',
},
}
);
const data = await response.json();
console.log(data);interface PayLinkDetails {
success: boolean;
message: string;
data: {
id: string;
mytpe_pay_id: string;
title: string;
details: string;
slug: string;
type: string;
amount: string;
status: string;
payment_mode: string;
max_payments: number | null;
successful_payments_count: number;
payment_link: string;
payment_status: string;
remaining_payments: number | null;
collected_amount: string;
};
}
const linkId = 'd5bb42f0-3a50-4c78-aba6-4e66ac7750af';
const response = await fetch(
`https://dev.mytpe.app/api/v2/mytpe-pay/links/${linkId}`,
{
method: 'GET',
headers: {
'X-API-KEY': 'your_api_key',
'X-API-SECRET': 'your_api_secret',
},
}
);
const data: PayLinkDetails = await response.json();
console.log(data);import requests
link_id = 'd5bb42f0-3a50-4c78-aba6-4e66ac7750af'
headers = {
'X-API-KEY': 'your_api_key',
'X-API-SECRET': 'your_api_secret',
}
response = requests.get(
f'https://dev.mytpe.app/api/v2/mytpe-pay/links/{link_id}',
headers=headers,
)
data = response.json()
print(data)use Illuminate\Support\Facades\Http;
$linkId = 'd5bb42f0-3a50-4c78-aba6-4e66ac7750af';
$response = Http::withHeaders([
'X-API-KEY' => 'your_api_key',
'X-API-SECRET' => 'your_api_secret',
])->get("https://dev.mytpe.app/api/v2/mytpe-pay/links/{$linkId}");
$data = $response->json();<?php
$linkId = 'd5bb42f0-3a50-4c78-aba6-4e66ac7750af';
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://dev.mytpe.app/api/v2/mytpe-pay/links/{$linkId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'X-API-KEY: your_api_key',
'X-API-SECRET: your_api_secret',
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;const axios = require('axios');
const linkId = 'd5bb42f0-3a50-4c78-aba6-4e66ac7750af';
axios.get(`https://dev.mytpe.app/api/v2/mytpe-pay/links/${linkId}`, {
headers: {
'X-API-KEY': 'your_api_key',
'X-API-SECRET': 'your_api_secret',
},
})
.then(response => console.log(response.data))
.catch(error => console.error(error.response?.data));Example Success Response (200 OK)
200 OK
{
"success": true,
"message": "Pay link details retrieved successfully",
"data": {
"id": "d5bb42f0-3a50-4c78-aba6-4e66ac7750af",
"mytpe_pay_id": "00ded387-5dbd-412b-b619-90b0e86d416f",
"title": "Testing",
"details": "A detailed description of the awesome product.",
"logo": null,
"slug": "awesome-product-unique-slug",
"type": "dynamic",
"amount": "100.00",
"status": "active",
"payment_mode": "reusable",
"max_payments": null,
"successful_payments_count": 0,
"metadata": {
"internal_reference": "ORD-12345"
},
"created_at": "2026-01-17T07:43:30.000000Z",
"updated_at": "2026-01-17T07:43:30.000000Z",
"payment_link": "https://frontdev.mytpe.app/pay/awesome-product-unique-slug",
"payment_status": "active",
"remaining_payments": null,
"collected_amount": "0.00"
}
}Response Fields
Prop
Type
Understanding Link Types
- Dynamic links: Have a fixed
amountthat customers must pay. - Static links: Allow customers to enter their own amount. The
amountfield shows a suggested/base value. - The
collected_amountfield shows total revenue from successful payments only.
Link Status vs Payment Status
status: The operational state of the link (active, inactive, closed)payment_status: The payment state that helps you understand WHY a link is closed:paid/fully_paid= Closed because payment(s) were receivedexpired= Closed due to 48h timeout without paymentawaiting_payment= Active and waiting for payments
For one-shot invoices, check if payment_status is paid (invoice paid) vs expired (invoice not paid after 48h).
Error Responses
401 Unauthorized
{
"message": "Unauthenticated."
}404 Not Found
{
"success": false,
"message": "PAY_LINK_NOT_FOUND",
"code": 404
}Use Cases
This endpoint is useful for:
- Link Details Page: Display complete information about a specific payment link
- Order Verification: Check link status and payment status before displaying checkout
- Performance Tracking: Monitor successful payments and collected amounts
- Integration Sync: Retrieve link details to sync with your ERP/CMS
- Invoice Status: Check if a one-shot invoice has been paid or expired
Monitoring Link Performance
Use the successful_payments_count and collected_amount fields to track revenue and conversion. The payment_status field gives you instant insight into whether payments have been received or if the link expired. For detailed transaction history, use the /api/v2/mytpe-pay/links/{id}/transactions endpoint.