#hamid-mandates

1 messages · Page 1 of 1 (latest)

pulsar bloom
#

@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.

edgy scarab
#

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?

edgy scarab
#

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

pulsar bloom
edgy scarab
#

you mean either ill pass in both or not in any one

#

tell me this, while creating setup intent

#

what is this param

pulsar bloom
edgy scarab
#

what about this mandate_data

#

what is this for?

pulsar bloom
edgy scarab
#

you mean we can't pass it here

#

Stripe::SetupIntent.create(stripe_params)

#

from BE

pulsar bloom
edgy scarab
#

hmm right, so it do not have any impact on behalf of

#

suppose, if ill pass, what value i could pass?

pulsar bloom
#

the account ID acct_xxx of a connected account that you will do the payment with later on.

edgy scarab
#

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?

pulsar bloom
#

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.

edgy scarab
#

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.

  1. Can we create mandate while creating setupintent from Backend.
  2. 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

pulsar bloom
#
  1. Can we create mandate while creating setupintent from Backend.
    yes that's what mandate_data is for
pulsar bloom
#
  1. yes
edgy scarab
#

for 2. can you explain one thing, you are saying yes

#

it means,
a. i can create setup intent with mandate_data and without on_behalf_of
b. then while creating payment_intent i can pass any on_behlaf_of

pulsar bloom
#

for 2 I'm saying yes, that is your mandate created from Front end

#

a) yes if you want

#

b) no