Payment Sessions

Payment Links

Short, shareable URLs for easy payment collection

Every session gets two URLs for sharing: a full checkout URL and a short payment link. Short links are easier to share via SMS, WhatsApp, or print.


TypeExampleUse Case
Full Checkoutsnippe.me/checkout/W0SzdUSHQmDirect embedding, apps
Short Linksnippe.me/p/Ax7kM2SMS, WhatsApp, print, sharing

Session Response

When you create a session, both URLs are included:

{
  "code": 201,
  "data": {
    "reference": "sess_abc123def456",
    "checkout_url": "https://snippe.me/checkout/W0SzdUSHQm",
    "short_code": "Ax7kM2",
    "payment_link_url": "https://snippe.me/p/Ax7kM2"
  }
}
FieldDescription
checkout_urlFull checkout URL with unique token
short_codeShort code for payment links
payment_link_urlComplete short payment link URL

GET /p/:code

Returns a 302 redirect to the full checkout URL:

302 → https://snippe.me/checkout/:token

Usage

Redirect your customers to either checkout_url or payment_link_url. They complete payment on Snippe's hosted checkout page, then get redirected back to your redirect_url.

// After creating a session
const session = await createSession({
  amount: 50000,
  redirect_url: "https://yoursite.com/order/complete",
});

// Redirect customer to payment
window.location.href = session.payment_link_url;

Or share the link directly:

Your payment link: https://snippe.me/p/Ax7kM2

Best Practices

Short links are easier to share via SMS, WhatsApp, or in printed materials.

Always Set redirect_url

Configure redirect_url when creating the session so customers return to your site after payment.

Configure Webhooks

Don't rely solely on redirects. Use webhooks to confirm payment status server-side.

On this page