#sagnik_docs
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/1349460227530948748
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello, can you send me your code snippet where you are setting all of this?
AchTransferData {
payment_method_data_type: StripeCreditTransferTypes::AchCreditTransfer,
bank_transfer_type: BankTransferType::UsBankTransfer,
payment_method_type: StripePaymentMethodType::CustomerBalance,
balance_funding_type: BankTransferType::BankTransfers,
billing_name: billing_address.name.map(|name| name.expose()).ok_or(
errors::ConnectorError::MissingRequiredField {
field_name: "billing_address.name",
},
)?,
}
Can you show me the full API call that your code is making? I'm not fully clear on the context
the type is defined here in the rust
#[derive(Debug, Eq, PartialEq, Serialize)]
pub struct AchTransferData {
#[serde(rename = "payment_method_data[type]")]
pub payment_method_data_type: StripeCreditTransferTypes,
#[serde(rename = "payment_method_options[customer_balance][bank_transfer][type]")]
pub bank_transfer_type: BankTransferType,
#[serde(rename = "payment_method_types[0]")]
pub payment_method_type: StripePaymentMethodType,
#[serde(rename = "payment_method_options[customer_balance][funding_type]")]
pub balance_funding_type: BankTransferType,
#[serde(rename = "payment_method_data[billing_details][name]")]
pub billing_name: String,
}
in the api call I'm passing all of this mentioned above
Ah gotcha, so not a first party library from Stripe. Can you send me the request ID from a time that you got this error?
https://dashboard.stripe.com/test/logs
I am trying to see exactly what was sent to Stripe so I can reccommend how to modify it. I get what fields you are setting, but what API call you are actually using them in, and how, makes a difference in how you can fix it
Okay I think I may get the issue. We don't allow you to pass both a payment_method and payment_method_data in one payment intent call. payment_method_data is meant to create an entirely new PaymentMethod object. Quick question, are you trying to update the name that is on the existing source? Or is the name already on that Source? If it is, you shouldn't need to pass it in payment_method_data, it should just be used properly by the intents API
No I don't want to update
can you please tell me what are the fields that I have to pass?
I can see this in the stripe dashboard
Yep yep, you should be able to just remove the payment_method_data param that you are passing and re-run the call. If you get an error about mandate data, I can help with that param, but I say just try running without that one param first
okay trying
thenx
payment_method_data[type]
this thing right I don't have to pass?
Correct, we will infer that type from the ba_ or src_ object that you are passing us
And here is that doc on mandates, basically it is a note of when the customer gave you permission to use their bank details like this. In API terms you pass us a mandate_data param with a layout like this:
customer_acceptance: {
type: 'offline',
accepted_at: '{{ACCEPTANCE_TIMESTAMP}}',
},
},
}```
https://docs.stripe.com/payments/ach-direct-debit/migrating-from-charges#mandate-acknowledgement
okay
now this error is coming
"Missing required param: payment_method_data[type]."
req_VVPr26MjACwMsO
In that request are still passing us this:
billing_details: {
name: "joseph Doe",
},
},```
Remove the entire `payment_method_data` parameter, if you pass us anything in that parameter, the API thinks that you are trying to create an entirely new PaymentMethod with data that is passed into the param. You don't need to pass anything there, so you can completely remove it
okay
"error_code": "payment_intent_unexpected_state",
"error_message": "You cannot confirm this PaymentIntent because it's missing a payment method. You can either update the PaymentIntent with a payment method and then confirm it again, or confirm it again directly with a payment method or ConfirmationToken.",
req_JtTsm7zBhDWAnR