#pallsmenis_api

1 messages ยท Page 1 of 1 (latest)

supple axleBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1305906401218007040

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

rigid rampart
#

they are seeing these invoices in the billing dashboard as overdue and we do not want this to happen
Which UI is this?

vast shoal
rigid rampart
#

Ah, so the customer portal

vast shoal
#

yes

#

we do not want this outstanding invoice section to show

rigid rampart
#

Where specifically does it say 'overdue'?

vast shoal
rigid rampart
#

Ah, ok. AFAIK that isn't configurable โ€“ it's just a list of 'open' invoices for that customer. Let me confirm

rigid rampart
vast shoal
#

yea I figured that, but I'm wondering if we set the due date on the invoices far in the future if this won't show

#

we are currently setting due date to null

#

and im wondering what that actually does

rigid rampart
vast shoal
#

oh okay

rigid rampart
#

I think that'll remove that, try and let me know

vast shoal
#

gotcha okay thanks

supple axleBOT
vast shoal
#

that did not hide it unfortunately

peak sage
#

Disabling the invoice history feature still shows the open invoice, you mean?

vast shoal
#

correct

#
{
  "id": "bpc_1QKLehGuMEaNSjGR4Z2xaI2s",
  "object": "billing_portal.configuration",
  "active": true,
  "application": null,
  "business_profile": {
    "headline": null,
    "privacy_policy_url": null,
    "terms_of_service_url": null
  },
  "created": 1731423923,
  "default_return_url": null,
  "features": {
    "customer_update": {
      "allowed_updates": [
        "email",
        "tax_id"
      ],
      "enabled": true
    },
    "invoice_history": {
      "enabled": false
    },
    "payment_method_update": {
      "enabled": false
    },
    "subscription_cancel": {
      "cancellation_reason": {
        "enabled": false,
        "options": [
          "too_expensive",
          "missing_features",
          "switched_service",
          "unused",
          "other"
        ]
      },
      "enabled": false,
      "mode": "at_period_end",
      "proration_behavior": "none"
    },
    "subscription_pause": {
      "enabled": false
    },
    "subscription_update": {
      "default_allowed_updates": [],
      "enabled": false,
      "proration_behavior": "none",
      "schedule_at_period_end": {
        "conditions": []
      }
    }
  },
  "is_default": false,
  "livemode": false,
  "login_page": {
    "enabled": false,
    "url": null
  },
  "metadata": {},
  "updated": 1731423923
}%       
#

im looking at a connected accounts customer portal, do I have you use a specific key for that account? I made that request with the key for the master account

#

I don't think there is a key per account actually

peak sage
#

im looking at a connected accounts customer portal, do I have you use a specific key for that account? I made that request with the key for the master account
What does this mean? How are you creating portal sessions, ultimately?

vast shoal
#

the portal I'm looking at is for a specific connected account, each of our customers has their own connected account and we include a link in our application for customers to go to their portal page. I'm not sure how its created techincally but I can figure it out if thats what I need to do

#
public async startCustomerPortalSession(): Promise<void> {
    if (stripeModule.isLoadingCustomerPortalSession) {
      return;
    }

    stripeModule.loadingCustomerPortalSession();

    try {
      const accountId: number = this.accountDesignInfo.accountId;
      const guardianId: number = (this.userDetail as { id: number }).id;
      const returnUrl: string = encodeURIComponent(window.location.href);
      const params: CustomerPortalSessionParams = {
        guardianId: guardianId,
        accountId: accountId,
        returnUrl: returnUrl
      };
      const stripeResponse = await stripeModule.createCustomerPortalSession(params);

      if (stripeResponse) {
        stripeModule.resetCustomerPortalSession();
        window.location.assign(stripeResponse);
      }
      else {
        console.error('Invalid stripe response or missing URL');
      }

    }
    catch (error) {
      stripeModule.resetCustomerPortalSession();
      console.error('Failed to create customer portal session:', error);
    }
  }
}
#

this is how we create it, via a link in our web application

#

using the stripe javascript module

#

oh its calling an API one sec

peak sage
#

the portal I'm looking at is for a specific connected account, each of our customers has their own connected account and we include a link in our application for customers to go to their portal page
connected accounts and customers are different things. Are you using those terms casually referring to your system, or in the context of Stripe Connect?

vast shoal
#

right, I mean our customers (not stripe) have connected accounts in stripe

#

but I see whats going on now

#

we are creating this on the fly with this config in the API

peak sage
#

Yes, you appears to be creating portal sessions, so you can share an example request ID from one of these and I can take a look at the config that got used.

#

Yes, i suspected you might not have updated the config in the place it was used

vast shoal
#

I have to change it here, but it will take me a little bit

#

ill get back to you

vast shoal
#

okay QQ: we are pulling the configuration for the portal like this:

const customerPortalConfig = await this.stripeService.stripe.billingPortal.configurations.list(
      {},
      {
        stripeAccount: account.id
      }
    )
#

the stripe account would be the connected account

#

but im not sure how to change that

#

BTW I hardcoded the configuration just to test and disabling invoice history does indeed hide it

#

I just have to figure out how to change the connected accounts portal configuration now

#

I see we are creating it via the API, so I can fix it for new ones but I need to chang existing ones

peak sage
#

Ok, if you created these initially, then you can /update them too