MyTPE is getting a fresh new look! A simpler, faster platform is on the way. Learn more →
MyTPEMyTPE Pay
Pay Links

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

get-pay-link-details.js
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);
get-pay-link-details.ts
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;
    udfs: Record<string, { value: string; label?: string }> | null; // udf1–udf5
    inactivity_timeout_minutes: number | null; // per-link override
    effective_inactivity_timeout_minutes: number | null; // resolved value (link → instance fallback)
    inactivity_timeout_source: 'link' | 'instance' | null;
    last_activity_at: string | null; // ISO 8601, latest successful payment or creation
  };
}

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);
get_pay_link_details.py
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)
GetPayLinkDetailsController.php
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();
get-pay-link-details.php
<?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;
get-pay-link-details.cjs
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"
        },
        "udfs": {
            "udf1": { "value": "INV2026001", "label": "Invoice Number" },
            "udf2": { "value": "John Doe", "label": "Customer Name" }
        },
        "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",
        "inactivity_timeout_minutes": null,
        "effective_inactivity_timeout_minutes": 2880,
        "inactivity_timeout_source": "instance",
        "last_activity_at": "2026-01-17T07:43:30.000000Z"
    }
}

Response Fields

Prop

Type

Understanding Link Types

  • Dynamic links: Have a fixed amount that customers must pay.
  • Static links: Allow customers to enter their own amount. The amount field shows a suggested/base value.
  • The collected_amount field shows total revenue from successful payments only.

Link Status vs Payment Status

  • status: The operational state of the link (active, inactive, closed, expired)
  • payment_status: The payment state that helps you understand WHY a link is closed:
    • paid / fully_paid = Closed because payment(s) were received
    • expired = Auto-closed by the inactivity sweeper (no successful payment within effective_inactivity_timeout_minutes)
    • awaiting_payment = Active and waiting for payments

For one-shot invoices, check if payment_status is paid (invoice paid) vs expired (no payment within the configured inactivity window — see effective_inactivity_timeout_minutes for that link's actual deadline).

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.

On this page