#notdrwho_paymentelement-pmtypes
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/1219691502943600760
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
this should not show cashapp
"payment_method_types": [
"card"
],
that is set in the intent
Hi ๐
You define which payment methods you will accept in the payment_method_types parameter.
https://docs.stripe.com/api/payment_intents/create#create_payment_intent-payment_method_types
Try passing in payment_method_types=['card']
thank you for your response, its already there -
$setupIntent = $this->client->setupIntents->create( array_filter( [
'customer' => $customer->id,
'description' => trim( $actionTaken->action->action_meta->stripe_receipt_description_one_time ?? '' ) ?: null,
'metadata' => [
'action_taken_id' => $actionTaken->action_taken_id,
'interval' => (string) $interval->desc,
'amount' => $amount / $split_interval,
'type' => (string) DonationType::SPLIT(),
'spark_id' => $user->ID,
],
'payment_method_types' => ['card']
] ) );
the dumped json -
{
"amount": 10000,
"customer": --REDACTED--,,
"paymentIntent": {
"id": --REDACTED--,,
"object": "setup_intent",
"application": null,
"automatic_payment_methods": null,
"cancellation_reason": null,
"client_secret": --REDACTED--,
"created": 1710866973,
"customer": --REDACTED--,,
"description": null,
"flow_directions": null,
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
"mandate": null,
"metadata": {
"action_taken_id": "1887",
"amount": "2500",
"interval": "quarterly",
"spark_id": "13220",
"type": "split"
},
"next_action": null,
"on_behalf_of": null,
"payment_method": null,
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"single_use_mandate": null,
"status": "requires_payment_method",
"usage": "off_session"
}
}
@quasi geode do you have a specific setup intent ID we can take a look at? Also, how are you integrating with the Payment Element? Are you providing it with the setup intent ID when you initialize elements?
notdrwho_paymentelement-pmtypes
yeah the reason you're seeing cashapp is because you're using the deferred intent flow, which looks at the mode/currency/amount you set client-side when you initialized element to dyamically decide which PM types to display
If you want to specify which specific PM types you want to display client-side you can set this: https://docs.stripe.com/js/elements_object/create_without_intent#stripe_elements_no_intent-options-paymentMethodTypes