#devraj_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/1473793253089218758
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
I am sure I am missing something little here ๐
Hey there, sorry for the delay, taking a look
no worries at all, thanks for joining the chat
for reference originally I was attempting to surface alipay as a option using a Payment Element, which our customers already use to link their card or AU BECS account for off session payments
setup_intent = stripe.SetupIntent.create(
customer=starrez_entry.get('Stripe_ID'),
payment_method_types=['card', 'au_becs_debit', 'alipay', 'payto'],
stripe_account=starrez_entry.get('StripeConnectedAccountID'),
usage='off_session',
# Passing this here so we can fetch the Stripe Connect Id
# from StarRez which will be used to attach the payment method
payment_method_options={
'alipay': {
'currency': 'aud',
},
},
mandate_data={
'customer_acceptance': {
'type': 'offline',
}
},
metadata={
'starrezId': entry_id,
},
)
which I assume doesn't work for alipay, so I went back to attempting to create an intent on the server, to see if I can fetch the next_action
Right, so looking at this request: https://dashboard.stripe.com/acct_1Psvf4Kh8ZCyeXqY/test/logs/req_JL5RD7cSW5nrkt
If you're managing this server-side you also need to specify the payment_method_data to pass minimal information that the customer wishes to complete payment with alipay:
payment_method_data: {
type: 'alipay',
},
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
When confirming like this you need to pass either a payment_method or payment_method_data
In the case of alipay, nothing but type is required, and you'll then have to redirect the customer to the next action url to complete the flow
>>> stripe.SetupIntent.create(stripe_account='acct_1Psvf4Kh8ZCyeXqY', customer='cus_TUbfZTQRZFhe7e', payment_method_types=['alipay'],)
<SetupIntent setup_intent id=seti_1T2IgcKh8ZCyeXqYA9risR6X at 0xffff971aba70> JSON: {
"application": "ca_QjhuLWe5qXrO3fpHs0TD78JCcadOJL8W",
"automatic_payment_methods": null,
"cancellation_reason": null,
"client_secret": "seti_1T2IgcKh8ZCyeXqYA9risR6X_secret_U0JJRs6WIVIydlUjtr6G6qwGTAUKNnO",
"created": 1771451614,
"customer": "cus_TUbfZTQRZFhe7e",
"customer_account": null,
"description": null,
"excluded_payment_method_types": null,
"flow_directions": null,
"id": "seti_1T2IgcKh8ZCyeXqYA9risR6X",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"object": "setup_intent",
"on_behalf_of": null,
"payment_method": null,
"payment_method_configuration_details": null,
"payment_method_options": {},
"payment_method_types": [
"alipay"
],
"single_use_mandate": null,
"status": "requires_payment_method",
"usage": "off_session"
}
I did try that and the next_action always comes back as null
ideally I would want to allow the user to follow a link from Elements? but if that's not possible I am happy to build the interaction
hi there; I'll be taking over for synthrider here who needed to step away
no problem at all, thank you both for your time
Your latest request here only passes payment method types and a customer. Can you try copying the options from our example in the docs here? You'll need to be logged into your stripe account to view it