Global API
...
Request
Transaction

Create 3D Secure Transaction

2min

Note: This is currently only supported for the Stripe payment processor.

To create a Transaction in the Payment processor with 3DS secure authentication, please follow the below process:

  1. Call the "ChargeProcessor" action as you normally would. See here. This is the normal flow for any charge.
    1. If the related Payment method has 3D secure authentication enabled, the response will return an authenitcation_url.
      1. { "authentication_url" : "https://hooks.stripe.com/...", }
    2. The authentication_url is a link to a form that will do the 3D Secure authorization. This needs to be loaded in an iFrame hosted by you.
    3. After the 3DS authentication, Stripe will redirect to Breadwinner to process the success or failure of the authentication.
  2. After the completion of additional authentication, Breadwinner will post the payment_intent_id to your top-level page (the one hosting the iFrame)
    1. window.parent.postMessage({message: '3DS-authentication-complete', params: {payment_intent: payment_intent_id}, '*');
  3. You must extract payment_intent from postMessage and then retrieve the transaction with the "fetchTransaction" Global API action (example below). This will create the charge in Salesforce if successful or return a 402 error if the authentication fails.



Example of "ChargeProcessor" Global API action request and response for a 3DS credit card.

Apex
JSON


Example of "FetchTransaction" Global API action request and response for authentication success and failure.

Apex
Response for 3DS Success
Response for 3DS Failure




Updated 01 Apr 2024
Doc contributor
Doc contributor
Did this page help you?