Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space ENWORK and version Documentation
Section
Column
width900px

Overview

In order to be complaint with the PSD2, Amazon Pay introduced SCA for their transactions.

The SCA Upgrade introduces a “Confirmation Flow” to handle Multi-Factor Authentication (MFA) when it is required.

When MFA is required, the Confirmation Flow shows the credit card issuer’s MFA challenge to the buyer. After the buyer interacts with the Confirmation Flow (for example, completes the MFA challenge), the buyer is returned to the merchant’s site (for example, order confirmation page).

Please update the AmazonPay checkout workflow after a buyer initiates their order completion and before you call the Authorize Operation.

Changes

New JavaScript function confirmationFlow()

Due to MFA, it is necessary after a succesful confirmation of an order to start a new call, the ConfirmationFlow.

To start the workflow, please

  • execute a Confirm on the order on the

    Multiexcerpt include
    SpaceWithExcerptEN
    MultiExcerptNamePlatform-Name
    PageWithExcerptWording
    , after you receive a result

  • start the confirmationFlow in case of success with "confirmationFlow.success()"

  • in case of failure "confirmationFlow.error()" aborts the process.

Implementation of the new Javascript call is shown below. This has been optimized for our 

Multiexcerpt include
SpaceWithExcerptEN
MultiExcerptNamePartner-Name
PageWithExcerptWording
merchants.


Note

This action should be triggered by clicking on the “Buy Now” button!

Multiexcerpt
MultiExcerptNameconfirmation_flow
Code Block
languagejs
linenumberstrue
function confirmationFlow()
{
	// Get resultCode from call of AmazonAPA.aspx, EventToken: COD
	var resultCode = Platform call to get the ResultCode from the Confirm, AP call COD or SCO.
	// Your AmazonSellerID / AmazonMerchantID
	var amazonSellerId = 'Your_SellerID';
	// Amazon order reference generated by Address Widget
	var orderReferenceId = 'Your_Order_Reference';
	//Initiate confirmation flow
	OffAmazonPayments.initConfirmationFlow(amazonSellerId, orderReferenceId, function (confirmationFlow)
		{
			if(resultCode = '00000000')
			{
				confirmationFlow.success(); 
			}
			else
			{
				confirmationFlow.error();
			}
		}
	);
}


Please also refer to https://developer.amazon.com/de/docs/eu/amazon-pay-onetime/sca-upgrade.html for additional guidance.

Merchant should be able to handle

Multiexcerpt include
SpaceWithExcerptEN
MultiExcerptNamePartner-Name
PageWithExcerptWording
's redirection (URLSuccess / URLFailure) with the result of the MFA Challenge.

URLSuccess / URLFailure for ConfirmOrderDetails (COD) and SetOrderDetails and ConfirmOrder (SCO) call

Multiexcerpt
MultiExcerptNameconfirm_order_details

KeyFormatCNDDescription

URLSuccess

ans..256

M

The buyer is redirected to this URL if the MFA is successful

URLFailure

ans..256

O

The buyer is redirected to this URL if the MFA is unsuccessful

AuthorizationAmount

n..12

O

The amount to authenticate during MFA completion.
Use this parameter if you want to set a payment amount that is different than the OrderTotal provided in the SetOrderReferenceDetails operation call.
If this parameter is not set, the amount authenticated during MFA will be equal to the OrderTotal provided in the SetOrderReferenceDetails operation call.


On "Order Now" the merchant has to send the URLSuccess and URLFailure in the calls (EventToken=SCO | COD), because the redirect is executed after the MFA challenge.

After "Order Now" the Confirm (EventToken=SCO | COD) is executed on the payment and then the redirect to the challenge takes place using the JavaScript code shown above.

AmazonAPA.aspx

The following event calls at the

Multiexcerpt include
SpaceWithExcerptEN
MultiExcerptNamePlatform-Name
PageWithExcerptWording
are affected by the changes. Please make sure to include the new parameters.

Multiexcerpt
MultiExcerptNameevents

EventTokenActionDescription

SOD

SetOrderDetails

Transfer of amount payable and further information – controls also the pay-ment methods selectable for an order at Amazon

GOD

GetOrderDetails

Request of order information, e.g. to get information about a newly selected delivery address. After a call with Eventtoken COD or SCO, GOD returns also the billing address of the customer.

When Scope enters “payments:shipping_address” and “payments:billing_address” you receive the full delivery and shipping address after the display of the Address widget. Please transfer the OrderReferenceId on call up.

SCO

SetOrderDetailsAndCon-firmOrder

Order confirmation again with transfer of amount payable and further infor-mation – with this Eventtoken the order is finalized. After successfully confir-mation authorizations can be submitted to Amazon immediately.

COD

ConfirmOrderDetails

Optional, if amount payable and further information should not transferred once more for order confirmation (

Multiexcerpt include
SpaceWithExcerptEN
MultiExcerptNamePartner-Name
PageWithExcerptWording
recommends using the Eventtoken SCO for order confirmation.)

COR

CloseOrderReference

Closing an Amazon order. Captures related to open authorizations as well as credits are possible furthermore

User Flow and Sequences

Flow

  1. Clicks on AmazonPay button to sign-in

  2. Chooses an address from the widget

  3. Chooses payment method from the widget

  4. Confirms the order

Option 1: SCO

This is the recommended option.

Multiexcerpt
MultiExcerptNameProcessflow_SCO


draw.io Diagram
bordertrue
diagramNameMFAflow_SCO_CT
simpleViewerfalse
linksauto
tbstyletop
lboxtrue
diagramWidth1109


Option 2: SOD and COD

Multiexcerpt
MultiExcerptNameProcessflow_SCO_COD


draw.io Diagram
bordertrue
diagramNameMFAflow_SOD_COD_CT
simpleViewerfalse
linksauto
tbstyletop
lboxtrue
diagramWidth1109


  1. The first call is to be made to ConfirmationFlow – with this, AmazonPay can handle the MFA if required. Here is confirmationFlow error/success to be set. Reference to the Amazon Pay Widgets.js file already used for the other widgets.

  2. Call SetOrderDetails (SOD) including OrderTotal

  3. Call ConfirmOrderDetails (COD) set URLSuccess/URLFailure parameter with a returnURL value


Info

As shown above, we recommend the SCO call that is a single step to set the order details and also to confirm the order Details.

Option 3: MFA Failure

Multiexcerpt
MultiExcerptNameProcessflow_MFAFailure


draw.io Diagram
bordertrue
diagramNameMFA_failure_CT
simpleViewerfalse
linksauto
tbstyletop
lboxtrue
diagramWidth1109



Info

We recommend our merchants to only work with the 

Multiexcerpt include
SpaceWithExcerptEN
MultiExcerptNamePlatform-Kurz
PageWithExcerptWording
status or
Multiexcerpt include
SpaceWithExcerptEN
MultiExcerptNamePlatform-Kurz
PageWithExcerptWording
response code in these cases.


Status =>Abandoned:

Status =>Failure:

  1. If the customer fails or abandons the challenge, the customer is redirected to the URLFailure.

  2. Logout the user.

  3. Cancel the order by calling “Reverse.aspx”

Cancel Order by Calling “Reverse.aspx“

In order to reverse a complete order with Amazon Pay with the function „CancelOrderReference“, please request to

Multiexcerpt include
SpaceWithExcerptEN
MultiExcerptNameBaseURL
PageWithExcerptWording
reverse.aspx

More and detailed information is found in the official

Multiexcerpt include
SpaceWithExcerptEN
MultiExcerptNamePartner-Name
PageWithExcerptWording
documentation here: Amazon Pay Manual

Status

If the MFA is successful, the redirection is done to URLSuccess, if not the redirection is done to URLFailure.

Authentication Status ValueDescriptionRecommended Action

Success

Successful / not necessary

No action needed

Failure

Failed

Redirection FailureURL or forwarding to page in order to use a payment method other than Amazon

Abandoned

Failed

Redirection FailureURL or to page to replace the order sing Amazon Pay and complete the MFA challenge



Info

The Amazon Authentication Response is given back to the shop via the

Multiexcerpt include
SpaceWithExcerptEN
MultiExcerptNamePlatform-Kurz
PageWithExcerptWording
in the Response Parameter = amazonstatus.

Example: amazonstatus=Abandoned



Note

In the Amazon SCA manual point 3 (Amount consistency)

The AuthorizationAmount value (in the Authorize operation) must always match the CaptureAmount value (in the Capture operation).

If not the Capture operation call response will be handled asynchronously; the Capture object State value is set to Pending and may not be processed in real time, even if it is requested within seven days of the Authorize operation call!

Column

Table of Contents