#arti-villa_api

1 messages ¡ Page 1 of 1 (latest)

sleek mothBOT
#

👋 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/1333398106850459732

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

celest atlas
#

You can get the metadata from the Checkout Session object: cs_test_b1Ti2f6fZzYCRatUg1GOGrsVnSovuVokBpvRdr6BTtFP3NvbMGqQVELeIp

brittle juniper
#

there is no hook?

celest atlas
brittle juniper
#

no not webhook. just a react hook like useCheckout()

#

the client secret is getting passed in the parent provider so I would assume its accessible in the child:

'use client';

import { useEffect, useState } from 'react';
import { useSearchParams } from 'next/navigation';
import { CheckoutProvider } from '@stripe/react-stripe-js';
import { loadStripe } from '@stripe/stripe-js';
import { CheckoutForm } from './checkout-form';
import { appearance } from './styles';

const stripe = loadStripe(process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!, {
  betas: ['custom_checkout_beta_5'],
});

export default function Checkout() {
  const [clientSecret, setClientSecret] = useState<string | null>(null);
  const searchParams = useSearchParams();

  useEffect(() => {
    const secret = searchParams.get('client_secret');
    if (secret) {
      setClientSecret(secret);
    }
  }, [searchParams]);

  if (!clientSecret) return null;

  return (
    <CheckoutProvider
      stripe={stripe}
      options={{
        clientSecret,
        elementsOptions: {
          appearance,
        },
      }}
    >
      <CheckoutForm />
    </CheckoutProvider>
  );
}
celest atlas
#

Ah no AFAIK, you need to fetch the Checkout Details

brittle juniper
#

got it

#

will make another hook

#

but would be nice if they just added it to useCheckout()

celest atlas
#

Happy to help!

brittle juniper
#

would i put a separate request in for this?

celest atlas
potent elbow
#

I am trying to implement virtual card acquisition for customers using stripe API > I am getting
"error": "No such issuing cardholder: 'Your account is not set up to use Issuing. Please visit https://dashboard.stripe.com/issuing/overview to get started.'"

celest atlas
potent elbow
#

I am in sandbox environment

celest atlas
#

Each APi call have a requestId even in sandbox.

sleek mothBOT