Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 31, 2025

Removes the India-specific payment method mandate verification flow from the console.

Changes

  • SDK - Removed setupPaymentMandate() method from billing client
  • Store - Removed paymentMissingMandate store and checkForMandate() function
  • Component - Deleted paymentMandate.svelte alert component
  • Layout - Removed mandate check from organization billing plan initialization

Context

The mandate flow checked if Indian payment methods (country === 'in') had a null mandateId and prompted users to verify via Stripe setup. This functionality is no longer needed.

// Removed from +layout.svelte
if (org?.billingPlan !== BillingPlan.FREE) {
    await paymentExpired(org);
    await checkPaymentAuthorizationRequired(org);
-   await checkForMandate(org);  // ❌ Removed
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • o1.ingest.sentry.io
    • Triggering command: /opt/hostedtoolcache/node/22.21.1/x64/bin/node node /home/REDACTED/work/console/console/node_modules/.bin/../vitest/vitest.mjs run (dns block)
    • Triggering command: /opt/hostedtoolcache/node/22.21.1/x64/bin/node node build.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Remove everything manate related including:

  • console/src/lib/sdk/billing.ts

    Lines 1303 to 1321 in baf47f8

    async setupPaymentMandate(
    organizationId: string,
    paymentMethodId: string
    ): Promise<PaymentMethodData> {
    const path = `/account/payment-methods/${paymentMethodId}/setup`;
    const params = {
    organizationId,
    paymentMethodId
    };
    const uri = new URL(this.client.config.endpoint + path);
    return await this.client.call(
    'patch',
    uri,
    {
    'content-type': 'application/json'
    },
    params
    );
    }
  • export const paymentMissingMandate = writable<PaymentMethodData>(null);
    export async function checkForMandate(org: Organization) {
    const paymentId = org.paymentMethodId ?? org.backupPaymentMethodId;
    if (!paymentId) return;
    const paymentMethod = await sdk.forConsole.billing.getPaymentMethod(paymentId);
    if (paymentMethod?.mandateId === null && paymentMethod?.country.toLowerCase() === 'in') {
    headerAlert.add({
    id: 'paymentMandate',
    component: PaymentMandate,
    show: true,
    importance: 8
    });
    activeHeaderAlert.set(headerAlert.get());
    paymentMissingMandate.set(paymentMethod);
    }
    }
  • src/lib/components/billing/alerts/paymentMandate.svelte

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@appwrite
Copy link

appwrite bot commented Dec 31, 2025

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code

Tip

Schedule functions to run as often as every minute with cron expressions

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 31, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@stnguyen90 stnguyen90 marked this pull request as ready for review December 31, 2025 01:39
…orMandate, and paymentMandate component

Co-authored-by: stnguyen90 <[email protected]>
Copilot AI changed the title [WIP] Remove all manate related components and code Remove payment mandate setup functionality Dec 31, 2025
Copilot AI requested a review from stnguyen90 December 31, 2025 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants