● SANDBOX · TEST MODE

Form 2 · Full billing

The default form. Card fields plus email, name and the full address, with the country picked from a list. Nothing to configure.

This is what you get with no fields option at all. The buyer fills every block before the element reports complete. The country is a list, not a text box, so nothing like ZZ can reach the acquirer as an AVS country. Street and postal code are what AVS checks; they are always drawn here.

1 · Your test keys

The secret key is POSTed only to /api/demo/intent, never to the SDK. Allowed domains on the pk must include this host.

2 · Pay

Test card (NMI sandbox). 4111 1111 1111 1111 · any future expiry · CVV 123. NMI answers a repeat of the same card and amount within a minute with Duplicate transaction; wait a minute between tries. Fill the billing block too; the button stays off until every drawn field has a value.

After a successful payment the green box shows charge.billing_details from the receipt: what the buyer typed, as the charge carries it.

3 · The integration

// 1. Your server, with the secret key: // POST /v1/payment_intents -> { client_secret } // 2. This page, with the publishable key. No `fields`: 'auto' is the default. const wp = WorthyPayments('pk_test_…'); wp.mountPaymentElement('#payment', { clientSecret, onSuccess: (r) => { /* r.paymentIntentId, r.transactionId, r.charge */ }, onError: (e) => { /* e.code === 'card_declined' on a decline */ }, });

Want the buyer's phone as well? It is off by default because no card rail needs it: fields: { billingDetails: { phone: 'auto' } } draws it.

4 · Log

Waiting for a key.