#Randomuser2022
1 messages · Page 1 of 1 (latest)
What Stripe product are you using ? Stripe Elements ?
someone told me that when creating a Paymentlntent, we should contain "automatic_payment_methods[[enabled]"=true??
That's an API reference, can you share the guide link ?
You are using Stripe Element ?
yes
Google/Apple Pay will be displayed
when you have a valid card in your (Google/Apple) wallet and your website is being loaded over https.
where could i set up the card tho?
You need to have a valid card in your wallet
And for Apple you ned to follow some of Apple guide in order to Add a valid card:
https://support.apple.com/en-us/HT204506
For apple pay, also you need to verify/register your domain:
https://stripe.com/docs/stripe-js/elements/payment-request-button?client=react#verifying-your-domain-with-apple-pay
If you are using this option, and Affirm is activated in your account :
https://dashboard.stripe.com/settings/payment_methods
The payment method will be displayed automatically in your Element integration without any additional configuration
You need to register/complete activating these payment methods if your account is eligible to use that kind of PaymentMethods
yes, once it's activated, the Affirm PaymentMethod will be displayed in your Elements Integration.
thanks, mate! I'll have a try!
dear, it jumps to this document page: https://stripe.com/docs/payments/affirm/accept-a-payment?platform=checkout
do i need to follow pre-build check out package or direct API?
Did you tried to reload your Element integration and see if you have Affirm payments ?
Can you share a PaymentIntent Id you are using ?
{
"id": "evt_3NAPu1EydrSRkIrF1vurty9I",
"object": "event",
"api_version": "2022-11-15",
"created": 1684727961,
"data": {
"object": {
"id": "pi_3NAPu1EydrSRkIrF1in9Meza",
"object": "payment_intent",
"amount": 6500,
"amount_capturable": 0,
"amount_details": {
"tip": {
}
},
"amount_received": 0,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"client_secret": "pi_3NAPu1EydrSRkIrF1in9Meza_secret_QuZfdcTZUuTcQIJS0LyBJRzwT",
"confirmation_method": "automatic",
"created": 1684727961,
"currency": "usd",
"customer": null,
"description": null,
"invoice": null,
"last_payment_error": null,
"latest_charge": null,
"livemode": false,
"metadata": {
"sfid": "a237h000000ZXBhAAO"
},
"next_action": null,
"on_behalf_of": null,
"payment_method": null,
"payment_method_options": {
"card": {
"installments": null,
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"processing": null,
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "requires_payment_method",
"transfer_data": null,
"transfer_group": null
}
},
"livemode": false,
"pending_webhooks": 1,
"request": {
"id": "req_ekNjPwLtzYYXnJ",
"idempotency_key": "80fe4e2b-44e7-4176-85d5-bf316959fa78"
},
"type": "payment_intent.created"
}
"id": "pi_3NAPu1EydrSRkIrF1in9Meza"
thanks for sharing, checking...
You are not passing automatic_payment_methods when creating the PaymentIntent:
https://stripe.com/docs/api/payment_intents/create#create_payment_intent-automatic_payment_methods
Create another PaymentIntent
you mean go to Affirm and get it activated? not in stripe?
when we troubleshoot, it says remove the payment_method_types
in Stripe.
yeah or set automatic_payment_methods:true
You created that payment_intent before or after activating Affirm ,
it doesn't have this in JS?
we haven't actived Affirm
So that's why you are not seeing Affirm Payment.
this is in the backend.
so i have to active it first and then set automatic_payment_methods:true?
yes
where could i set up the activation?
Let me check your account once again...
do i need to provide login info?
nope
ok thanks!
I see here Affirm is well activated in your account:
https://dashboard.stripe.com/settings/payment_methods
Can you create another PaymentIntent please and check if Affirm is displayed in your Element integration ?
share with me that PaymentIntent Id and a screenshot of your integration
do i need to add this in my code (automatic_payment_methods:true) before create another inten?
yes please
we edit the code but don't know why it still the same
{
"id": "evt_3NAVrdEydrSRkIrF1SWMoYPu",
"object": "event",
"api_version": "2022-11-15",
"created": 1684750877,
"data": {
"object": {
"id": "pi_3NAVrdEydrSRkIrF1X9T9Xks",
"object": "payment_intent",
"amount": 6500,
"amount_capturable": 0,
"amount_details": {
"tip": {
}
},
"amount_received": 0,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"client_secret": "pi_3NAVrdEydrSRkIrF1X9T9Xks_secret_a3pgN1Te8WaLwuX8wMGmkvpTg",
"confirmation_method": "automatic",
"created": 1684750877,
"currency": "usd",
"customer": null,
"description": null,
"invoice": null,
"last_payment_error": null,
"latest_charge": null,
"livemode": false,
"metadata": {
"sfid": "a237h000000ZXFZAA4"
},
"next_action": null,
"on_behalf_of": null,
"payment_method": null,
"payment_method_options": {
"card": {
"installments": null,
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"processing": null,
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "requires_payment_method",
"transfer_data": null,
"transfer_group": null
}
},
"livemode": false,
"pending_webhooks": 3,
"request": {
"id": "req_5qa9snlGlE1f6q",
"idempotency_key": "86ab54aa-13fc-4e70-a313-46ccbf187e37"
},
"type": "payment_intent.created"
}
You are not passing
automatic_payment_methods:{
enabled: true
}
When creating the PaymentIntent
oooh
amount=6500¤cy=USD&metadata[sfid]=a237h000000ZXFZAA4&payment_method_types=null&automatic_payment_methods=true
{
"error": {
"message": "You may only specify one of these parameters: automatic_payment_methods, payment_method_types.",
"param": "automatic_payment_methods",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_tqCwnMHB3hKUFR?t=1684751745",
"type": "invalid_request_error"
}
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
not working
amount=6500¤cy=USD&metadata[sfid]=a237h000000ZXFyAAO&automatic_payment_methods=true
remove payment_method_types
{
"error": {
"message": "Invalid object",
"param": "automatic_payment_methods",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_rUT302OfzZDYSM?t=1684752070",
"type": "invalid_request_error"
}
}
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Check the documentation:
remove already
it has an object
automatic_payment_methods:{
enabled: true
}
https://stripe.com/docs/api/payment_intents/create#create_payment_intent-automatic_payment_methods-enabled