Integration

Integrating Scalapay directly

For custom checkouts, headless storefronts and in-app purchase flows. This page is a map of what the integration involves, not a substitute for the technical documentation.

REST
API style
Redirect
Approval flow
Webhooks
Confirmation
Sandbox
Full lifecycle
The order lifecycle5 stages
Create the orderServer-side call
Redirect the customerTo approval
Receive the webhookAuthoritative result
Capture and fulfilYour flow
Refund if neededAPI call
What to trust as final
The webhook
NOT THE REDIRECT
Setup

Getting live on the API

The order below matters — messaging before testing, testing before live traffic.

1

Create the order server-side

Send the order total, currency, items and your return URLs. You receive a redirect URL for the customer.

2

Send the customer to approve

They review the plan and the dates, then return to the URL you supplied. Handle both the success and abandonment paths.

3

Wait for the webhook

The webhook is the authoritative result. Never mark an order paid on the redirect alone, because a customer can close the tab before returning.

4

Capture and fulfil

Once confirmed, treat the order like any other paid order in your system.

Worth knowing

Six things specific to the API

The details that cause support tickets if you skip them.

Build for asynchronous confirmation

This is the single most common integration mistake. The redirect is a user-experience step; the webhook is the truth.

Make webhook handling idempotent

Webhooks can be delivered more than once. Processing the same event twice should not create two orders or two refunds.

Handle declines gracefully

A declined order is normal and not an error state. Return the customer to a checkout where they can pick another method.

Show messaging before checkout

The installment figure belongs on the product page. By the payment step, the decision is usually already made.

Test the full lifecycle

Order, partial refund, full refund and decline. Testing only the happy path is how problems reach production.

Order limits

Orders run from $200 to $5,000. Validate on your side before showing the option so customers are not offered something that will fail.

Before you switch on

Test the paths that are not the happy one

Every integration works when the customer does exactly the expected thing. Problems come from the other cases.

  • A customer who abandons at the approval step — they must land somewhere sensible with the basket intact.
  • A declined order — this is a normal outcome, not an error. Send them back to a checkout with other options available.
  • A partial refund — check the customer plan recalculates and your own reporting matches.
  • An order outside the range — validate against $200 to $5,000 before showing the option, so nobody is offered something that will fail.
Test before going live4 paths
Full orderHappy path
Abandoned approvalMust test
Declined orderMust test
Partial refundMust test

Testing only the successful order is the most common reason an integration causes problems in its first week.

Questions

Api integration FAQ

What developers and store owners ask before starting.

Does Scalapay have an API?+
Yes. Orders are created server-side, the customer is redirected to approve the plan, and the result is confirmed by webhook. Refunds are handled through the API.
Should I mark an order paid on the redirect?+
No. Treat the webhook as the authoritative result. A customer can complete approval and never return to your site, or return without completing.
Are webhooks guaranteed to arrive once?+
No. Build idempotent handling so that processing the same event twice does not duplicate an order or a refund.
Are partial refunds supported?+
Yes. Both full and partial refunds are supported, and the customer plan is recalculated when the refund is received.
Is there a sandbox?+
Yes. Test the full lifecycle including declines and refunds before going to production.
What should I validate before showing the option?+
The order total against the $200 to $5,000 range, and your own currency and region rules, so customers are not shown an option that will fail.
More for business

Other integrations

Same account, different platform.

Ready to add it?

Apply for a merchant account and we will get you the credentials and the docs.

Pay in 3 · 0% interest
$200–$5,000 · no credit check
Apply Now