Skip to content

Add presentPaymentOptions() to launch Payment Options sheet in Embedded.#13320

Draft
jaynewstrom-stripe wants to merge 11 commits into
masterfrom
jaynewstrom/embedded-payment-options-sheet
Draft

Add presentPaymentOptions() to launch Payment Options sheet in Embedded.#13320
jaynewstrom-stripe wants to merge 11 commits into
masterfrom
jaynewstrom/embedded-payment-options-sheet

Conversation

@jaynewstrom-stripe

Copy link
Copy Markdown
Collaborator

Summary

This PR introduces a presentPaymentOptions() API to the EmbeddedPaymentElement, enabling the presentation of a payment options sheet where a customer can select or add a payment method.

Motivation

To support a new flow where the customer can explicitly choose or add a payment method from an options sheet within embedded payment flows. This is foundational for a better, more flexible embedded experience and prepares the ground for additional feature extensibility.

Testing

  • Added tests
  • Modified tests
  • Manually verified

Changelog

  • [Added] presentPaymentOptions() method to EmbeddedPaymentElement for displaying a payment options sheet.

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Diffuse output:

OLD: paymentsheet-example-release-master.apk (signature: V1, V2)
NEW: paymentsheet-example-release-pr.apk (signature: V1, V2)

          │              compressed              │           uncompressed           
          ├─────────────┬─────────────┬──────────┼───────────┬───────────┬──────────
 APK      │ old         │ new         │ diff     │ old       │ new       │ diff     
──────────┼─────────────┼─────────────┼──────────┼───────────┼───────────┼──────────
      dex │     4.6 MiB │     4.6 MiB │ +4.4 KiB │   9.7 MiB │   9.7 MiB │ +8.2 KiB 
     arsc │     3.8 MiB │     3.8 MiB │      0 B │   3.8 MiB │   3.8 MiB │      0 B 
 manifest │     5.8 KiB │     5.8 KiB │      0 B │  30.6 KiB │  30.6 KiB │      0 B 
      res │ 1,023.3 KiB │ 1,023.3 KiB │      0 B │   1.7 MiB │   1.7 MiB │      0 B 
   native │     2.7 MiB │     2.7 MiB │      0 B │   2.7 MiB │   2.7 MiB │      0 B 
    asset │    19.4 KiB │    19.4 KiB │    +36 B │  29.4 KiB │  29.5 KiB │    +36 B 
    other │   245.2 KiB │   245.2 KiB │     -3 B │ 504.7 KiB │ 504.7 KiB │      0 B 
──────────┼─────────────┼─────────────┼──────────┼───────────┼───────────┼──────────
    total │    12.3 MiB │    12.3 MiB │ +4.5 KiB │  18.4 MiB │  18.4 MiB │ +8.2 KiB 

 DEX     │ old   │ new   │ diff              
─────────┼───────┼───────┼───────────────────
   files │     1 │     1 │   0               
 strings │ 45157 │ 45180 │ +23 (+54 -31)     
   types │ 14214 │ 14225 │ +11 (+40 -29)     
 classes │ 11563 │ 11573 │ +10 (+12 -2)      
 methods │ 63128 │ 63160 │ +32 (+1593 -1561) 
  fields │ 41099 │ 41182 │ +83 (+1534 -1451) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  320 │  320 │  0   
 entries │ 7486 │ 7486 │  0
APK
     compressed      │     uncompressed     │                                           
──────────┬──────────┼───────────┬──────────┤                                           
 size     │ diff     │ size      │ diff     │ path                                      
──────────┼──────────┼───────────┼──────────┼───────────────────────────────────────────
  4.6 MiB │ +4.4 KiB │   9.7 MiB │ +8.2 KiB │ ∆ classes.dex                             
  7.4 KiB │    +41 B │   7.3 KiB │    +41 B │ ∆ assets/dexopt/baseline.prof             
  1.2 KiB │     -5 B │     1 KiB │     -5 B │ ∆ assets/dexopt/baseline.profm            
 58.8 KiB │     -3 B │ 130.5 KiB │      0 B │ ∆ META-INF/CERT.SF                        
    272 B │     +1 B │     120 B │      0 B │ ∆ META-INF/version-control-info.textproto 
 55.5 KiB │     -1 B │ 130.4 KiB │      0 B │ ∆ META-INF/MANIFEST.MF                    
──────────┼──────────┼───────────┼──────────┼───────────────────────────────────────────
  4.7 MiB │ +4.5 KiB │    10 MiB │ +8.2 KiB │ (total)
DEX
STRINGS:

   old   │ new   │ diff          
  ───────┼───────┼───────────────
   45157 │ 45180 │ +23 (+54 -31) 
  
  + EMBEDDED_PRESENT_PAYMENT_OPTIONS_NOT_CONFIGURED
  + EMBEDDED_PRESENT_PAYMENT_OPTIONS_NO_LAUNCHER
  + FormRequested(code=
  + Lqi/m;
  + Lui/a0;
  + Lui/b0;
  + Lui/c0;
  + Lui/d0;
  + Lui/x;
  + Lui/y;
  + Lui/z;
  + Lvd/d1;
  + Lvf/j;
  + Lyk/m1;
  + Lzl/h4;
  + PaymentOptions
  + Present Payment Options
  + [Lqi/h;
  + [Lqi/l;
  + [Lse/n;
  + [Lth/m0;
  + [Lug/b3;
  + [Lug/z2;
  + [Lvd/y;
  + [Lvd/z0;
  + [Lvj/p3;
  + [Lvj/s3;
  + [Lvk/z0;
  + [Lwh/a2;
  + [Lwh/a9;
  + [Lwh/c4;
  + [Lwh/m7;
  + [Lwh/oa;
  + [Lyk/t0;
  + [Lz0/o5;
  + [Lzi/j;
  + [Lzl/b2;
  + [Lzl/c3;
  + [Lzl/e;
  + [Lzl/f3;
  + [Lzl/i1;
  + [Lzl/k;
  + [Lzl/l1;
  + [Lzl/m1;
  + [Lzl/p1;
  + embedded.present_payment_options.no_launcher
  + embedded.present_payment_options.not_configured
  + embeddedFormInteractorFactory
  + formScreenFactory
  + navigateToManageScreen
  + navigateToManageScreen()V
  + r8-map-id-c3736f58da1002bcb0d0449c156a3bd561a3355932cd906a6b7191e933f27e31
  + sheetActivityState
  + ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":23,"pg-map-id":"c3736f58da1002bcb0d0449c156a3bd561a3355932cd906a6b7191e933f27e31","r8-mode":"full","version":"8.13.19"}
  
  - Lvj/w3;
  - Lz0/w5;
  - [Lqi/k;
  - [Lse/m;
  - [Lth/l0;
  - [Lug/a3;
  - [Lug/y2;
  - [Lvd/x0;
  - [Lvd/x;
  - [Lvj/q3;
  - [Lvj/v3;
  - [Lvk/y0;
  - [Lwh/b4;
  - [Lwh/l7;
  - [Lwh/la;
  - [Lwh/y8;
  - [Lwh/z1;
  - [Lyk/s0;
  - [Lz0/p5;
  - [Lzi/i;
  - [Lzl/b3;
  - [Lzl/d;
  - [Lzl/e3;
  - [Lzl/g1;
  - [Lzl/g;
  - [Lzl/j1;
  - [Lzl/k1;
  - [Lzl/n1;
  - [Lzl/z1;
  - r8-map-id-46438d88d23da46b89a23e47986e90eb39e3b3d4658c0cb4d76fc3942c709c69
  - ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":23,"pg-map-id":"46438d88d23da46b89a23e47986e90eb39e3b3d4658c0cb4d76fc3942c709c69","r8-mode":"full","version":"8.13.19"}
  

TYPES:

   old   │ new   │ diff          
  ───────┼───────┼───────────────
   14214 │ 14225 │ +11 (+40 -29) 
  
  + Lqi/m;
  + Lui/a0;
  + Lui/b0;
  + Lui/c0;
  + Lui/d0;
  + Lui/x;
  + Lui/y;
  + Lui/z;
  + Lvd/d1;
  + Lvf/j;
  + Lyk/m1;
  + Lzl/h4;
  + [Lqi/h;
  + [Lqi/l;
  + [Lse/n;
  + [Lth/m0;
  + [Lug/b3;
  + [Lug/z2;
  + [Lvd/y;
  + [Lvd/z0;
  + [Lvj/p3;
  + [Lvj/s3;
  + [Lvk/z0;
  + [Lwh/a2;
  + [Lwh/a9;
  + [Lwh/c4;
  + [Lwh/m7;
  + [Lwh/oa;
  + [Lyk/t0;
  + [Lz0/o5;
  + [Lzi/j;
  + [Lzl/b2;
  + [Lzl/c3;
  + [Lzl/e;
  + [Lzl/f3;
  + [Lzl/i1;
  + [Lzl/k;
  + [Lzl/l1;
  + [Lzl/m1;
  + [Lzl/p1;
  
  - Lvj/w3;
  - Lz0/w5;
  - [Lqi/k;
  - [Lse/m;
  - [Lth/l0;
  - [Lug/a3;
  - [Lug/y2;
  - [Lvd/x0;
  - [Lvd/x;
  - [Lvj/q3;
  - [Lvj/v3;
  - [Lvk/y0;
  - [Lwh/b4;
  - [Lwh/l7;
  - [Lwh/la;
  - [Lwh/y8;
  - [Lwh/z1;
  - [Lyk/s0;
  - [Lz0/p5;
  - [Lzi/i;
  - [Lzl/b3;
  - [Lzl/d;
  - [Lzl/e3;
  - [Lzl/g1;
  - [Lzl/g;
  - [Lzl/j1;
  - [Lzl/k1;
  - [Lzl/n1;
  - [Lzl/z1;
  

METHODS:

   old   │ new   │ diff              
  ───────┼───────┼───────────────────
   63128 │ 63160 │ +32 (+1593 -1561) 
  
  + a1.h <init>(d0, a, a, int, int)
  + a6.a0 e() → v0
  + ai.n0 <init>(j, r, m, z, c, w)
  + androidx.lifecycle.b A(j2, Context, int) → LayerDrawable
  + androidx.lifecycle.b B(Context, int) → ColorStateList
  + androidx.lifecycle.b C(boolean)
  + androidx.lifecycle.b D(a1, i2)
  + androidx.lifecycle.b E(Drawable, int, PorterDuff_Mode)
  + androidx.lifecycle.b y() → c
  + androidx.lifecycle.b z()
  + androidx.lifecycle.i1 d(i1, List, p1, Set) → a
  + b0.a0 <init>(h0, c, a, int)
  + bd.d0 <init>(e, c, String, g3)
  + bd.m b() → j0
  + c0.h <init>(List, w0, boolean, l, r1, e, int)
  + cf.o0 <init>(z, w1, boolean, Throwable, s, int)
  + cf.q0 Q(z, w1, boolean, Throwable, s, r, int)
  + cf.y <init>(z, boolean, k3, a1)
  + cf.y <init>(x2, Set, boolean, p1)
  + cg.z2 s() → na
  + ci.v0 <init>(e, c, b, c0, h, h)
  + cj.p <init>(h, h, d, h, h, h, d, d, d, int)
  + com.stripe.android.paymentelement.embedded.sheet.EmbeddedSheetActivity D(r, q, r, int)
  + com.stripe.android.paymentelement.embedded.sheet.EmbeddedSheetActivity H() → r
  + com.stripe.android.paymentelement.embedded.sheet.EmbeddedSheetActivity I(i)
  + d0.o1 d(m1)
  + d0.o1 e(m1)
  + df.r i(w)
  + df.r k(a0, d0) → a0
  + dh.a0 i(String, a3, o, c) → Object
  + dh.b0 <init>(f, e, c, c, d, c, d, a, h, h)
  + el.i l(k, List, String, int) → q3
  + g8.k d(m)
  + gf.c <init>(boolean, t0, a, a, int, int)
  + gf.c <init>(boolean, k3, g, int, z, int)
  + 
...✂

@jaynewstrom-stripe jaynewstrom-stripe force-pushed the jaynewstrom/embedded-payment-options-sheet branch from 2cce5ea to 9f10bea Compare July 1, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant