#shinnosuke-hirota_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1232847612244262952
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there, it looks like payment_method_data[type] is missing in your reuqest, can you share with me the complete code?
var requestParam = PaymentIntentCreateParams.builder()
.setCurrency("jpy")
.setAmount((long) totalAmount)
.setCustomer(stripeCustomerId)
.setPaymentMethod(stripePaymentMethodId)
.setPaymentMethodData(
PaymentMethodData
.builder()
.setType(Type.valueOf("card"))
.setBillingDetails(
BillingDetails
.builder()
.setEmail(userInfo.email())
.setName(userInfo.name())
.setAddress(
Address
.builder()
.setCountry("JP")
.setState(userInfo.region())
.setCity(userInfo.city())
.setLine1(userInfo.address())
.setLine2(userInfo.building())
.setPostalCode(userInfo.postCode())
.build()
).build()
).build()
)
.setCaptureMethod(CaptureMethod.AUTOMATIC)
.build();
I don't want to specify some payment services (such as PAYPAL) as PaymentMethodData, but just execute credit card payments by adding customer info
Ok, right now you are setting the address as the billing details to the payment method object, why don't you set the address on the customer object directly?
i didn't know that solution
but we would like to attach address to PaymentIntet itself not customer
since we would like to accept customer could have mutiple billing address
Alternative you can set the address as metadata to the PaymentIntent https://docs.stripe.com/metadata
Do you intent to surface the billing address to customer in invoices ?
it sounds better
Do you intent to surface the billing address to customer in invoices ?
I have no intention of doing so at this time.
Ok, if it's just your own record keeping purpose, you can just use metadada to store custom information that you want to attach to paymentIntents
thank you so much for your help