Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Updates #1622

Merged
merged 1 commit into from Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
@@ -1 +1 @@
v207
v209
63 changes: 63 additions & 0 deletions types/2022-11-15/Checkout/Sessions.d.ts
Expand Up @@ -90,6 +90,8 @@ declare module 'stripe' {
*/
currency: string | null;

custom_text: Session.CustomText;

/**
* The ID of the customer for this Session.
* For Checkout Sessions in `payment` or `subscription` mode, Checkout
Expand Down Expand Up @@ -446,6 +448,34 @@ declare module 'stripe' {
}
}

interface CustomText {
/**
* Custom text that should be displayed alongside shipping address collection.
*/
shipping_address: CustomText.ShippingAddress | null;

/**
* Custom text that should be displayed alongside the payment confirmation button.
*/
submit: CustomText.Submit | null;
}

namespace CustomText {
interface ShippingAddress {
/**
* Text may be up to 500 characters in length.
*/
message: string;
}

interface Submit {
/**
* Text may be up to 500 characters in length.
*/
message: string;
}
}

type Locale =
| 'auto'
| 'bg'
Expand Down Expand Up @@ -1464,6 +1494,11 @@ declare module 'stripe' {
*/
currency?: string;

/**
* Display additional text for your customers using custom text.
*/
custom_text?: SessionCreateParams.CustomText;

/**
* ID of an existing Customer, if one exists. In `payment` mode, the customer's most recent card
* payment method will be used to prefill the email, name, card details, and billing address
Expand Down Expand Up @@ -1710,6 +1745,34 @@ declare module 'stripe' {
type Shipping = 'auto' | 'never';
}

interface CustomText {
/**
* Custom text that should be displayed alongside shipping address collection.
*/
shipping_address?: Stripe.Emptyable<CustomText.ShippingAddress>;

/**
* Custom text that should be displayed alongside the payment confirmation button.
*/
submit?: Stripe.Emptyable<CustomText.Submit>;
}

namespace CustomText {
interface ShippingAddress {
/**
* Text may be up to 500 characters in length.
*/
message: string;
}

interface Submit {
/**
* Text may be up to 500 characters in length.
*/
message: string;
}
}

interface Discount {
/**
* The ID of the coupon to apply to this Session.
Expand Down
5 changes: 5 additions & 0 deletions types/2022-11-15/PaymentIntents.d.ts
Expand Up @@ -745,6 +745,11 @@ declare module 'stripe' {
*/
data: string;

/**
* The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code.
*/
hosted_instructions_url: string | null;

/**
* The image_url_png string used to render QR code
*/
Expand Down
96 changes: 96 additions & 0 deletions types/2022-11-15/PaymentLinks.d.ts
Expand Up @@ -59,6 +59,8 @@ declare module 'stripe' {
*/
currency: string;

custom_text: PaymentLink.CustomText;

/**
* Configuration for Customer creation during checkout.
*/
Expand Down Expand Up @@ -193,6 +195,34 @@ declare module 'stripe' {

type CustomerCreation = 'always' | 'if_required';

interface CustomText {
/**
* Custom text that should be displayed alongside shipping address collection.
*/
shipping_address: CustomText.ShippingAddress | null;

/**
* Custom text that should be displayed alongside the payment confirmation button.
*/
submit: CustomText.Submit | null;
}

namespace CustomText {
interface ShippingAddress {
/**
* Text may be up to 500 characters in length.
*/
message: string;
}

interface Submit {
/**
* Text may be up to 500 characters in length.
*/
message: string;
}
}

interface PaymentIntentData {
/**
* Indicates when the funds will be captured from the customer's account.
Expand Down Expand Up @@ -587,6 +617,11 @@ declare module 'stripe' {
*/
currency?: string;

/**
* Display additional text for your customers using custom text.
*/
custom_text?: PaymentLinkCreateParams.CustomText;

/**
* Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers).
*/
Expand Down Expand Up @@ -732,6 +767,34 @@ declare module 'stripe' {

type CustomerCreation = 'always' | 'if_required';

interface CustomText {
/**
* Custom text that should be displayed alongside shipping address collection.
*/
shipping_address?: Stripe.Emptyable<CustomText.ShippingAddress>;

/**
* Custom text that should be displayed alongside the payment confirmation button.
*/
submit?: Stripe.Emptyable<CustomText.Submit>;
}

namespace CustomText {
interface ShippingAddress {
/**
* Text may be up to 500 characters in length.
*/
message: string;
}

interface Submit {
/**
* Text may be up to 500 characters in length.
*/
message: string;
}
}

interface LineItem {
/**
* When set, provides configuration for this item's quantity to be adjusted by the customer during checkout.
Expand Down Expand Up @@ -1158,6 +1221,11 @@ declare module 'stripe' {
*/
billing_address_collection?: PaymentLinkUpdateParams.BillingAddressCollection;

/**
* Display additional text for your customers using custom text.
*/
custom_text?: PaymentLinkUpdateParams.CustomText;

/**
* Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers).
*/
Expand Down Expand Up @@ -1249,6 +1317,34 @@ declare module 'stripe' {

type CustomerCreation = 'always' | 'if_required';

interface CustomText {
/**
* Custom text that should be displayed alongside shipping address collection.
*/
shipping_address?: Stripe.Emptyable<CustomText.ShippingAddress>;

/**
* Custom text that should be displayed alongside the payment confirmation button.
*/
submit?: Stripe.Emptyable<CustomText.Submit>;
}

namespace CustomText {
interface ShippingAddress {
/**
* Text may be up to 500 characters in length.
*/
message: string;
}

interface Submit {
/**
* Text may be up to 500 characters in length.
*/
message: string;
}
}

interface LineItem {
/**
* When set, provides configuration for this item's quantity to be adjusted by the customer during checkout.
Expand Down