Skip to main content

Stripe Connect onboarding return callback

GET 

/company/payment/onboarding/return

Callback endpoint to which Stripe redirects the company after completing (or attempting to complete) the Stripe Connect onboarding process.

Objective

Update the onboarding status in the database, register the linked bank account if it exists, and display an HTML confirmation page.

Use Cases

  • Confirmation after completing Stripe Connect onboarding
  • Detection of pending requirements after returning from Stripe
  • Automatic update of the company's onboarding_status
  • Registration of stripe_bankaccount if a bank account was linked

Validation Flow

flowchart TD
A[Receive Request - account_id, lang] --> B{account_id valid format?}
B -->|No - not acct_...| C[400 STRIPE_ACCOUNT_ID_INVALID]
B -->|Yes| D[Fetch Stripe account]
D --> E{Account found?}
E -->|No| F[404 STRIPE_ACCOUNT_NOT_FOUND]
E -->|Yes| G{Company found by stripe_account?}
G -->|No| H[404 CIA_NOT_FOUND]
G -->|Yes| I{Bank account in Stripe?}
I -->|Yes| J[Save stripe_bankaccount ID]
I -->|No| K[Continue]
J --> K
K --> L{requirements.currently_due empty?}
L -->|Yes| M[status = completed + redirect_url]
L -->|No| N[status = requirements_needed]
M --> O[Render HTML template]
N --> O

Notes

  • No authentication required (it's a public Stripe callback)
  • The account_id must start with acct_
  • lang controls the language of the rendered HTML page (default: es)
  • Updates payment_settings.onboarding_status and payment_settings.onboarding_last_update
  • If a bank account exists, updates payment_settings.stripe_bankaccount
  • Returns HTML, not JSON

Request

Responses

HTML page with the onboarding result.

Response Headers