Registering a User in SynchPay
Follow these steps to register a user in SynchPay
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:
Create a Registration Object
Make a POST
request to /user/register
with the required parameters.
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.
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
-
Method:
POST
-
Authorization:
Bearer <AccessToken>
Note: The access token is obtained from/auth/token
using yourClientId
andClientSecret
.
Request Parameters
The request body or headers must include the following parameters, all formatted in PascalCase:
Parameter | Type | Description | Required |
---|---|---|---|
Period | string | The frequency of the payment. Set to “once” for a one-time payment during registration. | No |
Amount | integer | The payment amount expressed in cents. For example, $50.00 should be provided as 5000 (if applicable). | No |
ShortDescription | string | A brief description of the payment purpose (for AML purposes). | No |
RedirectUrl | string | The URL to redirect the user after completing registration. | Yes |
MobileNumber | string | The user’s mobile number (optional, speeds up onboarding). | No |
Email | string | The 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:
Field | Type | Description |
---|---|---|
RegistrationId | string | The unique ID of the user registration. |
RegistrationUrl | string | The URL for the user to complete the registration process. |
Example Response:
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:
-
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. -
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:
- URL: https://api.synchpay.com/user/{registrationId}/status
- Method:
GET
- Authorization:
Bearer <AccessToken>
The response will indicate the current status (e.g., “Pending”, “Registered”).
Example Response: