#anwar-paymentmethod-source

1 messages · Page 1 of 1 (latest)

cinder ore
#

@normal dust no there's no compatibility in that way
A PaymentMethod is the newer abstraction, it shipped in 2018, that's what everyone should use. If you are on that API, ignore default_source entirely, it doesn't matter/apply

normal dust
#

Can we talk?

#

Can we read card_id from stripe terminal?

cinder ore
#

we can talk, we're doing it right now yes

#

I really don't understand the question though and what Terminal has to do with the ask

#

Terminal uses PaymentIntent and PaymentMethod APIs

normal dust
#

can you call me?

radiant basalt
#

No, sorry, that's not something we can do

normal dust
#

can I schedule zoom meeting?

radiant basalt
#

No, if you want you request a phone call you can log in and "request a call" with support here: https://support.stripe.com/contact

But if you have specific technical questions about your integration I'm happy to help here

normal dust
#

ok
i am trying to read a card using stripe terminal for later charge.
1.by using terminal.readReusableCard()
got payment_method_id
2.using
$stripe->paymentMethods->attach(
'pm_................',
['customer' => 'cus_.............'],
['stripe_account' => 'acct_...............']
);
3.using
$stripe->customers->update(
'cus_',
['invoice_settings' => ['default_payment_method' => 'pm_']],
['stripe_account'=>'acct_']
);
after that payment bethod becomes default payment method not default source can i make it default source?

radiant basalt
#

No, that's for older source API integrations. For payment methods, there is no general default payment method, it's specific to invoices (and subscriptions, which use invoices).

What's your intended use case with the saved payment method?

normal dust
#

We are rental company in our current flow we save card as deafault_source for our customer and charge them later after equipment returned also upcharge if something is damaged.
But now client wanted to integrate stripe terminal and instead of filling out credit card information they just want to swipe and that card should be default source for that customer rest flow would be same!

radiant basalt
#

Are these subscription/invoice payments, or one time payments using payment intents?

normal dust
#

no

radiant basalt
#

Ok, so how are you creating those payments?

normal dust
#

$stripe->charges->create([
'amount' => $payableAmount,
'currency' => $this->currency_code,
'customer' => $stripe_cus_id,
'description' => 'Payment for order reference no# '.$order_info['reference'],
], ['stripe_account' => $stripe_configs['connected_account_id']]);

thick gyro
#

@normal dust looking, one sec

#

@normal dust Stripe Terminal mostly creates PaymentMethod objects, which you cannot use in default_source

#

is that what you're seeing?

normal dust
#

yeah

#

can we do payment through paymentMethod id

#

if yes how?

thick gyro
#

you create a PaymentIntent instead of a Charge, and you pass it under payment_method: pm_123 param i

normal dust
#

can you send link of docs?

#

can i also do refund and upcharge on that

thick gyro
#

you can refund yes, what do you mean by "upcharge"?

#

here are the docs

#

PaymentIntents are a state machine, rather than the simpler Charges which are more binary

#

so you need to create and confirm the PaymentIntent , to create the payment