Connect a custom store or app

Estimated reading: 2 minutes views

Summary: Create checkouts, pass an external reference, confirm with webhooks, and send buyers to your thank-you page.

If you build your own store, SaaS app, or mobile backend, RasterPay connects through three things: a checkout per payment, an external reference you control, and a webhook that confirms the money arrived. No plugin, no redirect chain, and no shared database. This article gives a working pattern you can copy into any stack.

Payment confirmation flow from checkout to merchant wallet through a webhook

Two ways to model checkouts

One checkout per price

Best for a fixed catalog. Create a checkout for each plan or product once, then reuse its hosted link. Simple, but each link only handles one amount.

One dynamic checkout

Best for carts, invoices, and top-ups. Create a checkout at payment time with the exact amount, currency, and your external reference. This is the safer default when the total changes.

Pass an external reference

Store your own order id in the external reference field when you create the checkout. It comes back in the webhook payload, which lets you match the payment without guessing from amounts. Use a value that is unique and stable, such as invoice-1042 or order_88213.

Confirm on the server, never in the browser

  1. Your server creates the checkout and saves the checkout id and reference.
  2. The buyer is sent to the hosted link and pays.
  3. RasterPay calls your webhook URL with the secret key and the transaction object.
  4. Your handler verifies the secret, looks up the reference, and checks the amount.
  5. You mark the order paid and answer HTTP 200.
  6. The buyer lands on your thank-you page.

Never mark an order paid because the browser came back to your site. A buyer can open the return URL without paying. Only the webhook, with a confirmed status of C, is proof.

Handle retries and duplicates

The same transaction can arrive more than once, and RasterPay retries when your endpoint does not answer 200. Make your handler idempotent: store the transaction id, and ignore a second call for one you already processed.

Checklist before launch

  • Webhook URL is public, uses HTTPS, and answers fast.
  • Secret key is checked on every call.
  • Amount and currency are compared, not assumed.
  • Paid orders are never paid twice.
  • Thank-you page is reached only after confirmation, or shows a pending state.
  • Failures are logged with the transaction id.
Share this Doc

Connect a custom store or app

Or copy link

CONTENTS