Testing

Use sandbox for all integration work: dashboard-sandbox.amos.com, api-sandbox.amos.com, embed-sandbox.amos.com, sandbox API keys, and sandbox render tokens.

Cards and bank

Sandbox uses the sandbox processor, not Stripe-style published PAN tables. Use:

  • Cards issued for your sandbox dashboard / onboarding packet (do not reuse production cards).
  • Plaid Link sandbox institutions when Connect is on.

There is no public “4242” list in the Pay API spec. If you do not have sandbox instruments, get them from Amos — do not guess PANs.

To exercise failed: use a sandbox card your packet marks as decline, or any path that returns iframe field errors. Confirm still resolves { status: "failed" }; unlock Pay. Then retrieve GET /payment_intents/{id} and branch on state (for example errored_sale, requires_payment_method). Do not read last_payment_error.

Checklist

  1. Parent origin on the sandbox render template includes your local/dev host (scheme + host, no path). http://localhost:3000 is a different origin from http://127.0.0.1:3000.
  2. Create the payment/setup intent on submit and confirm immediately so you are not testing token expiry by accident.
  3. Assert on webhook delivery (or retrieve), not only the client status.
  4. Exercise failed as well as succeeded — declined cards must unlock the Pay button with errors inside the iframe.

Local HTTPS

Embed and wallets expect a real origin. http://localhost is fine for card/bank if that origin is on the template. Apple Pay and some wallet features need HTTPS. Use your usual local TLS helper if the iframe stays blank on wallets.

Amounts

Send cents to the Pay API (5000) and major-currency strings to wallet buttons ("50.00"). A wrong type is the most common “it charged 100×” bug.

Plaid (sandbox)

Bank Connect talks to Plaid Link on the parent page. Use Plaid’s sandbox credentials in the Amos embed environment — you do not put Plaid secrets in your app. If Connect never appears, check requireAchVerification, intent: "setup", and render-token verification.

Do not

  • Point production render tokens at sandbox keys.
  • Call /embed/payment_intents/{id}/confirm from your server. The iframe SDK does that.
  • Load @amos.com/pay-js-sdk or pay-sandbox.amos.com from old samples.