#cc_api

1 messages · Page 1 of 1 (latest)

winged cloakBOT
#

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

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

eager trail
#

咋搞, river老哥.

#

现在有这样一个需求, 要把交易明细同步到我们的ERP.

winged cloakBOT
#

🗣️ Sorry, English only

We can only provide help in English on Discord, but you can contact Stripe support for help in other languages. 🌐 Translate this message

eager trail
#

got it

ocean geode
#

If you're getting the current balance of your account, Balance Retrieval API can be used: https://docs.stripe.com/api/balance/balance_retrieve

Alternatively, to get the ending balance for a specific date range (like a bank statement), use the Reporting API to run the balance.summary.1 report: https://docs.stripe.com/reports/api

curl https://api.stripe.com/v1/reporting/report_runs \
  -u "sk_live_xxx:" \
  -d report_type=balance.summary.1 \
  -d "parameters[interval_start]=1704067200" \
  -d "parameters[interval_end]=1706745600"

Access Stripe's financial reports programmatically to automate your reconciliation workflow.

eager trail
#

Requirement: Synchronize transaction details to our ERP
In the ERP system, I want to perform a unified reconciliation and know the balance after each transaction

ocean geode
#

Do you mean that you would like to track the payments that have been completed on your account in ERP? Or are you specifically looking for handling balance transaction specifically?

eager trail
#

I want to track completed payments in the ERP system and know the balance after each payment is completed.

#

here is paypal openapi document. They did well

ocean geode
#

Stripe doesn't have an API to query the ending balance with a given time period. This can only be managed by your system. Stripe only provides an endpoint to retrieve the current balance: https://docs.stripe.com/api/balance/balance_retrieve

The workaround will be with following steps:

  1. Listen for charge.updated event. This fires when the balance_transaction is populated on the charge.
  2. In the webhook handler, retrieve the PaymentIntent with expansion (https://docs.stripe.com/expand/use-cases#stripe-fee-for-payment):
curl https://api.stripe.com/v1/payment_intents/pi_xxx \
  -u "sk_live_xxx:" \
  -d "expand[]=latest_charge.balance_transaction" \
  -G
  1. Get the available_on timestamp to determine when the funds will be available in Stripe account balance: https://docs.stripe.com/api/balance_transactions/object#balance_transaction_object-available_on

Your system can use available_on timestamp to track the balance.

Alternatively, you can use Reporting API to run the balance.summary.1 report: https://docs.stripe.com/reports/api on the daily basis

Access Stripe's financial reports programmatically to automate your reconciliation workflow.

The Stripe API expand parameter lets you specify which non-standard details to include in a response. This doc provides example code for some of the most commonly requested details.

winged cloakBOT
#

⛔️ Stripe developers have stepped away for a short while

Please leave your questions here, and we’ll respond as soon as we're back! If you need help urgently, you can contact Stripe support for help.

eager trail
#

Reporting API balance.summary.1 result has no transaction details?

winged cloakBOT
smoky forum
#

Hi! Stepping in for my colleague. Give me a while to catch up.