Discussions

Ask a Question
Back to All

Payment Method creation before Payment Intent mandatory ?

As per the steps provided in the documentation, Payment Intent needs to be created first and than the Payment Method should be created. Is this sequence mandatory ?

Since Payment Intent APIs need Private Keys to be invoked, can we switch these call sequences as below

  1. create the Payment Method from the Client (Browser) using Public Key,
  2. Pass the Payment Method ID to the server
  3. Server invokes the Create Payment Intent
  4. Server calls the Payment Intent attach API , returns the "next_action" back to the Client if present.

Appreciate your response. Thanks.