- Direct registration, the default, creates the account at once and returns
userId,accountId, andbillingAddressId. It grants your application nothing; the user still has to complete the OAuth grant. - Consent mode, which Fluz enables per application, creates no user, account, or grant when you call it. It returns an
authorizationUrlwhere the person signs up or logs in with the phone number you submitted and approves your application’s scopes. Fluz creates the grant when they approve. See Consent mode.
Arguments
dateOfBirth, billingAddress, and acceptCardholderAgreement are nullable in the schema so that consent-mode calls can leave them out. Direct registration still requires them, but the error now comes back in data instead of failing GraphQL validation: a missing dateOfBirth or billingAddress returns ARG-0002, and a missing acceptCardholderAgreement returns ARG-0001.
Returns
RegisterUserResponse — represents the response returned from the registerUser mutation.
In consent mode,
userId and accountId are returned only with LINKED.
Consent mode
Fluz enables consent mode per application. Contact Fluz support to turn it on for yours.
registerUser never creates a user and never checks whether the email address or phone number is already on Fluz. A person who is new to Fluz and a person who already has an account get the same response:
authorizationUrl to the person, either in the enrollment widget or as a link. They sign up or log in to their existing account with the phone number you submitted, which is pre-filled. Then they approve your application’s scopes and complete any steps you listed. When they approve, Fluz creates the grant, and from then on you call generateUserAccessToken with your externalReferenceId.
If you subscribe to OAUTH_USER_LINKED, it usually tells you when the grant exists. It isn’t sent when the person had already granted your application the same scopes, so don’t rely on it alone: calling registerUser again returns LINKED once the grant exists.
If the person’s Fluz account is already linked to your application under a different externalReferenceId, approval fails unless your application allows multiple external links.
Approval also fails if the person signs in with a different phone number from the one you submitted. Fluz shows them an error, creates no grant, and registerUser keeps returning PENDING_CONSENT. Submit the phone number the person uses with Fluz.
If your application already holds a grant for the externalReferenceId, the response is LINKED, with the linked user’s userId and accountId and no link:
registerUser again for a new one. The consent flow doesn’t collect dateOfBirth, billingAddress, or acceptCardholderAgreement. After the grant, add the billing address with addVirtualCardAddress, and list KYC in steps if the person must verify their identity.
Consent mode errors
Nothing is created on any error. The application and credential errors and the lastAUTH-0025 case apply here too. The conflict codes AUTH-0026 and AUTH-0027 are never returned in consent mode.
WIDGET-003 means your application’s setup needs a change on Fluz’s side. Contact Fluz support rather than retrying. A steps value other than KYC, FUNDING_SOURCE, or PIN fails GraphQL validation, so it comes back in the errors array, not in data.
Errors
This mutation does not return GraphQL errors for business failures. Every failure comes back as HTTP200withsuccess: falseand a populatederrorobject holdingmessageandcode. Two kinds of failure are exceptions. Authentication-middleware and rate-limit failures are rejected before the resolver runs and surface as HTTP errors. GraphQL validation failures, such as a wrong argument type or astepsvalue that is not aRegisterUserEnrollmentStep, come back in the GraphQLerrorsarray with noregisterUserresult, so there is noerrorobject to read.
error.code, never on error.message — messages are prose and may be reworded, while codes are stable. The tables below list every code this mutation can return. Error name is the internal name for the code; it is not part of the response, and is shown only so support requests and log lines can be matched up.
Application and credential errors
Nothing was created. These apply in both modes. They indicate a problem with the calling application or its token, and will recur identically until the application setup changes.AUTH-0022 means registration has not been enabled for your application. Contact Fluz support rather than retrying.
Input errors
Direct registration. For consent mode, see Consent mode errors. Nothing was created. Fix the input and call again.
The
ARG-0002 message lists only the fields that were actually absent, and agrees in number (is required / are required). The ARG-0001 validation message appends the specific field errors, so read message for the detail even though you branch on code.
Conflicts
Direct registration only. Nothing was created. The email address or phone number already belongs to a Fluz user.
Safe to retry with different values. Neither creates a partial user.
Registration failures
Registration could not be completed. Every case below returns the single codeAUTH-0025 (UnsuccessfulRegistration) — the message is what distinguishes them.
AUTH-0025 is retryable, but it does not tell you whether the user was created — some stages run after the user and account already exist. Retry the same call, and treat the outcome as the answer:
- Success means registration completed and the returned
userIdis the user to use. AUTH-0027orAUTH-0026means an earlier attempt already created the user; look it up by email address or phone number instead of registering again.- The same
AUTH-0025message repeating means the failure is not transient. Contact Fluz support and quote the message text — it identifies the stage that failed.