#mounika_best-practices

1 messages ¡ Page 1 of 1 (latest)

hot ridgeBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1259915209380724746

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

verbal token
#

You don't attach Charges to Payment Intents. Payment Intents create Charges when the Payment Intent is captured.

I'm not sure I fully understand what you're trying to do here. Can you elaborate on your payment scenario?

hidden sapphire
#

Using the API at checkout create a payment intent (By passing the source and customer). While doing the shipping, Can we use portion of payment intent and again use the same payment intent again (For EG: payment intent of 100 $ and first use 10$ and use 30$ for anither shipment like that)

#

Basically one payment intent auth for customer on order and multiple captures by vendor when they ship.

verbal token
#

That's not possible on a Payment Intent unfortunately. You either need to know the full total when the Payment Intent is captured, or you need to use an Invoice and add line items each time the total is updated. Regardless of which one you choose, you need to know the total amount before creating a payment

hidden sapphire
#

Okay Got it, One more Question When i create a payment intent and capture at a different time, It will create a charge right (Can i create the metadata on the charge not on payment intent)

verbal token
#

Correct

hidden sapphire
#

How can we do that, from the docs i am seeing PaymentIntentCreateParams params =
PaymentIntentCreateParams.builder()
.setAmount(1099L)
.setCurrency("usd")
.addPaymentMethodType("card")
.putMetadata("order_id", "6735")
.build(); how to add metadata on payment on creation, not on the charge associated to that payment intent

verbal token
#

That should just add metadata to the Payment Intent, no?

verbal token
#

There's no way to increase the total later on after a Payment Intent is created

hidden sapphire
#

Yes I do know the full amount beforhand (I am just looking to do multi captures on portions of that full amount)

hidden sapphire
verbal token
#

Got it. Yeah, in that case, multicapture should work fine

verbal token