Skip to content

Commit

Permalink
payment type update
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitdas13 committed May 6, 2024
1 parent ebbce2b commit e3f2af3
Showing 1 changed file with 60 additions and 43 deletions.
103 changes: 60 additions & 43 deletions lib/types/payments.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ export declare namespace Payments {
* The unique identifier of the customer you want to charge.
*/
customer_id: string;
/**
* The unique identifier of the subscription.
*/
subscription_id?: string;
/**
* The authentication channel for the payment. Possible value is `browser` or `app`
*/
authentication?: {
authentication_channel: string;
};
}

interface RazorpayPaymentCreateRequestBody extends RazorpayPaymentBaseRequestBody { }
Expand Down Expand Up @@ -233,7 +243,7 @@ export declare namespace Payments {
/**
* The name of the aggregator that provided the token. Possible values are `Visa`, `Mastercard`, `Amex` or `HDFC for Diners`
*/
provider_type?: string;
provider_type?: string;
}

interface RazorpayCardCreateRequest extends RazorpayCardBaseRequestBody { }
Expand Down Expand Up @@ -426,7 +436,7 @@ export declare namespace Payments {
/**
* Details of the expiry of the UPI link
*/
upi: {
upi?: {
/**
* Specify the type of the UPI payment flow.
* Possible values: `collect` (default), `intent`
Expand All @@ -439,6 +449,10 @@ export declare namespace Payments {
*/
expiry_time?: number;
}
/**
* Token of the saved VPA.
*/
token?: string;
}

interface RazorpayPaymentQuery extends RazorpayPaginationOptions {
Expand All @@ -455,54 +469,51 @@ export declare namespace Payments {
*/
authentication_channel: 'browser' | 'app'
}
}

interface BrowserInfo {
/**
* Information regarding the customer's browser.
* This parameter need not be passed when `authentication_channel=app`.
* Indicates whether the customer's browser supports Java.
* Obtained from the `navigator` HTML DOM object.
*/
browser?: {
/**
* Indicates whether the customer's browser supports Java.
* Obtained from the `navigator` HTML DOM object.
*/
java_enabled: boolean;
/**
* ndicates whether the customer's browser is able to execute JavaScript.
* Obtained from the `navigator` HTML DOM object.
*/
javascript_enabled: boolean;
/**
* Time difference between UTC time and the cardholder browser local time.
* Obtained from the `getTimezoneOffset()` method applied to Date object.
*/
timezone_offset: number;
/**
* Total width of the payer's screen in pixels.
* Obtained from the `screen.width` HTML DOM property.
*/
screen_width: number;
/**
* Obtained from the `navigator` HTML DOM object.
*/
screen_height: number;
/**
* Obtained from payer's browser using
* the `screen.colorDepth` HTML DOM property.
*/
color_depth: string;
/**
* Obtained from payer's browser using the navigator.
* language HTML DOM property. Maximum limit of 8 characters.
*/
language: string;
}
java_enabled: boolean;
/**
* ndicates whether the customer's browser is able to execute JavaScript.
* Obtained from the `navigator` HTML DOM object.
*/
javascript_enabled: boolean;
/**
* Time difference between UTC time and the cardholder browser local time.
* Obtained from the `getTimezoneOffset()` method applied to Date object.
*/
timezone_offset: number | string;
/**
* Total width of the payer's screen in pixels.
* Obtained from the `screen.width` HTML DOM property.
*/
screen_width: number | string;
/**
* Obtained from the `navigator` HTML DOM object.
*/
screen_height: number | string;
/**
* Obtained from payer's browser using
* the `screen.colorDepth` HTML DOM property.
*/
color_depth: number | string;
/**
* Obtained from payer's browser using the navigator.
* language HTML DOM property. Maximum limit of 8 characters.
*/
language: string;
}

interface RazorpayPaymentS2SCreateRequestBody extends RazorpayPaymentBaseRequestBody {
save:boolean | number;
save: boolean | number;
/**
* Pass the unique token id created when the customer made the first payment.
*/
token?:string;
token?: string;
/**
* Pass the sub-merchant's unique identifier.
*/
Expand All @@ -521,6 +532,12 @@ export declare namespace Payments {
* Default value will be passed by Razorpay if not provided by merchant.
*/
user_agent: string | null;
provider_name?: string;
/**
* Information regarding the customer's browser.
* This parameter need not be passed when `authentication_channel=app`.
*/
browser?: Partial<BrowserInfo>
}

interface RazorpayPaymentS2SJson {
Expand Down Expand Up @@ -560,7 +577,7 @@ export declare namespace Payments {
}

interface ExpandDetails {
'expand[]': 'card' | 'emi' | 'offers' | 'upi'
'expand[]': 'card' | 'emi' | 'offers' | 'upi'
}

}
Expand Down

0 comments on commit e3f2af3

Please sign in to comment.