Get Payment Link
Retrieve the details of a static Payment Link, including product information and supported payment tokens. This is typically the entry point for the AI payment flow.
GET /payment/link/:linkId
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
linkId | String | ✅ | The unique identifier of the payment link (e.g., lnk_...). Passed as a path parameter. |
Response Structure
The response includes the link details and an aiView object that describes the available payment options (supportedPaymentTokens) and the requirements for creating a session.
Response Example
{
"merchantId": "f7d65b193454db...",
"linkId": "lnk_example_premium_plan_01",
"linkVersion": "ver_example_03",
"linkName": "Premium Membership",
"lineItems": [
{
"quantity": 1,
"productData": {
"productName": "Premium Plan",
"productDescription": "Unlock all features",
"imageUrl": "https://example.com/image.png",
"attributes": [
{ "name": "Duration", "value": "1 Month" }
]
},
"unitPriceInUSD": "1.00"
}
],
"aiView": {
"pricingModel": {
"type": "fixed"
},
"supportedPaymentTokens": [
{
"chainName": "Polygon",
"chainId": "137",
"tokenAddress": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
"name": "USD Coin",
"symbol": "USDC",
"decimals": 6,
"amountInToken": "3009000",
"amountInUSD": "3.00"
}
],
"createPaymentSessionRequirement": {
"authorizationRequired": true,
"authorizationSpec": {
"type": "eip712",
"purpose": "create_payment_session",
"domain": {
"name": "aipay.gstable.io",
"version": "1",
"chainId": "<payment_chain_id>"
},
"types": {
"PaymentSessionCreationAuthorization": [
{ "name": "purpose", "type": "string" },
{ "name": "linkId", "type": "string" },
{ "name": "linkVersion", "type": "string" },
{ "name": "merchantId", "type": "string" },
{ "name": "payer", "type": "address" },
{ "name": "paymentChainId", "type": "uint256" },
{ "name": "paymentToken", "type": "address" },
{ "name": "amount", "type": "uint256" },
{ "name": "authorizationNonce", "type": "bytes32" },
{ "name": "authorizationExpiresAt", "type": "uint256" }
]
}
}
}
}
}
Note: The
createPaymentSessionRequirementin theaiViewprovides the exact EIP-712 type definition needed for the Create Session endpoint.
Error Handling
This endpoint follows the Unified Error Handling standard. Business errors return HTTP 200 with a non-zero code.