ayyanar pms
ayyanar pms

Reputation: 169

Stripe Account Link

Im using Stripe Account link API's response url to open stripe connect form and get details of customer

Stripe Account link code:

stripe->accountLinks->create([
  'account' => 'acct_1DDbifHk4p1Ao4HJ',
  'refresh_url' => 'https://example.com?completed=0',
  'return_url' => 'https://example.com?completed=1',
  'type' => 'account_onboarding',
]);

in stripe connect form i have 'Save for later' option you can see in image

Strip connect form

in account link api, im completed parameter to find whether the form is filled or not.

  1. if completed=0 , form is not filled so that i can once again redirect them to form to fill
  2. if completed =1, form is filled

but if they press 'Save for Later' then also ir return completed = 1 i.e, returnurl is invoked

my question is how can i differentiate between completed form and partially completed stripe connect form ?

Upvotes: 1

Views: 1423

Answers (1)

floatingLomas
floatingLomas

Reputation: 8737

Use the /v1/accounts endpoint to retrieve the user’s account and check for charges_enabled. If the account isn’t fully onboarded, provide UI prompts to allow the user to continue onboarding later. The user can complete their account activation through a new account link (generated by your integration). You can check the state of the details_submitted parameter on their account to see if they’ve completed the onboarding process.

https://stripe.com/docs/connect/express-accounts#span-classstepstep-5span-handle-users-that-have-not-completed-onboarding

Upvotes: 3

Related Questions