# Manage SCA retries Due to [Strong Customer Authentication (SCA)](https://www.checkout.com/docs/business-operations/ensure-regulatory-compliance/sca-compliance.md) requirements across the European Economic Area (EEA) and United Kingdom, payments without [3D Secure (3DS)](https://www.checkout.com/docs/payments/authenticate-payments/3d-secure.md) and frictionless 3DS payments may be declined with a `20154` response code if authorization was presented without SCA, or a valid exemption. If this happens, Checkout.com automatically upgrades the payment to 3DS and sends a `202` payment response with an `"upgrade_reason": "sca_retry"` field in the `3ds` object. The response also contains a 3DS redirect URL that you must redirect the cardholder to for 3DS authentication. After the cardholder completes authentication, the subsequent authorization request is sent with 3DS data. To retrieve the payment status after authentication, you can call the [Get payment details](https://www.checkout.com/docs/payments/manage-payments/get-payment-details.md) endpoint or subscribe to [Gateway webhooks](https://www.checkout.com/docs/developer-resources/event-notifications/event-types.md#Gateway). --- ## How it works Only customer-initiated transactions (CITs) are eligible for SCA retries, because the cardholder must be present or in session to complete the authentication. If your merchant-initiated transactions (MITs) receive `20154` declines, the likely causes are as follows: - The initial CIT to set up the MIT agreement was not authenticated with SCA (challenge). - The subsequent MITs were not flagged correctly for issuers to identify them as out of scope for SCA. See [SCA compliance](https://www.checkout.com/docs/business-operations/ensure-regulatory-compliance/sca-compliance.md) for how to correctly flag the initial CIT and subsequent MITs. --- ## Opt out of automated SCA retries By default, SCA soft decline retries are enabled for all impacted payments. You can opt out of the automated retry by providing `"3ds.allow_upgrade": false` in your payment request. Alternatively, to always opt out by default, contact your account manager or [request support](https://dashboard.checkout.com/support/new?topic=case_account_management_and_access&issue=issue_account_changes). Call the [Request a payment](https://api-reference.checkout.com/tag/Payments/#operation/requestAPaymentOrPayout) endpoint. > **Information** > > Your base URL's `{prefix}` value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see [API endpoints](https://www.checkout.com/docs/developer-resources/api/api-endpoints.md). **Production** `POST` `https://{prefix}.api.checkout.com/payments` **Sandbox** `POST` `https://{prefix}.api.sandbox.checkout.com/payments` ### Request example ```json { "source": { "type": "card", "number": "4500622868341387", "expiry_month": 12, "expiry_year": 2030, "cvv": 257 }, "amount": 100, "currency": "GBP", "3ds": { "enabled": false, "allow_upgrade": false }, "processing_channel_id": "pc_dp7vuzrqp2xe3jipoi52aqkbiu" } ``` --- ## Test automated SCA retries To test the flow in the sandbox environment, you can use the following test card number: `4500622868341387`. ```json { "source": { "type": "card", "number": "4500622868341387", "expiry_month": 12, "expiry_year": 2030, "cvv": 257 }, "3ds": { "enabled": false, "allow_upgrade": true }, "amount": 6510, "currency": "USD", "processing_channel_id": "pc_dp7vuzrqp2xe3jipoi52aqkbiu", "capture": false } ``` To test the SCA retries in the sandbox environment with 3DS enabled, use the [Hosted Sessions](https://www.checkout.com/docs/payments/authenticate-payments/3d-secure/standalone-sessions/hosted-sessions.md) solution. [Request a session](https://www.checkout.com/docs/payments/authenticate-payments/3d-secure/standalone-sessions/hosted-sessions.md#Step_1:_Request_a_session) and provide one of the following values in the `source.number` field: - `4604638550407414` - `5368763493455610` `POST` `https://{prefix}.api.sandbox.checkout.com/sessions` ### Request example ```json { "source": { "type": "card", "scheme": "amex", "number": "4604638550407414", "expiry_month": 12, "expiry_year": 2030, "billing_address": { "address_line1": "123 High St.", "city": "London", "state": "ENG", "zip": "SW1A 1AA", "country": "GB" }, "mobile_phone": { "country_code": "44", "number": "1234567890" }, "email": "hannah.bret@example.com" }, "amount": 6510, "currency": "USD", "authentication_type": "regular", "authentication_category": "payment", "completion": { "type": "hosted", "success_url": "https://example.com/sessions/success", "failure_url": "https://example.com/sessions/failure" } } ``` ### Response example ```json { "session_secret": "sek_Dal7UyiH8rIFXA4PfgiIk2jUyQkVDeEWgVBEL4TsRTE=", "id": "sid_y3oqhf46pyzuxjbcn2giaqnb441", "transaction_id": "9aea641d-0549-4222-9ca9-d90b43a4f38c", "scheme": "amex", "amount": 6510, "currency": "USD", "authentication_type": "regular", "authentication_category": "payment", "status": "pending", "protocol_version": "2.2.0", "_links": { "self": { "href": "https://{prefix}.api.checkout.com/sessions/sid_y3oqhf46pyzuxjbcn2giaqnb441" } } } ``` Verify that you can [redirect the customer](https://www.checkout.com/docs/payments/authenticate-payments/3d-secure/standalone-sessions/hosted-sessions.md#Step_2:_Redirect_the_customer). Request a payment using the same card number and use the `id` returned in the previous response as the `3ds.authenticationId` value. `POST` `https://{prefix}.api.sandbox.checkout.com/payments` ### Request example ```json { "source": { "type": "card", "number": "4604638550407414", "expiry_month": 12, "expiry_year": 2030 }, "amount": 6510, "currency": "USD", "reference": "ORD-5023-4E89", "processing_channel_id": "pc_dp7vuzrqp2xe3jipoi52aqkbiu", "3ds": { "enabled": true, "authentication_id": "sid_qwjup7swlcrurgrxxhlqkerbqa" }, "success_url": "https://example.com/payments/success", "failure_url": "https://example.com/payments/failure" } ``` ### Response example ```json { "id": "pay_mbabizu24mvu3mela5njyhpit4", "action_id": "act_mbabizu24mvu3mela5njyhpit4", "amount": 6510, "currency": "USD", "approved": true, "status": "Authorized", "response_code": "10000", "response_summary": "Approved", "processed_on": "2023-09-10T10:11:12Z", "_links": { "self": { "href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4" }, "action": { "href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/actions" } } } ```