Fix Stripe payouts to developers outside the US, UK, EEA, CA and CH - #525
Merged
Merged
Conversation
Our Stripe platform is in the US, so it can only transfer to connected accounts on the full service agreement in the US, Canada, the UK, the EEA and Switzerland. Developers everywhere else now get a recipient account that only requests the transfers capability. Adds payouts:recreate-connect-account to move an existing developer onto a new recipient account and hold their failed payouts until they finish onboarding again. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Nothing has dispatched it since plugin checkout moved to invoices in #261. Its payout logic had drifted from HandleInvoicePaidJob, which made it easy to misread how payouts work. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
We only refreshed a developer's Stripe status when they came back from onboarding or opened their dashboard. If they finished onboarding and closed the tab, their held payouts never went out. The daily run now refreshes anyone we can't pay yet who has held or due payouts before it decides what to send. Refreshing no longer overwrites the date onboarding was completed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
simonhamp
marked this pull request as ready for review
September 19, 2026 13:17
payouts:send-daily-summary runs at 12:00, an hour after the payout run, and emails the support address. It covers payouts sent or failed in the last 24 hours with Stripe's error for each failure, the upcoming and pending payouts still waiting, and the total paid out to date. It only skips a day when nothing was sent and nothing is waiting. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A plugin developer in Mexico made a sale and the payout failed with:
Our Stripe platform account is in the US. A US platform can only transfer to connected accounts on the
fullservice agreement in the US, Canada, the UK, the EEA and Switzerland. Everywhere else needs therecipientagreement. We were creating every developer as an Express account withcard_payments, which puts them onfull.So developers in AE, AU, HK, JP, MX, NZ, SG and TH could sign up and onboard, but every transfer to them failed. And 62 of the 103 countries in the onboarding dropdown only allow
recipient, so account creation failed there and the developer was told their country isn't supported.What changed
StripeConnectCountriesnow lists the countries we can pay onfull. Developers anywhere else get arecipientaccount that only requeststransfers.payouts:recreate-connect-account {developerAccount}command for developers who already have the wrong account. Stripe won't change the agreement once it's accepted, so the command creates a fresh account through the newStripeConnectService::replaceConnectAccount()and resets their onboarding. It does nothing if the live account is alreadyrecipientor in a country we can pay onfull. It also moves that developer's failed payouts back to held.payouts:process-eligiblerun now checks Stripe for any developer we can't pay yet who has held or due payouts. We used to refresh that status only when a developer came back from onboarding or opened their dashboard, so someone who finished onboarding and closed the tab never got paid. Refreshing also no longer overwrites the onboarding date shown in the admin.ProcessPluginCheckoutJob. Nothing has dispatched it since Refactor plugin checkout to use cart-based approach #261 and its payout logic no longer matchedHandleInvoicePaidJob.I checked the service agreement rules in test mode against our platform. A
fullMX account gives the same error as production. ArecipientMX account accepted a USD transfer withsource_transactionand it landed as MXN. Trying every country where Stripe offersfullshowed that exactly AE, AU, HK, JP, MX, NZ, SG and TH are blocked.After merging
Run
php artisan payouts:recreate-connect-account <id>for the Mexican developer and ask them to redo Stripe onboarding. Their failed payout goes out on the first daily run after they finish. Sales they make in the meantime are held and follow the usual 15 day hold. Any existing developers in AE, AU, HK, JP, NZ, SG or TH need the same.Things to watch
determineStatus()still requirescharges_enabled. An activerecipientaccount reported it as true in test mode, so I left it alone. If the developer finishes onboarding and stays pending, that's the check to change.🤖 Generated with Claude Code