NATURAL_API_KEY to your Sandbox API key. The examples use https://api.sandbox.natural.com. For MCP, connect to https://mcp.sandbox.natural.com.
Testing for a customer? Pass their party ID as
customerPartyId on each call. Your agent needs
permission to act on their behalf.1. Create an intent
Create a payment intent for $39.20. Amounts are in cents.data.attributes.payUrl.
2. Pay with a test card
OpenpayUrl and enter a test card. Use a future expiration date and any three-digit CVC.
Sandbox runs 3-D Secure only when Natural’s risk check on the payment asks for it, and
4000 0000 0000 3220 always asks for it. Sandbox 3-D Secure is simulated: it passes without showing a challenge. See Card fixtures for every test card.
3. Check the result
Get the payment intent to check its status.4. Settle the payment
Sandbox payments require simulated settlement. Open the payment in the Sandbox dashboard and select Simulate settlement, or use the API:settledAt is null, get the card payment again to check settlement.
Test subscriptions
Test card outcomes and subscription simulation controls are available to customers only in Sandbox. To test a temporary decline and recovery:- Create a subscription with no end in Sandbox and pay payment 1 with
4111 1111 1111 1111. Its saved card normally succeeds on later charges. - Open Accept → Subscriptions in the Sandbox dashboard, select the subscription, and choose Simulate. Set the next charge to decline for Insufficient funds, then advance to payment 2.
- Payment 2 declines once. Retry payment 2 to make its next attempt succeed. If you advance to payment 3 instead, Natural skips the remaining retries and leaves payment 2 missed and owed. Payment 3 succeeds, and the subscription reads
past_due.