Skip to content

Commit de5c1b0

Browse files
authored
Merge pull request #494 from Adyen/feature/addReturnUrlDocs
Added documentation for specifying the returnUrl
2 parents cb27078 + 79266fb commit de5c1b0

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ release a new version when we need to.
5454
## Requirements:
5555

5656
* [Checkout API v71](https://docs.adyen.com/api-explorer/Checkout/71/overview) or later.
57+
* Get familiar with defining the right [returnUrl](/doc/RETURN_URL.md).
5758

5859
#### Android
5960

doc/RETURN_URL.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Setting up the returnUrl
2+
3+
The `returnUrl` is a **mandatory** configuration for handling payment redirections, such as 3DS2 web
4+
challenges or other redirect-based payment methods. It specifies the URL where the shopper should be
5+
redirected back to your app after completing an action. This URL must be **provided as a parameter
6+
in your `/sessions` or `/payments` request**.
7+
8+
**Important considerations:**
9+
10+
* When using the `/sessions` flow, you need to know the platform (Android or iOS) and the
11+
integration type (Drop-in or Components) upfront to correctly configure the `returnUrl`.
12+
* The maximum length for a `returnUrl` is **1024 characters**.
13+
14+
## For Android:
15+
16+
For Android, the returnUrl structure and prerequisites differ based on whether you are using the
17+
**Drop-in** or **Components** integration.
18+
19+
### Android Drop-in
20+
21+
When using the Drop-in solution, the returnUrl is **predefined**.
22+
23+
* **Format:** `adyencheckout://` scheme, followed by your **package name**.
24+
* **Example:** `adyencheckout://com.adyen.adyen_checkout_example`.
25+
26+
The `AdyenCheckout.instance.getReturnUrl()` method is available to provide this string value. You
27+
can also provide the string as a hardcoded constant.
28+
29+
### Android Components
30+
31+
For Components integration on Android, you need to define a **custom intent filter**.
32+
33+
* **Format:** `adyencheckout://` scheme, followed by your **package name**.
34+
* **Path:** You **must add a path**.
35+
* **Example:** `adyencheckout://com.adyen.adyen_checkout_example/adyenPayment`.
36+
37+
**Prerequisites for Android Components:**
38+
39+
* **Add a [custom intent](https://github.com/Adyen/adyen-flutter/blob/main/example/android/app/src/main/AndroidManifest.xml#L29) filter** to your `Manifest.xml` file.
40+
* Providing an alternative custom scheme is not yet supported.
41+
42+
## For iOS:
43+
44+
For iOS, the returnUrl setup is **consistent for both Drop-in and Components** integrations.
45+
46+
* **Format:** You need to **define a unique custom URL scheme** for your app.
47+
* **Example:** `com.mydomain.adyencheckout://`.
48+
49+
**Prerequisites for iOS:**
50+
51+
* **Add the [return URL handler](https://github.com/Adyen/adyen-flutter/blob/main/example/ios/Runner/AppDelegate.swift#L18)** to your `AppDelegate` in your native iOS layer.
52+
* **Configure the [custom URL scheme](https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app)** in your your `Info.plist` file.

0 commit comments

Comments
 (0)