#davidl-direct-charges

1 messages · Page 1 of 1 (latest)

deft dirge
#

Hi! Yep, the customer must be created on the Connected Account as well.

dapper viper
#

That's what I thought, however, when I go to charge the card is says customer not found

deft dirge
#

That is likely because the customer and the card aren't both on the Connected Account

#

Or, you aren't passing the Stripe Account header when creating the charge

dapper viper
#

`$stripe = new StripeClient( env( 'STRIPE_SECRET' ) );

        $customer = $stripe->customers->create( [
            'source' => $source,
            'email'  => $invoice->deal->customer->email
        ], [ 'stripe_account' => $invoice->deal->company->stripe_connect_id ] );

        $charge = $stripe->charges->create( [
            'amount'         => $amount,
            'currency'       => 'usd',
            'customer'       => $invoice->deal->customer->stripe_id,
            'transfer_group' => $transfer_group,
            'receipt_email'  => $invoice->deal->customer->email,
            'statement_descriptor' => 'Sod Project',
        ], [ 'stripe_account' => $invoice->deal->stripe_connect_id ] );`
deft dirge
#

Feel free to provide a request ID and I can take a look

#

Is there a reason you are using the Charges API and the Sources API versus the PaymentIntents API and the PaymentMethods API?

#

The Charges/Sources API are deprecated... I'd highly recommend using PaymentIntents and PaymentMethods

dapper viper
#

This was built a few years ago - I dont think payment intent was out

#

oh gotcha

deft dirge
#

Ah that makes sense

#

Can you provide a request ID where you are hitting the error?

dapper viper
#

Yeah let me try to duplicate it. I deleted all my test data because I thought there might be some duplicate customer issues or something

#

Payment intent flow is much more integrated and intense. Was hoping to avoid it haha

deft dirge
#

It isn't any more complex

#

In fact, if you are planning on using multiple types of payment methods then it is much simpler

dapper viper
#

oh yeah? ok cool. I'll check it out

#

yeah we currently offer ACH via plaid

deft dirge
#

But if you already have an integration built then I understand using Charges/Sources

dapper viper
#

is all that the same/

deft dirge
#

ACH is not yet released for PaymentMethods yet, but it will be soon

#

If you are interested for early access you can reach out to our Support team

dapper viper
#

should I hold off on migrating until then?

deft dirge
#

If you are interested in migrating then I'd recommend reaching out to Support and asking about ACH on PaymentMethods!

dapper viper
#

ok cool

#

will do

#

I also plan on dynamically changing between direct charge and separate charge and transfer depending on the user. Is that supported with PI

deft dirge
#

Yep.

#

You would write the logic on your end just like you would with Charges API

#

But PaymentIntents can do everything Charges can (and much more)

#

PaymentIntents still use Charges under the hood

dapper viper
#

ok great

#

thanks for the help!

deft dirge
#

👍

dapper viper
#

Can you do payment intent with our own checkout form?

deft dirge
#

Yep

dapper viper
#

Looks like you guys launched quotes too! Pretty cool

#

it's been a while