Test PayPal payments
PayPal sandbox uses accounts from the PayPal Developer Dashboard. The deployment REST application must belong to a sandbox Business account. Complete checkout with a different sandbox Personal account acting as the buyer. OurPay selects the deployment’s PayPal sandbox application automatically. For PayPal wallet payments, approve with a sandbox Personal account. Embedded card fields appear only when that sandbox application is eligible for Advanced Card Payments; use test cards from the PayPal Developer Dashboard. Sandbox eligibility does not grant capabilities to your live Business account.1
Create a product
Create a low-value one-time product or subscription in the sandbox OurPay organization.
2
Enable PayPal
Open Settings → Payment providers and enable PayPal. Sandbox mode does not require a complete
invoice-issuer address, but adding the same legal details you expect in production catches
document problems earlier.
3
Open a checkout
Create a Checkout Link or Checkout Session, enter a customer email and billing country, and
select Pay securely with PayPal.
4
Approve as the buyer
Sign in with the sandbox Personal account on PayPal, approve, and return to OurPay.
5
Verify the result
Confirm the PayPal capture and then verify the OurPay Payment, Order, invoice, receipt, customer,
and Seller Payable entries. The confirmation page alone is not sufficient evidence.
Subscription prerequisite
One-time payments require Orders v2 but not payment-method vaulting. Paid subscriptions, free trials, and renewals require all of the following in the sandbox deployment:OURPAY_PAYPAL_VAULTING_ENABLED=true- The receiving sandbox Business account’s PayPal merchant ID
- Save-payment-method/Vault capability on the PayPal REST application
PayPalCheckoutUnsupported instead of creating a subscription it cannot renew.
Test a paid first cycle, a free trial setup token, an automatic renewal, a failed renewal, and a
cancellation. A successful one-time capture does not prove subscription vaulting works.
Test USDC and domestic payments
Sandbox USDC uses native test tokens on Base Sepolia and Polygon Amoy. Fund a separate test wallet with test USDC and the corresponding gas token. Mainnet transactions and tokens are rejected in sandbox. Live mode continues to use its configured mainnets and receiving wallets. Sandbox UPI and bank transfer checkout provides Simulate success and Simulate failure controls. These create test results through OurPay’s normal order flow without contacting a bank or moving money. They do not generate a real UPI payment request. Live UPI and bank transfers use the live organization’s payment configuration.API and SDK
Usehttps://api.sandbox.ourpay.dev as the API base URL. The repository SDKs select it with the sandbox environment option. For an older installed SDK, pass this explicit base URL until you upgrade.
Failure cases to exercise
- Buyer cancels on PayPal and returns to checkout
- PayPal declines or reverses approval
- The browser closes after approval but before the return redirect
- Duplicate delivery of the same webhook event ID
- Pending, denied, refunded, and reversed captures
- Full and partial refunds
- Lost and won disputes
- Subscription checkout with vaulting disabled
- A currency unsupported by PayPal or mismatched with the seller ledger
Email limitation
Customer-facing sandbox emails are delivered only to recipients who are members of the sandbox organization. Add test recipients under Settings → Members. Sub-addressing aliases such asyou+checkout@example.com are accepted when the underlying address is a member.
Going live
Sandbox and live PayPal credentials are different. Before switching:- Add the organization’s complete legal invoice name and address.
- Configure the live Business REST app, merchant ID, and webhook ID.
- Obtain the PayPal capabilities and approvals required for the actual collection model.
- Repeat the full flow with a legitimate low-value live product.