Payment Link Redirection

Overview

The redirect_url query parameter allows external integrators to redirect users back
to their application after completing or cancelling a payment.

Usage

Append redirect_url to any v3 payment link:

https://your-domain.kirafin.ai/v3/{txn_uuid}?redirect_url=https://example.com/callback

Behavior

EventRedirect URL
Payment success (card)https://example.com/callback?status=success
Barcode generated (cash)https://example.com/callback?status=success
User cancels flowhttps://example.com/callback?status=cancelled

Note: Success redirects require the user to click "Done" button. Cancelled redirects
happen automatically when the user confirms exit.

URL Requirements

  • Must be a valid URL format
  • Must use the https:// protocol

Invalid URLs are silently ignored—the flow continues normally without redirect.

Example Integration

// Link URL format: https://your-domain.kirafin.ai/v3/{txn_uuid}
const linkUrl = 'https://your-domain.kirafin.ai/v3/98cd2a4b-37c7-45d9-859e-1902300431ac'

// Generate payment link with redirect
const paymentUrl = `${baseUrl}?redirect_url=${encodeURIComponent('https://myapp.com/payment-complete')}`                                                           

// Handle callback in your app
const urlParams = new URLSearchParams(window.location.search)
const status = urlParams.get('status') // 'success' or 'cancelled'

if (status === 'success') {
  // Payment completed
} else if (status === 'cancelled') {
  // User cancelled
}