Skip to content

Commit

Permalink
Add additional next action types to Setup Intent object
Browse files Browse the repository at this point in the history
  • Loading branch information
bdaily-stripe committed Oct 1, 2024
1 parent a3dfb93 commit a0ea5ab
Showing 1 changed file with 65 additions and 3 deletions.
68 changes: 65 additions & 3 deletions types/api/setup-intents.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,30 @@ export namespace SetupIntent {
}

export interface NextAction {
redirect_to_url?: NextAction.RedirectToUrl;

/**
* Type of the next action to perform, one of `redirect_to_url` or `use_stripe_sdk`.
* Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`.
*/
type: string;

/**
* Contains instructions for authenticating a payment by redirecting your customer to another page or application.
*/
redirect_to_url?: NextAction.RedirectToUrl;

/**
* When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js.
*/
use_stripe_sdk?: NextAction.UseStripeSdk;

/**
* The field that contains Cash App Pay QR code info
*/
cashapp_handle_redirect_or_display_qr_code?: NextAction.CashAppHandRedirectOrDisplayQrCode;

/**
* Contains details describing microdeposits verification flow.
*/
verify_with_microdeposits?: NextAction.VerifyWithMicrodeposits;
}

export namespace NextAction {
Expand All @@ -158,6 +171,55 @@ export namespace SetupIntent {
}

export interface UseStripeSdk {}

export interface CashAppHandRedirectOrDisplayQrCode {
/**
* The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration.
*/
hosted_instructions_url: string;

/**
* The url for mobile redirect based auth
*/
mobile_auth_url: string;

/**
* The field that contains CashApp QR code info
*/
qr_code: {
/**
* The date (unix timestamp) when the QR code expires.
*/
expires_at: number;

/**
* The image_url_png string used to render QR code
*/
image_url_png: string;

/**
* The image_url_svg string used to render QR code
*/
image_url_svg: string;
};
}

export interface VerifyWithMicrodeposits {
/**
* The timestamp when the microdeposits are expected to land.
*/
arrival_date: number;

/**
* The URL for the hosted verification page, which allows customers to verify their bank account.
*/
hosted_verification_url: string;

/**
* The type of the microdeposit sent to the customer. Used to distinguish between different verification methods.
*/
microdeposit_type: string | null;
}
}

export type Status =
Expand Down

0 comments on commit a0ea5ab

Please sign in to comment.