Skip to main content
Users may occasionally encounter a situation where the backend is unable to charge the payment method and the user has to perform client-side payment confirmation.
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:
  1. Start charging
  2. Delete payment method
  3. Soft-delete user
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:
  1. It’s also possible to get a payment_intent_client_secret as 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 the payment_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)

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*1
    evse_id: ITCPIE6631295*2
    or
    station_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”)
    Feed payment_intent_client_secret to Stripe SDK method.