#starky_connect-objects-subscriptions
1 messages ยท Page 1 of 1 (latest)
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.
- starky_api, 1 hour ago, 27 messages
- starky_api, 3 hours ago, 10 messages
๐ 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/1236014791688978543
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello the direct charges on the subscriptions (connected accounts do not work properly) THis is the code:
else
{
varcustomerOptions=newCustomerCreateOptions() { Email=body.Email, Name=body.Name, };
varcustomerService=newCustomerService();
customer=customerService.Create(customerOptions);
customer2=customerService.Create(customerOptions, requestOptions);
}
varephemeralKeyOptions=newEphemeralKeyCreateOptions
{
Customer=customer2.Id,
StripeVersion="2024-04-10",
};
varephemeralKeyService=newEphemeralKeyService();
varephemeralKey=awaitephemeralKeyService.CreateAsync(ephemeralKeyOptions, requestOptions);
Console.WriteLine("connect "+Environment.GetEnvironmentVariable("stripe_germ"));
Console.WriteLine("connect "+Environment.GetEnvironmentVariable("stripe_sand"));
if (body.Subscription==true)
{
varpaymentSettings=newSubscriptionPaymentSettingsOptions
{
SaveDefaultPaymentMethod="on_subscription",
};
varsubscriptionOptions=newSubscriptionCreateOptions
{
Customer=customer2.Id,
Items=newList<SubscriptionItemOptions>
{
newSubscriptionItemOptions
{
ย
PriceData=newSubscriptionItemPriceDataOptions{
UnitAmount=int.Parse(body.Amount),
Currency=body.Currency,
Product="prod_PnBFGQK88bHIwm",
Recurring=newSubscriptionItemPriceDataRecurringOptions{
Interval=body.Interval
},
},
TaxRates=newList<string>(){
body.VAT=="19"?"txr_1PCMHtIzpFSlCKHNlyL0IgAU":"txr_1PCMIBIzpFSlCKHNC7uLjgi4"
}
},
},
PaymentSettings=paymentSettings,
PaymentBehavior="default_incomplete",
ApplicationFeePercent=3,
Metadata=newDictionary<string, string>(){
{"patid", body.Patid},
{"total", $@"{(double.Parse(body.Amount) / 100).ToString()} EUR" },
{"value2", body.Amount},
{"language", body.Language},
{"customer_name", body.Name},
{"customer_id", customer2.Id },
{"customer_id2", customer.Id },
{"email", body.Email},
}
};
subscriptionOptions.AddExpand("latest_invoice.payment_intent");
varsubscriptionService=newSubscriptionService();
Subscriptionsubscription=subscriptionService.Create(subscriptionOptions, requestOptions);
it logs the correct accounts, but the subscription tries to create on the main account rather than the connected account.
HI ๐
That's a whole lot of unformatted text. Let me take a step back and review the request you provided
๐ ๐ Sorry about that.
basic story
- when trying to create a subscription on a connected account I get an error that the tax information does not exist.
- Upon investigating with one of your colleagues he alerted me that the account was wrong, however I am passing requestOptions with the correct connected account to subscriptionService.Create()
- Upon investingating I see the errors entering on the main account
Okay, looking at the request, you specified a TaxRate ID that does not exist on the account you are trying to create a subscription for
Otherwise that request is correct and should create a Subscription on the Connected Account
yes, but the "tax_rate " is for the connected account that is in Germany, not for the main account that is in Sweden. Of course it does not exist in the main account since the tax rate in Sweden is higher
or should I create a special tax rate for this case of the connected account?
The tax rate exists only on the account acct_1OttMdIzpFSlCKHN. The request you made was creating a subscription on account acct_1P1lTAII0FUqpRgj
I have the dashboard of the account acct_1P1lTAII0FUqpRgj and I see both txr_1PCMHtIzpFSlCKHNlyL0IgAU and txr_1PCMIBIzpFSlCKHNC7uLjgi4 on that account not on the main account acct_1OttMdIzpFSlCKHN
or when I create a tax_rate on the connected account dashboard, creates it on the main account?
Sorry about so many questions, quite complex scenario
We focus almost exclusively on the APIs here so I cannot inform you what behaviors occur in the Dashboard. I suspect the "view" is showing you multiple objects without making their relations clear
But I can tell you 100% that tax rate only exists on acct_1OttMdIzpFSlCKHN
okay, can I create a tax_rate via curl or api and if so could you point me in that direction of the documentation?
(and thank you for this help)
nevermind I found it ๐ thank you for this and you can close this ticket!
have a great weekend
No problem! Sometimes you just need to say (or type) these things out for the answer to become clear