Stripity_stripe direct charge question

Hey there,
does anyone have experience with stripity_stripe?
How do you need to add the Stripe-Account header in order to create a charge for a connected account?


Because this way:

  Stripe.Charge.create(
      %{
        amount: source.amount,
        currency: source.currency,
        metadata: source.metadata,
        source: source,
        application_fee_amount: 100
      },
      stripe_account: "acct_1EpxmGFP2OhfH8nM"
    )

does not work at all :smiley:

Thanks

ok here is how:

you do it like this:

    Stripe.Charge.create(
      %{
        amount: source.amount,
        currency: source.currency,
        metadata: source.metadata,
        source: source,
        application_fee_amount: 100
      },
      connect_account: "acct_xxxxxxxxxxxx"
    )

and don’t forget to add the connect_account when you want to retrieve the source as the 3rd param

2 Likes