Skip to content
This repository was archived by the owner on May 21, 2026. It is now read-only.
This repository was archived by the owner on May 21, 2026. It is now read-only.

SCA automatic payments #21

@PerkmannM

Description

@PerkmannM

The upcoming PSD2 forces SCA for all our future payments.
Based on the docs (https://developer.amazon.com/docs/eu/amazon-pay-automatic/sca-upgrade-merchant-initiated-transactions.html#change-the-process-to-set-up-a-new-billing-agreement),
it states:

If setBillingAgreementDetails returns a constraint, handle them as described in Step 2: Set purchase details and define the purchase of the Amazon Pay and Login with Amazon integration guide. Otherwise, proceed and call the confirmBillingAgreement operation.
The confirmBillingAgreement operation requires the following input parameters...
and in the example there is a call to client.confirm_order_reference (which is not mentioned in the integration steps for AUTOMATIC PAYMENTS):

require 'pay_with_amazon'

merchant_id = 'YOUR_MERCHANT_ID'
access_key = 'YOUR_ACCESS_KEY'
secret_key = 'YOUR_SECRET_KEY'

client = PayWithAmazon::Client.new(
    merchant_id,
    access_key,
    secret_key,
    sandbox: true,
    currency_code: :eur,
    region: :de
)

client.confirm_order_reference(
    amazon_order_reference_id,
    success_url: 'https://www.test.com/OrderConfirmed',
    failure_url: 'https://www.test.com/OrderFailed'
)

Is client.confirm_order_reference used for automatic payments too?
If yes then is amazon_order_reference_id the same as BillingAgreement Id?
If not what are the correct steps to be SCA compliant for automatic payments with merchant initiated transactions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions