Skip to main content

Connect with Symblepay

This page details how the user connection flow works. It allows you to connect your users with Symblepay so they can be part of a user-to-user trade. This flow is the same for websites and iOS and Android apps. It assumes that you already have credentials to successfully call Symblepay APIs and have subscribed to notifications using Webhooks API.

How it works

Sunshine scenario is expected for the majority of the time.

  • When a user wants to connect with Symblepay in your application, request your backend services to create a connectUri using Symblepay API.
  • Re-direct user to Symblepay Frontend using https uri.
  • User signs in with existing Symblepay account or creates a new in Symblepay Frontend
  • Your backend services receives notification with coupling between Marketplace User id and Symblepay Account Id.
  • Meanwhile user returns to your application (using re-direct or switching apps) and sees the success screen.

User Connection Flow

Initiate connect flow

Initiate Flow
curl https://api.symblepay.io/v1/marketplace/users/connect \
-X POST \
-H 'Authorization: Bearer {API_TOKEN}' \
-H 'Content-Type: application/json'\
-d '{
"successUrl": "{SUCCESS_URL}",
"cancelUrl": "{CANCEL_URL}",
"userId": "{USER_ID}"
}'
Response example
{
"redirectUrl": "https://api.symblepay.io/initiate-authenticate-flow"
}

Send your users to the redirectUrl in a browser or In-App browser on Android or iOS.

Required KYC Level

The connect endpoint has an optional argument called requiredKycLevel. This is used to force the user to go through a certain verification when connecting:

  • Level 1 (Medium): The user is required to have a MitID, but cannot have their name and address protected unless they go through passport verification.
  • Level 2 (High): The user is required to have a MitID and go through passport verification.

If no minimum level is passed, the default behaviour is to require a Medium level.

Note: The passport verification enforcement does not imply that said verification is approved, just that the user went through the process. It is the tenant's responsibility to decide what to do depending on the KYC level returned in the user webhook.

Connect user flow was a success

Wait for the user to be redirected back to your successUrl.

Suceess callback example
https://marketplace.dk/success-url"

Receive webhook

A webhook is also sent to ensure you get the information.

Webhook example
{
"id": "ed3325d8-b379-444a-9cc1-7d119efefbea",
"referenceId": "616de408-5f8f-4ef3-ba28-6b4827145070",
"eventName": "user.connected",
"eventDate": "2024-02-16T10:36:20+01:00",
"symblepayAccountId": "f6c4a43f-682e-4559-b8d1-11a63afd134a"
}

Flow was a cancelled

Wait for the user to be redirected back to your cancelUrl.

Cancel callback example
https://marketplace.dk/cancel-url