#ebellotpu6
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
I am getting "stripeError": {
"type": "card_error",
"declineCode": "insufficient_funds",
"message": "Your card has insufficient funds."
}
This is the PaymentIntent id: pi_3NWEV2CHB7HFcdDc15vQUHeY
I wnat to know if "unit_amount_decimal": "2575.00" does it mean that the current payment method does not have suffucuent funds
Why are you using this and not amount?
the amount is "amount": 3116,
Sorry, I mean unit_amount.
I don't know. This is the json to create a subscription:
{
"description": "Subscription: ES_Barcelona_2 | storage 16",
"default_tax_rates": {
"0": "txr_1Mo2YICHB7HFcdDcjCpH2WNe"
},
"metadata": {
"invoiceType": "invoice",
"storageId": "16",
"centerId": "ES_Barcelona_2"
},
"default_payment_method": "pm_1NTVIbCHB7HFcdDcoBQ1ZgVM",
"items": {
"0": {
"metadata": {
"storageId": "16",
"centerId": "ES_Barcelona_2"
},
"price": "price_1NTTVXCHB7HFcdDcrLxbLi3g"
}
},
"off_session": "False",
"payment_behavior": "error_if_incomplete",
"customer": "cus_OG1HY14pDFMAJR",
"billing_cycle_anchor": "1690840800",
"add_invoice_items": {
"0": {
"price_data": {
"product": "prod_OFzUMMWlhoMONL",
"currency": "EUR",
"unit_amount_decimal": "2575.00"
},
"tax_rates": {
"0": "txr_1Mo2YICHB7HFcdDcjCpH2WNe"
}
}
},
"trial_end": "1690840800",
"expand": {
"0": "latest_invoice.payment_intent"
}
}
if I am getting insufficient funds what does it mean? That customer has less than 31,16€ or less than 2575€?
What's the amount you want to charge?
31,16
Where is 2575.00 coming from then?
the product price is 42€. As is a monthly subscription, and it started on 7/13, I have calculated the amount to pay the first month: 42 * 19 / 31 = 25,75
- 21% IVA = 31,16€
Are you sure your card has sufficient funds?
No, but the customer says yes...
What I am not sure is if the logic to decline a card for insufficient funds uses the unit_amount_decimal like the limit, and if 2575.00 is 25,75€ or 2575,00€