Skip to main content

Sandbox Testing

Environments​

EnvironmentBase URLCredentials
Sandboxhttps://api-m.sandbox.paypal.comDeveloper Dashboard → Sandbox
Livehttps://api-m.paypal.comDeveloper Dashboard → Live (not used yet)

Accounts​

Sandbox test accounts​

Linked to this developer account, created 2026-09-13 (Testing Tools → Sandbox Accounts):

AccountEmailTypeCountryDefaultApps
Business (merchant)sb-fvldw52891486@business.example.comBusinessIDYes1
Personal (buyer)sb-12i6h52775128@personal.example.comPersonalIDYes0

Get the generated password: Testing Tools → Sandbox Accounts → row ⋮ → View/Edit Account. Then sign in at https://www.sandbox.paypal.com/signin with the personal account in one browser and the business account in another to watch sandbox money move between them.

Live merchant​

AccountPurpose
support@rezriz.comProduction — untouched during exploration

Registered app​

FieldValue
App nameopshell
Created2026-09-13
TypeREST API app (Sandbox)
CredentialsStored in ~/.ssh/paypal/.env (perms 600)

The sandbox business account is linked to this app (Apps = 1).

Developer Dashboard map​

MenuUse
Apps & CredentialsREST apps, Client ID / Secret (sandbox + live)
Testing Tools → Sandbox AccountsTest users, passwords, create/bulk accounts
Testing Tools → Sandbox NotificationsSandbox email notifications from REST/Classic calls (last 30 days)
Testing Tools → Webhook SimulatorSend mock events to a listener URL
Testing Tools → Event LogsWebhook / API event history
Docs → APIs & SDKsREST API reference, Postman, API Explorer

Credential storage​

Credentials live in the server .ssh tree, matching other opshell services:

~/.ssh/paypal/.env # chmod 600, canonical source

paypal-sandbox/.env in the repo is a symlink to that file, so there is one source of truth. The probe also reads ~/.ssh/paypal/.env directly as a fallback.

Never commit or paste secrets

Secrets must never be committed to Git, pasted into chat, or written into docs. Any secret shared insecurely must be rotated in the Developer Dashboard.

.env keys​

KeyExamplePurpose
PAYPAL_ENVsandboxSelects the base URL
PAYPAL_CURRENCYUSDCurrency for all test calls
PAYPAL_ACCOUNTsupport@rezriz.comBusiness login (reference only)
PAYPAL_CLIENT_ID64-char IDFrom the Sandbox app (opshell) — set
PAYPAL_CLIENT_SECRET—From the Sandbox app — set (rotate if exposed)

Local probe harness​

Location: paypal-sandbox/ in the brain-donnyaw-cf-pages repo.

FilePurpose
paypal-test.mjsNode 18+ capability probe (no dependencies)
.envSymlink to ~/.ssh/paypal/.env (gitignored)
.env.exampleTemplate with key names only
README.mdUsage and safety notes

Run​

node paypal-sandbox/paypal-test.mjs

The probe never prints the Client ID or Secret. It reports PASS / FAIL per capability and prints the raw error detail (e.g. UNSUPPORTED_PAYEE_CURRENCY) on failure.

Current coverage​

Probe checkAPI
OAuth2 token/v1/oauth2/token
Create one-time order/v2/checkout/orders
Create catalog product/v1/catalogs/products
Create subscription plan/v1/billing/plans
Create draft invoice/v2/invoicing/invoices
List subscription plans/v1/billing/plans

Latest run (2026-09-13, app opshell)​

CheckResult
OAuth2 tokenPass (expires_in=32400s)
Create one-time orderPass (5L956427BL826910K)
Create catalog productPass (PROD-5BT193075G744534P)
Create subscription planPass (P-7JC06884FP1949709NKTJUNQ)
List subscription plansPass (count=1)
Create draft invoiceFail — NOT_AUTHORIZED

5/6 checks passed. Invoicing must be enabled for the app/account before it can be used. Per-feature status is tracked in the Feature Test Matrix.

Sandbox-only testing tools​

ToolPurpose
Webhook simulatorFire PAYMENT.CAPTURE.COMPLETED, BILLING.SUBSCRIPTION.* without a real payment
Magic amounts / negative testingForce declines and error states
Sandbox credit cardsCard checkout flows
Test buyer loginApprove orders and subscriptions as a customer

Limitations​

  • Buyer approval steps cannot be fully automated from the CLI; they require a Sandbox personal account login in a browser.
  • Sandbox success does not prove live receiving works for Indonesia.
  • Approval-gated features (Payouts, Vault, advanced cards) may need a support request.