Skip to main content
Create a checkout link, pay with a test card, and simulate settlement into your wallet. Set 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.
Keep the intent ID and checkout link from data.attributes.payUrl.

2. Pay with a test card

Open payUrl 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:
The response returns the card payment. If 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:
  1. 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.
  2. 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.
  3. 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.
A decline override applies to one actual charge attempt, then the saved test card’s normal outcome returns. Cards with predetermined later declines keep declining on later attempts. An expired-card decline stops collection for attention; a stopped-payment decline cancels the subscription. See Subscription simulations for the card outcomes and test-clock behavior.