#sdasdq3we

1 messages · Page 1 of 1 (latest)

robust sphinxBOT
#

Hello! We'll be with you shortly. 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.

peak inlet
#

hi! you'd calculate 10% of the amount and pass the required values to the API(the guide you're using for Connect will have a section for how to pass application_fee_amount).

exotic glen
#

Can we do something so we don't have to pass amount.

peak inlet
#

no, it's an API and you need to write code to calculate the appropriate values to define what you are charging your customer and what fee/split you are taking, the API does not take a percentage definition.

exotic glen
#

hey

#

Do I have to calculate this amount while I am creating produce and price object?

tepid sleet
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

tepid sleet
exotic glen
#

In which object?

#

I am using product and price object.

tepid sleet
#

How are you charging your customers right now?

exotic glen
#

I am creating chekout session

tepid sleet
#

Are you using planning to use Direct Charges (charge happens on the Connected account) or Destination Charges (charge happens on the Platform)?

exotic glen
#

destination charges

tepid sleet
exotic glen
#

Yes but I am not using "PaymentIntentCreateOptions" anywhere in code.

exotic glen
#

Where do I wirte code for this payment_intent_data.transfer_data.amount

tepid sleet
#

Could you please share the code where you create the Checkout Session?

exotic glen
#
{
    Customer = companyModel.StripeCustomerId,
    LineItems = LineItems,
    Mode = "subscription",
    SuccessUrl = $"{_httpContextAccessor.HttpContext.Request.Scheme}://{_httpContextAccessor.HttpContext.Request.Host}/CheckOut/Index?session_id={sessionId}",
    CancelUrl = $"{_httpContextAccessor.HttpContext.Request.Scheme}://{_httpContextAccessor.HttpContext.Request.Host}/Subscription/CreateSubscription?CompanyId={companyModel.CompanyId}&SubscriptionId={companyModel.subscriptionPlanModel.SubscriptionPlanId}",
    PaymentMethodTypes = new List<string> { "card" },
};

if (planDiscountmodel != null && planDiscountmodel.plandiscountid != Guid.Empty && planDiscountmodel.discountamount > 0)
{
    options.Discounts = new List<SessionDiscountOptions> {
        new SessionDiscountOptions() {
            Coupon = planDiscountmodel.stripeplandiscountid,
        }
    };
}```
#
  string strStripeConnectedAccountId = _configurationRepository.GetConfigurationSettingByParameterName(ConfigurationParameterConstants.StripeConnectedAccountId).ParameterValue;
  RequestOptions requestOptions = new()
  {
      StripeAccount = strStripeConnectedAccountId
  };
  return service.Create(options, requestOptions: requestOptions);```
tepid sleet
#

Sorry, what language is this exactly?

exotic glen
#

C#

#

.net

tepid sleet
#

I believe you should add a parameter like this:

PaymentIntentData = new SessionPaymentIntentDataOptions
{
    ApplicationFeeAmount = 500
}
exotic glen
#

ohk

#

The 'payment_intent_data[transfer_data][destination]' param cannot be set to your own account.

tepid sleet
#

It needs to be the account ID of your Connected account (where you wish to transfer).

exotic glen
#

Yes I am passing that account id.

tepid sleet
exotic glen
#

While creating any product I was not passing "RequestOptions"

#

Now I am passing it everywhere.

tepid sleet
exotic glen
#

Yes

tepid sleet
#

You don't need it if you use the destination charges.

exotic glen
#

ok

tepid sleet