This occurs if the pre-authorization amount is insufficient to cover the final cost, or if a remote charge fails for reasons such as insufficient funds or a requirement for 3D Secure (3DS) user confirmation. In these cases, the platform will block specific operations and return a 402 error status code from various endpoints: After receiving these error statuses, the backend can request the List Charging Debts endpoint to get a 200 status code response with a
payment_intent_client_secret:
- It’s also possible to get a
payment_intent_client_secretas part of a 402 error response for a failed pre-authorization (see Start charging error handling guide).
Client-side payment confirmation
To resolve the payment, initialize the frontend Stripe SDK using the publishable key provided during onboarding. Provide thepayment_intent_client_secret and payment method ID to the respective SDK methods:
Android: confirmPayment(…)
iOS: confirmPaymentIntent(…)
Web: confirmCardPayment(…) or confirmPayment(…)
The SDK will automatically redirect the user to their bank issuer’s portal to complete the authentication process.
It may skip 3DS and complete the payment immediately (testable with the *4242 card in development mode)
It may skip 3DS and complete the payment immediately (testable with the *4242 card in development mode)
Testing:
In order to achieve “pre-authorization manual confirmation requirement” (1) and “post-charging outstanding payment” (2) in Development environment:- Add special Stripe testing card to user’s account:
4000 0027 6000 3184 - Start charging at this station using one of the params
evse_id: ITCPIE6631295*1evse_id: ITCPIE6631295*2
orstation_id: dc642f712d8c32b0427bc316a2954e90 - Receive pre-auth error that returns
payment_intent_client_secret(1). Feed it to Stripe SDK method. - After successful pre-authorization, start charging session and stop it.
- Wait for CDR arrival and notice outstanding payment is present in List Charging Debts endpoint. (2) (also in “delete payment method” and “soft-delete user”)
Feedpayment_intent_client_secretto Stripe SDK method.
