Skip to main content
Version: 1.0.0

Sessions

A session is a backend-only alternative to the Hosted Payment Page. Your backend calls the Merchant API to get a checkout URL, and you show that page to the customer yourself.

The page is the same hosted payment page that Hosted Payment uses. The only difference is who shows it. With the HPP, ZenPay shows the page in a modal on your page. With a session, you show it.

High-level flow​

  1. Your backend calls POST /v2/sessions with your Merchant API credentials (see Authentication). Send your payment page's base address as endpointUrl. Don't send a fingerprint or an apiKey in the body.
  2. The response returns endpointUrl, the full checkout address, along with secureToken and expiresAt.
  3. Show that page before expiresAt: in your own modal, embedded in your page, or by sending the customer to the URL.

See Create a session for every field.

When to use sessions​

Use a session when you want to show the hosted payment page yourself instead of loading the HPP.

Confirm the payment​

The customer coming back to your redirectUrl is not proof of payment. See Handling the customer's return.