Skip to content
PerionPayments

Example apps

Follow one order from checkout to a confirmed payment.

Two example merchant apps show the server side of an integration against Sandbox. Neither moves real money. Their source is shared with invited sandbox merchants on request: ask the integration team.

Sample shop · hosted checkout

  1. Create the order on your server

    Keep the order API key and OAuth client credentials out of the browser. Each order creates one hosted checkout with a stable idempotency key, so retrying the same request returns the same checkout.

  2. Return to the original order

    The payer comes back through a private, unguessable link. The pending, confirming, succeeded, failed, canceled, and support pages all read the original payment; a browser return never fulfills the order or shows internal IDs.

  3. Verify the event before acting

    Check the signature over the raw webhook body and delivery ID. Store the event ID, object version, and pending work before you acknowledge the event, and expect redelivery and secret rotation.

  4. Fulfill once, from a confirmed payment

    Read the payment again from your server and check that the order, amount, currency, environment, and succeeded status all match. A temporary failure keeps the event pending for a retry; a mismatch is investigated, never fulfilled.

Read the hosted checkout guide

Integration lab · embedded checkout

  1. Start with your sandbox credentials

    The Node server exchanges your credentials and keeps the one-time signing secret in local storage that only it can read. The browser gets only a short-lived checkout secret tied to your site's origin.

  2. Load the pinned SDK

    The page loads PerionPayments.js at a fixed version with its SHA-384 integrity value. The browser's completion event updates the page, but never fulfills the order or starts a new checkout.

  3. Follow each step

    After the sandbox approval, the server verifies the signed event, reads the payment again and checks the amount, and fulfills the order once. Only then does the single refund button become available.

  4. Pick up where you left off

    A private link keeps the order after a reload or a return from the provider. If creating the checkout has an unknown outcome, the Integration lab keeps the original attempt for you to check instead of creating a new payment.

Read the embedded checkout guide
Next: API reference