Getting started
Introduction
Welcome to PayPay.space. The platform exposes a small set of high-level primitives that, together, let your software interact with the financial world without thinking about underlying networks, regions, or vendors.
What you get
A unified API surface, an SDK in your language of choice, an interactive sandbox, and a layer of intelligence that quietly improves every call you make. We focus on three product principles:
- State intent, not implementation. Tell the platform what you want; it figures out how.
- Everything is observable. Every decision is logged, traceable, and replayable.
- Build forward. Versioned APIs, long deprecation windows, no surprise breakage.
Where to next
Try the Quickstart, or jump straight into the API reference.
Getting started
Quickstart
Provision a workspace, install the SDK, and ship your first flow in under five minutes.
1. Install the SDK
npm install @paypay/space
2. Initialize the client
import { PayPay } from "@paypay/space";
const client = new PayPay({
apiKey: process.env.PAYPAY_KEY
});
3. Create your first flow
const flow = await client.flows.create({
intent: "subscription.activate",
context: { plan: "team", region: "DE" }
});
console.log(flow.status); // "ready"
That's it. The platform handled provider selection, region routing, risk scoring, and idempotency — quietly.
Getting started
Authentication
All requests are authenticated with a bearer token sent in the Authorization header. Keys are scoped per environment (sandbox vs. production) and per role.
Request example
curl https://api.paypay.space/v1/flows \
-H "Authorization: Bearer $PAYPAY_KEY" \
-H "Content-Type: application/json" \
-d '{ "intent": "subscription.activate" }'
Best practices
- Use per-service keys instead of a single master key.
- Rotate keys on a schedule — the platform supports overlapping validity.
- Store secrets in your secret manager, not in source control.
Build
SDKs
We maintain first-party SDKs that are typed, idiomatic, and kept in lockstep with the API.
| Language | Package | Status |
| TypeScript / JavaScript | @paypay/space | Stable |
| Python | paypay-space | Stable |
| Go | github.com/paypay/space-go | Stable |
| Ruby | paypay_space | Stable |
| Java | space.paypay:client | Beta |
All SDKs share the same object model, error semantics, and retry policy.
Build
Intelligent flows
A flow is an intent expressed as data. The platform composes the right sequence of provider calls, decisions, and post-processing for you.
Anatomy of a flow
{
"intent": "subscription.activate",
"context": { "plan": "team", "region": "DE" },
"ai": {
"autoRoute": true,
"riskModel": "v2"
}
}
Set ai.autoRoute to true and the platform selects the best provider for the call based on cost, latency, and historical success.
Build
Sandbox
A sandbox is a deterministic, replayable environment that mirrors production. Spin one up per branch, per developer, or per CI run.
Create a session
const session = await client.sandbox.create({
scenario: "global-launch",
traffic: { rps: 120, regions: ["US", "DE", "SG"] }
});
Replay against last week's traffic
const report = await session.replay({
since: "7d"
});
Reference
API reference
The REST API is described by an OpenAPI 3.1 specification and accessible at https://api.paypay.space/v1.
Core resources
| Resource | Endpoint | Description |
| Flows | /flows | Intent-driven workflows |
| Accounts | /accounts | Tenant & sub-tenant model |
| Identities | /identities | Verified entities & KYx state |
| Ledgers | /ledgers | Double-entry record of events |
| Policies | /policies | Programmable rule sets |
Pagination
List endpoints return cursor-based pagination via the cursor and limit query parameters.
Reference
Errors
Errors are returned as structured JSON with a stable code, a human-readable message, and a trace_id you can paste into our dashboard.
{
"code": "flow.invalid_intent",
"message": "Intent \"subscription.activate\" requires field 'plan'.",
"trace_id": "trc_8f3..."
}
Common codes
| Code | Meaning |
auth.invalid_key | API key missing or revoked |
flow.invalid_intent | Intent or context is malformed |
policy.blocked | A configured policy denied the request |
provider.unavailable | No eligible provider for the requested scope |
Reference
Changelog
2026-05-22 — Intelligence v2
New ensemble routing model with 12% better tail-latency on EU traffic. No breaking changes; opt in with ai.routingModel: "v2".
2026-04-09 — Java SDK (beta)
First-party Java SDK released in public beta. Maven coordinates: space.paypay:client:0.9.0.
2026-02-14 — Sandbox replay
Sandbox sessions can now replay against any 30-day window of your production traffic.