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 #1368

Merged
merged 1 commit into from
Mar 11, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions types/2020-08-27/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,11 @@ declare module 'stripe' {
*/
last4: string | null;

/**
* ID of the mandate used to make this payment or created by it.
*/
mandate: string | null;

/**
* True if this payment was marked as MOTO and out of scope for SCA.
*/
Expand Down
264 changes: 263 additions & 1 deletion types/2020-08-27/PaymentIntents.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ declare module 'stripe' {

boleto_display_details?: NextAction.BoletoDisplayDetails;

card_await_notification?: NextAction.CardAwaitNotification;

konbini_display_details?: NextAction.KonbiniDisplayDetails;

oxxo_display_details?: NextAction.OxxoDisplayDetails;
Expand Down Expand Up @@ -411,6 +413,18 @@ declare module 'stripe' {
pdf: string | null;
}

interface CardAwaitNotification {
/**
* The time that payment will be attempted. If customer approval is required, they need to provide approval before this time.
*/
charge_attempt_at: number | null;

/**
* For payments greater than INR 5000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required.
*/
customer_approval_required: boolean | null;
}

interface KonbiniDisplayDetails {
/**
* The timestamp at which the pending Konbini payment expires.
Expand Down Expand Up @@ -820,6 +834,11 @@ declare module 'stripe' {
*/
installments: Card.Installments | null;

/**
* Configuration options for setting up an eMandate for cards issued in India.
*/
mandate_options: Card.MandateOptions | null;

/**
* Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time.
*/
Expand Down Expand Up @@ -896,6 +915,59 @@ declare module 'stripe' {
}
}

interface MandateOptions {
/**
* Amount to be charged for future payments.
*/
amount: number;

/**
* One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
*/
amount_type: MandateOptions.AmountType;

/**
* A description of the mandate or subscription that is meant to be displayed to the customer.
*/
description: string | null;

/**
* End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
*/
end_date: number | null;

/**
* Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
*/
interval: MandateOptions.Interval;

/**
* The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
*/
interval_count: number | null;

/**
* Unique identifier for the mandate or subscription.
*/
reference: string;

/**
* Start date of the mandate or subscription. Start date should not be lesser than yesterday.
*/
start_date: number;

/**
* Specifies the type of mandates supported. Possible values are `india`.
*/
supported_types: Array<'india'> | null;
}

namespace MandateOptions {
type AmountType = 'fixed' | 'maximum';

type Interval = 'day' | 'month' | 'sporadic' | 'week' | 'year';
}

type Network =
| 'amex'
| 'cartes_bancaires'
Expand Down Expand Up @@ -1134,7 +1206,23 @@ declare module 'stripe' {
}

namespace Processing {
interface Card {}
interface Card {
customer_notification?: Card.CustomerNotification;
}

namespace Card {
interface CustomerNotification {
/**
* Whether customer approval has been requested for this payment. For payments greater than INR 5000 or mandate amount, the customer must provide explicit approval of the payment with their bank.
*/
approval_requested: boolean | null;

/**
* If customer approval is required, they need to provide approval before this time.
*/
completes_at: number | null;
}
}
}

type SetupFutureUsage = 'off_session' | 'on_session';
Expand Down Expand Up @@ -2125,6 +2213,11 @@ declare module 'stripe' {
*/
installments?: Card.Installments;

/**
* Configuration options for setting up an eMandate for cards issued in India.
*/
mandate_options?: Card.MandateOptions;

/**
* When specified, this parameter indicates that a transaction will be marked
* as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
Expand Down Expand Up @@ -2190,6 +2283,59 @@ declare module 'stripe' {
}
}

interface MandateOptions {
/**
* Amount to be charged for future payments.
*/
amount: number;

/**
* One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
*/
amount_type: MandateOptions.AmountType;

/**
* A description of the mandate or subscription that is meant to be displayed to the customer.
*/
description?: string;

/**
* End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
*/
end_date?: number;

/**
* Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
*/
interval: MandateOptions.Interval;

/**
* The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
*/
interval_count?: number;

/**
* Unique identifier for the mandate or subscription.
*/
reference: string;

/**
* Start date of the mandate or subscription. Start date should not be lesser than yesterday.
*/
start_date: number;

/**
* Specifies the type of mandates supported. Possible values are `india`.
*/
supported_types?: Array<'india'>;
}

namespace MandateOptions {
type AmountType = 'fixed' | 'maximum';

type Interval = 'day' | 'month' | 'sporadic' | 'week' | 'year';
}

type Network =
| 'amex'
| 'cartes_bancaires'
Expand Down Expand Up @@ -3376,6 +3522,11 @@ declare module 'stripe' {
*/
installments?: Card.Installments;

/**
* Configuration options for setting up an eMandate for cards issued in India.
*/
mandate_options?: Card.MandateOptions;

/**
* When specified, this parameter indicates that a transaction will be marked
* as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
Expand Down Expand Up @@ -3441,6 +3592,59 @@ declare module 'stripe' {
}
}

interface MandateOptions {
/**
* Amount to be charged for future payments.
*/
amount: number;

/**
* One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
*/
amount_type: MandateOptions.AmountType;

/**
* A description of the mandate or subscription that is meant to be displayed to the customer.
*/
description?: string;

/**
* End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
*/
end_date?: number;

/**
* Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
*/
interval: MandateOptions.Interval;

/**
* The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
*/
interval_count?: number;

/**
* Unique identifier for the mandate or subscription.
*/
reference: string;

/**
* Start date of the mandate or subscription. Start date should not be lesser than yesterday.
*/
start_date: number;

/**
* Specifies the type of mandates supported. Possible values are `india`.
*/
supported_types?: Array<'india'>;
}

namespace MandateOptions {
type AmountType = 'fixed' | 'maximum';

type Interval = 'day' | 'month' | 'sporadic' | 'week' | 'year';
}

type Network =
| 'amex'
| 'cartes_bancaires'
Expand Down Expand Up @@ -4741,6 +4945,11 @@ declare module 'stripe' {
*/
installments?: Card.Installments;

/**
* Configuration options for setting up an eMandate for cards issued in India.
*/
mandate_options?: Card.MandateOptions;

/**
* When specified, this parameter indicates that a transaction will be marked
* as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This
Expand Down Expand Up @@ -4806,6 +5015,59 @@ declare module 'stripe' {
}
}

interface MandateOptions {
/**
* Amount to be charged for future payments.
*/
amount: number;

/**
* One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
*/
amount_type: MandateOptions.AmountType;

/**
* A description of the mandate or subscription that is meant to be displayed to the customer.
*/
description?: string;

/**
* End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
*/
end_date?: number;

/**
* Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`.
*/
interval: MandateOptions.Interval;

/**
* The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`.
*/
interval_count?: number;

/**
* Unique identifier for the mandate or subscription.
*/
reference: string;

/**
* Start date of the mandate or subscription. Start date should not be lesser than yesterday.
*/
start_date: number;

/**
* Specifies the type of mandates supported. Possible values are `india`.
*/
supported_types?: Array<'india'>;
}

namespace MandateOptions {
type AmountType = 'fixed' | 'maximum';

type Interval = 'day' | 'month' | 'sporadic' | 'week' | 'year';
}

type Network =
| 'amex'
| 'cartes_bancaires'
Expand Down
15 changes: 6 additions & 9 deletions types/2020-08-27/PaymentLinks.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,11 @@ declare module 'stripe' {
}

interface PaymentLinkCreateParams {
/**
* The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
*/
line_items: Array<PaymentLinkCreateParams.LineItem>;

/**
* Behavior after the purchase is complete.
*/
Expand Down Expand Up @@ -443,11 +448,6 @@ declare module 'stripe' {
*/
expand?: Array<string>;

/**
* The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.
*/
line_items?: Array<PaymentLinkCreateParams.LineItem>;

/**
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
*/
Expand Down Expand Up @@ -1262,10 +1262,7 @@ declare module 'stripe' {
* Creates a payment link.
*/
create(
params?: PaymentLinkCreateParams,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.PaymentLink>>;
create(
params: PaymentLinkCreateParams,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.PaymentLink>>;

Expand Down
Loading