From 26039834508082af2e934f6aafb89e447105fd5a Mon Sep 17 00:00:00 2001 From: mehin Date: Mon, 22 Dec 2025 16:24:05 +0000 Subject: [PATCH 1/2] add fetch active installment plans --- src/processout/processout.ts | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/processout/processout.ts b/src/processout/processout.ts index 172eab4..f522952 100644 --- a/src/processout/processout.ts +++ b/src/processout/processout.ts @@ -24,6 +24,18 @@ interface CardInformation { type: string } +interface InstallmentPlan { + id: string + name: string + description: string + number_of_installments: number +} + +interface FetchInstallmentPlansResponse { + installment_plans: InstallmentPlan[] + success: boolean +} + /** * ProcessOut module/namespace */ @@ -1669,6 +1681,34 @@ module ProcessOut { ) } + /** + * Fetch active installment plans for the project + * @param {callback} success + * @param {callback} error + * @return {void} + */ + public fetchActiveInstallmentPlans( + success: (data: FetchInstallmentPlansResponse) => void, + error: (err: Exception) => void, + ): void { + this.apiRequest( + "GET", + "installment-plans/active", + {}, + function (data: any, req: XMLHttpRequest, e: Event): void { + if (!data.success) { + error(new Exception(data.error_type, data.message)) + return + } + + success(data) + }, + function (req: XMLHttpRequest, e: Event, errorCode: ApiRequestError): void { + error(new Exception(errorCode)) + }, + ) + } + protected handleCardActions( method: string, endpoint: string, @@ -1720,6 +1760,7 @@ module ProcessOut { preferred_scheme: options.preferred_scheme, preferred_card_type: options.preferred_card_type, split_allocations: options.split_allocations, + installment_plan_id: options.installment_plan_id, } payload = this.injectDeviceData(payload) From 2a5b3ef39bf27817f0dd8f915a0e3e7a0c0a3d9d Mon Sep 17 00:00:00 2001 From: Rashad-Hosseini-cko Date: Tue, 20 Jan 2026 15:37:26 +0000 Subject: [PATCH 2/2] v1.7.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 284ac9a..bef085c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "processout.js", - "version": "1.6.6", + "version": "1.7.0", "description": "ProcessOut.js is a JavaScript library for ProcessOut's payment processing API.", "scripts": { "build:processout": "tsc -p src/processout && uglifyjs --compress --keep-fnames --ie8 dist/processout.js -o dist/processout.js",