Payment Links

Create and verify customer-specific and reusable payment links.

Two namespaces, because the two link types behave differently. See the Payment Links and General Payment Links guides for when to use each.

kyshi.paymentLinks

One customer, one amount.

MethodEndpoint
create(params, options?)POST /v1/pay/initialize
verify(code, options?)GET /v1/pay/verify-api/{code}
verifyPublic(code, options?)Public verification for a hosted page
verifyReceipt(reference, options?)Receipt lookup by reference
const link = await kyshi.paymentLinks.create({
  email: '[email protected]',
  amount: 25000,
  localCurrency: 'NGN',
  amountCurrency: 'local',
  reference: 'INV-2045',
});

await sendToCustomer(link.paymentLink.url);
const result = await kyshi.paymentLinks.verify(link.code);
if (result.status === 'SUCCESS') await fulfilOnce('INV-2045');

OPENED means the customer loaded the page. It is not a payment.

kyshi.generalPaymentLinks

One link, many payers, currency chosen at checkout.

MethodEndpoint
create(params, options?)POST /v1/pay/general
verify(code, options?)GET /v1/pay/general/verify/{code}
checkout(code, params, options?)POST /v1/pay/general/verify/{code}
const link = await kyshi.generalPaymentLinks.create({
  name: 'Conference ticket',
  amount: 50,
  amountCurrency: 'settlement',
});

// When a customer opens it — re-verify rather than caching currencies.
const details = await kyshi.generalPaymentLinks.verify(link.code);

// Then start their payment.
const session = await kyshi.generalPaymentLinks.checkout(link.code, {
  email: '[email protected]',
  localCurrency: 'NGN',
});

Each payment through a general link is its own transaction. Reconcile per transaction, not per link.

Next


Did this page help you?