To register a user in the SynchPay API, you need to create a registration object that defines conditional payment details, such as the amount and frequency. This is done using the /user/register endpoint. The process involves the following steps:

1

Create a Registration Object

Make a POST request to /user/register with the required parameters.

2

Redirect the User

Use the RegistrationUrl returned in the response to send the user to complete their registration, where they will provide payment information and undergo KYC verification.

3

Request Money

Optionally, request money from the user during registration or at a later time.

Creating a Registration Object

The /user/register endpoint initiates the user registration process. Below are the specifics of the API call.

Endpoint

Request Parameters

The request body or headers must include the following parameters, all formatted in PascalCase:

ParameterTypeDescriptionRequired
PeriodstringThe frequency of the payment. Set to “once” for a one-time payment during registration.No
AmountintegerThe payment amount expressed in cents. For example, $50.00 should be provided as 5000 (if applicable).No
ShortDescriptionstringA brief description of the payment purpose (for AML purposes).No
RedirectUrlstringThe URL to redirect the user after completing registration.Yes
MobileNumberstringThe user’s mobile number (optional, speeds up onboarding).No
EmailstringThe user’s email address (optional, speeds up onboarding).No

Response

Upon successful creation of the registration object, the endpoint returns a JSON object with the following fields:

FieldTypeDescription
RegistrationIdstringThe unique ID of the user registration.
RegistrationUrlstringThe URL for the user to complete the registration process.

Example Response:

{
  "RegistrationId": "6e8d9257-bd5f-45cf-8f29-6d0ae8a6d991",
  "RegistrationUrl": "https://app.synchpay.com/register/6e8d9257-bd5f-45cf-8f29-6d0ae8a6d991"
}

Completing the Registration

After receiving the RegistrationId and RegistrationUrl, direct the user to the RegistrationUrl to complete their registration. This can be done in two ways:

  1. Redirect the User: Send the user to the RegistrationUrl, where they will be guided through the SynchPay app to link their account via Plaid and complete the KYC process.

  2. Display a Webview: Keep the user within your app by displaying the RegistrationUrl in a webview component.

Once the user completes the registration process, they will be redirected to the RedirectUrl you provided in the request.

Checking User Status

To monitor the registration status, use the GET /user/{registrationId}/status endpoint:

The response will indicate the current status (e.g., “Pending”, “Registered”).

Example Response:

{
  "Status": "Pending"
}