Pay By Link
Pay By Link lets you collect payments without building a checkout flow. Generate a payment link, share the URL with your customer, and receive a webhook when they pay - no frontend code required.
Before you begin
You'll need:
• A Teya account
• Access to the Staging Business Portal (for API integration)
• Your Client ID and Client Secret (obtained during credential setup)
• A Teya account
• Access to the Staging Business Portal (for API integration)
• Your Client ID and Client Secret (obtained during credential setup)
Choose your integration
Compare approaches
| App / Portal | API | |
|---|---|---|
| Code required | None | Backend only |
| Integration effort | None | Minimal |
| Automation | Manual | Fully automated |
| Bulk creation | One at a time | Programmatic |
| Best for | Small businesses, ad-hoc invoicing | E-commerce platforms, automated billing |
Not sure which to choose?
If you're a developer building an automated workflow, go with the API.
If you just need to send payment requests manually, use the App / Portal.
If you just need to send payment requests manually, use the App / Portal.
Customization
You can customize the look and feel of your payment links, including branding and display options. See Customize Pay By Link for details.
Related
- Webhooks - Set up webhooks to receive payment notifications
- App / Portal - Create payment links without writing code
- API - Create payment links programmatically
- Customize - Branding and customization options for your payment links
Try it live - Create a Payment Link
This will create a real payment link in the Staging environment. You'll need valid Staging credentials before proceeding.
Staging endpoints shown below
Before going live, swap:
•
•
•
api.teya.xyz → api.teya.com•
id.teya.xyz → id.teya.com
Node.js example — staging
// 1. Get an access token
const tokenRes = await fetch('https://id.teya.xyz/oauth/v2/oauth-token', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'Teya-JS-Client/1.0',
},
body: new URLSearchParams({
grant_type: 'client_credentials',
client_id: process.env.TEYA_CLIENT_ID,
client_secret: process.env.TEYA_CLIENT_SECRET,
scope: 'payment-links/create payment-links/id/get payment-links/id/update',
}),
});
const { access_token } = await tokenRes.json();
// 2. Create link
const apiRes = await fetch('https://api.teya.xyz/v2/payment-links', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'User-Agent': 'Teya-JS-Client/1.0',
Authorization: `Bearer ${access_token}`,
},
body: JSON.stringify({
"store_id": "YOUR_STORE_ID",
"amount": {
"currency": "GBP",
"value": 2500
}
}), // Smallest currency unit - 2500 = £25.00
});
const data = await apiRes.json();