Payment Links
Use payment links when you want to create a checkout link that can be shared with a customer.
Customer-Specific Payment Link
const link = await kyshi.paymentLinks.create({
customer: { email: '[email protected]' },
expiresAt: '2026-12-31T23:59:59Z',
localCurrency: 'NGN',
description: 'Invoice INV-10001',
metadata: [{ name: 'Invoice', amount: 1000, quantity: 1 }],
});Verify Payment Link
const paymentLink = await kyshi.paymentLinks.verify('payment-link-code');Verify Receipt
const transaction = await kyshi.paymentLinks.verifyReceipt('ORDER-10001');General Payment Links
Use general payment links for reusable links that customers can check out from.
const generalLink = await kyshi.generalPaymentLinks.create({
metadata: [{ name: 'Consulting', amount: 2500, quantity: 1 }],
});
const verified = await kyshi.generalPaymentLinks.verify('general-link-code');
const checkout = await kyshi.generalPaymentLinks.checkout('general-link-code', {
localCurrency: 'NGN',
customer: { email: '[email protected]' },
});Methods
| Method | Description |
|---|---|
kyshi.paymentLinks.create(params) | Create a customer-specific payment link. |
kyshi.paymentLinks.verify(code) | Verify a payment link through the authenticated API route. |
kyshi.paymentLinks.verifyPublic(code) | Verify a payment link through the public route. |
kyshi.paymentLinks.verifyReceipt(reference) | Verify a payment receipt by transaction reference. |
kyshi.generalPaymentLinks.create(params) | Create a reusable payment link. |
kyshi.generalPaymentLinks.verify(code) | Verify a reusable payment link. |
kyshi.generalPaymentLinks.checkout(code, params) | Start checkout for a reusable payment link. |
For exact API fields and response schemas, see Reference > Payment Links and Reference > General Payment Links.
