#videovillain_api
1 messages ยท Page 1 of 1 (latest)
๐ 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/1325770370430795837
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
can you calrify what is the issue exactly? maybe an error message, or a screenshot of the issue?
HI!
Okay, so, I have a process in my app where I send the user through the embedded process. That process works, it heads to the backend, does the accountsession, gives me the client_secret, and then the embedded page updates and I can follow the whole process
but then, when it's done, it just says, thanks for submitting, we'll look at it.
however, in the network i see that everything is actually completed
the account is finished, verified, can accept payments, can make charges, etc.
so... what am I missing that is amking it so the page doesn't update and allow me to continue letting the user do what I want to allow them to do?
here is the embeded code we are using:
<script setup lang="ts">
import { loadConnectAndInitialize } from "@stripe/connect-js";
// API call params
const uniqueKey = authStore.player.unique_key;
const sessionParams: AccountSessionsArgs = {
country: "JP",
};
const linkParams: AccountLinkArgs = {
country: "JP",
account_type: "account_onboarding", // "account_onboarding" OR "account_update"
refresh_url: `${import.meta.env.VITE_WEB_URL}/stripe-onboarding`,
return_url: `${import.meta.env.VITE_WEB_URL}/${uniqueKey}/courses`,
};
const container = ref<HTMLElement | null>(null);
onMounted(async () => {
const fetchClientSecret = async () => {
try {
const connectedAccount: AccountSession = await createAccountSessions(uniqueKey, sessionParams);
document.querySelector("#error")?.setAttribute("hidden", "");
return connectedAccount.client_secret;
} catch (e) {
console.error("An error occurred: ", e);
document.querySelector("#error")?.removeAttribute("hidden");
return undefined;
}
};
const stripeConnectInstance = await loadConnectAndInitialize({
publishableKey: `${import.meta.env.VITE_STRIPE_PUBLISHABLE_KEY}`,
fetchClientSecret
});
const accountOnboarding = stripeConnectInstance.create("account-onboarding");
accountOnboarding.setOnExit(() => {
console.log("User exited the onboarding flow");
router.push({ path: `/${uniqueKey}/courses` });
});
if (container.value) {
container.value.appendChild(accountOnboarding);
}
});
</script>
some code we are using to help you understand.
It is a Vue/Ionic app
Sorry, left some text in the line so maybe you thought was typing, but i was done ๐
Could you please share a screenshot of what you see exactly?
Hmm, this text doesn't look like it comes from Stripe.
?
that's 100% from you guys
I cna't even adjust the css for that embedded item
So you do see the onboarding?
after I finish verification, it starts the embedded part
yes, i finish it
but then it just sits there
is there not a formal completion like payments?
like, a redirect to a succeeded or something
or a link I provide so once it's done i can redirect them to where they can use the account or something else?
Since it's embedded, no redirects will happen. You will hovever be notified.
Do you see the callback in setOnExit being called? https://docs.stripe.com/connect/embedded-onboarding?lang=node#create-an-account-session
yes, I see that
const accountOnboarding = stripeConnectInstance.create("account-onboarding");
accountOnboarding.setOnExit(() => {
console.log("User exited the onboarding flow");
router.push({ path: `/${uniqueKey}/courses` });
});
Are you being redirected then?
I didn't see it no.
I am trying agian now
Okay, the redirect worked this time
but it is to the next part so let me keep going
meaning, it is asking for additional information since the first check completed, i have to enter some sort of thing for Japan specific purposes
Okay, well..... it all worked beautifully this time! haha
I wonder if our backend was just slow to react when was first trying? anyway
seems to be fixed ๐
hmmmm
but it says i'm not ready for payments now
I made a test account
What says?
and i returend true for charges
it*
how can I check my status for a connected account from the dashboard?
i'm logged in as the connected account now
and there are no pending notices about filling in information or missing data
Where do you see that you're "not ready for payments"?
ourbackend checks it
public function canMakeCharges($stripe_account_id) {
try {
// Retrieve the Stripe account details
$account = $this->stripe->accounts->retrieve($stripe_account_id);
// Check if charges are enabled for the account
return $account->charges_enabled;
} catch (Exception $e) {
// Handle other exceptions
return false;
}
}
and i'm getting the exception for this account
Exception meaning the request failed?
yes, this is the exception message:
This Stripe Connected Account Is Restricted.
that is our message, but it is only sent when the above is false
Is there a way to see my accounts object from the dashboard?
so I can make sure my charges_enabled is true and not false on your end?
then I can make sure it's our problem to deal with on the backend
Also, those connected accounts don't show up in our main Stripe Dashboard.
Please, let's keep your integration and Stripe separate, for clarity.
I understand you're getting a false returned from this method canMakeCharges.
Do you know if it's because $account->charges_enabled is false, or because an exception is thrown within the method?
Are you sure they're connected to the Platform account that you expect?
If not, it will explain why an exception in thrown in canMakeCharges and false is returned from the catch clause.
hmmm, when I do the embedding, you saw for yourself that it says PwR partners with Stripe
how could they not be connected to us?
Are you sure it's in the correct mode? Test/Live mode
In any case, please add a log to the method to print out any errors.
I will! It's getting late. I got things moving a lot further than when we started, so that's a win! If I have more trouble in the future, I'll make a new thread for help. Thanks for all the help thus far!
Happy to help.
give my thanks to soma too!
Oh!
sorry!
sort of unrelated
but, once I start something with stripe-js or connect-js, i forever see the
r.stripe.com/b and m.stripe.com/6 calls in my network tab... neverending
is there anything to be done about it?
That shouldn't be a problem. Stripe is collecting some data for analytics and fraud prevention.