#patik_api

1 messages · Page 1 of 1 (latest)

swift yachtBOT
#

👋 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/1364244598741799062

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

dense crater
#

Hello, not immediately sure on this. Can you send me the full json of the balance transaction object? I can see values but not exactly as they are rendered for you

dense crater
#

For failed transactions like this, we will generate a second balance transaction later that shows the balance being removed. For that charge the transaction is txn_1R7Fe0B12PW1kQJpIgEtC7ET

outer swift
# dense crater Hello, not immediately sure on this. Can you send me the full json of the balanc...

{id: 'py_3R5QF4B12PW1kQJp09sXcJTk',
object: 'charge',
amount: 12500,
amount_captured: 12500,
amount_refunded: 0,
application: 'ca_BC3QvYOCCxiOW3Klo6zL8KlBgSHzwTKn',
application_fee: null,
application_fee_amount: null,
balance_transaction: 'txn_3R5QF4B12PW1kQJp0sJV6HeK',
billing_details: {…},
calculated_statement_descriptor: null,
captured: true,
created: 1742642971,
currency: 'eur',
customer: 'cus_RzP3invMGDQpyT',
description: 'Az-Vitamins - Bestellung 2023388',
disputed: false,
failure_balance_transaction: 'txn_1R7Fe0B12PW1kQJpIgEtC7ET',
failure_code: 'refer_to_customer',
failure_message: "The payment failed and we don't have detailed information regarding the cause of this failure. Your customer's bank didn't provide a reason code. We recommend that you reach out directly to your customer for additional information.",
fraud_details: {},
invoice: null,
livemode: true,
metadata: {…},
on_behalf_of: null,
order: null,
outcome: {
advice_code: null,
network_advice_code: null,
network_decline_code: 'generic_decline',
network_status: 'declined_by_network',
reason: 'generic_decline',
risk_level: 'not_assessed',
seller_message: 'The bank did not return any further details with this decline.',
type: 'issuer_declined'
},
paid: false,
payment_intent: 'pi_3R5QF4B12PW1kQJp0On18sMm',
payment_method: 'pm_1R5QF1B12PW1kQJpAHMGNAzP',
payment_method_details: {
sepa_debit: {
bank_code: '25551480',
branch_code: '',
country: 'DE',
fingerprint: 'vbMGgVoaoSp8qKRk',
last4: '1349',
mandate: 'mandate_1R5QF5B12PW1kQJpWJ25d8Ig'
},
type: 'sepa_debit'
},
radar_options: {},
receipt_email: null,
receipt_number: null,
receipt_url: null,
refunded: false,
review: null,
shipping: {…},
source: null,
source_transfer: null,
statement_descriptor: null,
statement_descriptor_suffix: null,
status: 'failed',
transfer_data: null,
transfer_group: null
}

dense crater
#

Oh there we go, we show failure_balance_transaction: 'txn_1R7Fe0B12PW1kQJpIgEtC7ET', in that body

outer swift
#

Oh ok, now I understand

#

But why there is still the old balance transaction?

#

{
id: 'txn_3R5QF4B12PW1kQJp0sJV6HeK',
object: 'balance_transaction',
amount: 13415,
available_on: 1743465600,
created: 1742800733,
currency: 'usd',
description: 'Az-Vitamins - Bestellung 2023388',
exchange_rate: 1.0732,
fee: 137,
fee_details: [
{
amount: 137,
application: null,
currency: 'usd',
description: 'Stripe processing fees',
type: 'stripe_fee'
}
],
net: 13278,
reporting_category: 'charge',
source: 'py_3R5QF4B12PW1kQJp09sXcJTk',
status: 'available',
type: 'payment'
}

#

Usually we use the field balance_transaction

dense crater
#

It is meant to be like a ledger, not 100% sure why we chose this specific way but that will still allow the ledger to be accurrate as the 13415 and -13415 will balance out to no net change on your account's balance