#hamid-mandates
1 messages · Page 1 of 1 (latest)
@edgy scarab sure, what's the question?
Note there are no concept of mandates for cards in our API though, it's only for payment methods like SEPA bank debits which explicitly require them to succeed, 'card mandates' is not really modelled in the API itself.
okie here is a question
see here is a scenario, if ill not provide on behalf of in setup intent and if ill provide on behalf of in payment intent, payment will go through in case of credit card, but not in case of seps_debit, and I got it that it is required for cc but will require for sepa and sofort, right?
so is there any mendata api i can achieve this functionality?
right
with sepa_debit, like, i do not to provide on behalf of in setup intent but want to provide it for payment intent
any mandate api or something to make this happen
unfortunately that's impossible, you will have to pass on_behalf_of on the SetupIntent or it can't work.
you mean either ill pass in both or not in any one
tell me this, while creating setup intent
what is this param
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yes, either you pass on_behalf_of on both the intents, or don't pass it all, indeed
it's for if you're manually creating the mandate rather than having it automatically created by our frontend libraries
you can if you wish, but generally the mandate gets created automatically when you call confirmSepaDebitSetup on the frontend so you don't need to. https://stripe.com/docs/js/setup_intents/confirm_sepa_debit_setup#stripe_confirm_sepa_debit_setup-with_element
hmm right, so it do not have any impact on behalf of
suppose, if ill pass, what value i could pass?
the account ID acct_xxx of a connected account that you will do the payment with later on.
you didn't get my point, let me ask other way
i created a setup intent yeserday for sepa_debit
okie
why i am getting mandate null?
#<Stripe::SetupIntent:0x3fcd5b6e6384 id=seti_1JrllXENbCEHqHuQDTkZmYhX> JSON: {
"id": "seti_1JrllXENbCEHqHuQDTkZmYhX",
"object": "setup_intent",
"application": null,
"cancellation_reason": null,
"client_secret": "seti_1JrllXENbCEHqHuQDTkZmYhX_secret_KWpQtVZKbdLtQyBeQvwsJhS61ZNjaVT",
"created": 1635954763,
"customer": "cus_KWpQ6XNGNxG18t",
"description": "Source: Sepa Bank Account added in Request&Reservation flow",
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
"mandate": null,
"metadata": {"period":" months starting ","instance":"dev","provider":"spaceOS"},
"next_action": null,
"on_behalf_of": null,
"payment_method": null,
"payment_method_options": {},
"payment_method_types": [
"sepa_debit"
],
"single_use_mandate": null,
"status": "requires_payment_method",
"usage": "off_session"
}
if as you said its automatically created?
it's created when you confirm the SetupIntent.
not when just creating it.
if you now use that SetupIntent to call confirmSepaDebitSetup as mentioned above then a mandate would be created at that point.
how i can pass mandate data in following method
Stripe::SetupIntent.create(stripe_params)
where stripe params are
payment_method_types: ['sepa_debit'],
customer: stripe_customer,
usage: 'off_session',
mandate_data: 'offline'
}```
or
payment_method_types: ['sepa_debit'],
customer: stripe_customer,
usage: 'off_session',
confirm: true
}
I think i got your point, you are saying. when we create setupintent from backend it do not create any mandate, but when we confirmt that setup inetnt from front end via confirmSepaDebitSetup it does create a mandate, right?
Now two questions.
- Can we create mandate while creating
setupintentfrom Backend. - Following is my mandate created from Front end, with
confirmSepaDebitSetup, right.
"id": "mandate_1JrllYENbCEHqHuQsKH4TxvY",
"object": "mandate",
"customer_acceptance": {"accepted_at":1635954764,"online":{"ip_address":"137.59.228.184","user_agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0"},"type":"online"},
"livemode": false,
"multi_use": {},
"payment_method": "pm_1JrllYENbCEHqHuQNSJB6Sul",
"payment_method_details": {"sepa_debit":{"reference":"D9QIYYTVISMAIDHJ","url":"https://hooks.stripe.com/adapter/sepa_debit/file/src_1JrllYENbCEHqHuQ2Iae4pKk/src_client_secret_rrD70MCq5GMoOrIdIsLInkpe"},"type":"sepa_debit"},
"status": "active",
"type": "multi_use"
}
my question is can i create it from Front end or Back end such that it will receive payment of any on_behalf_of
- Can we create mandate while creating setupintent from Backend.
yes that's whatmandate_datais for
that's not correct. Please look at the shape in the API reference(mandate_data is an object https://stripe.com/docs/api/setup_intents/confirm#confirm_setup_intent-mandate_data ) not a string
- yes