How to Optimize ID Verification with API Attributes Using MassPay

In today’s digital world, the safety and security of financial transactions and systems is critical. The MassPay Payout Orchestration platform supports comprehensive KYC (Know Your Customer) capabilities, including ID verification. This guide demonstrates how to use APIs to check IDs and follow KYC requirements. Our goal is to provide simple, straightforward tools to ensure your payout operations are safe, secure, and compliant.

Before you start

  • MassPay account created
  • MassPay API credentials available
  • Postman or similar software with the same functionality

📘

Optional: Idempotency-Key

The API supports idempotency for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. For example, if a request to create a charge does not respond due to a network connection error, you can retry the request with the same idempotency key to guarantee that no more than one payout is created.


Step One: Obtain ID Verification for a Payee

Incorporating user verification into your Payout Orchestration Platform isn’t complicated. However, there are a few critical steps that must be followed. At this point, we will assume you have already created a payout transaction and have all of the necessary parameters saved. Your transaction's destination_token is a crucial parameter.

📘

Not sure where to get destination_token?

Check our complex guide about creating Payouts step by step.

As a first step, it is important to verify that the verification ID is required for your specific transaction.

  1. Open your Postman and import OpenApi specification with GET https://{environment}.masspay.io/{VERSION}/attribute/{user_token}/{destination_token}/{currency}
  2. Fill all the required parameters into the Header:
ParameterDescriptionPossible values
environmentSelect the version of the API environment you want to use.- api
- staging-api
versionSelect he version of the API you want to use.- v0.1.0
- v0.1.1
- v0.1.2
- v0.1.3
- v0.1.4
user_tokenInsert your user_token.
destination_tokenInsert your destination_token, which you obtained when you created the payout transaction.
currencyInsert the currency that was used in the transaction.All currencies supported by MassPay in ISO4217 format.
curl --request GET \
https://{environment}.masspay.io/{VERSION}/attribute/{user_token}/{destination_token}/{currency} \
     --header 'accept: application/json'
  1. Call the REST API. Your response should look like this:
{
    "input_type": "text",
    "token": "attr_71c639b2-14e9-11ed-867a-0678dcdfcccf",
    "label": "Click to collect your ID",
    "is_optional": false,
    "value": "https://magic.falcon-1-eu.veriff.me/v/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3MDg2NDkzMDEsInNlc3Npb25faWQiOiJhYzFjNDc4OC03NWEwLTRkZGItOWRiZS0yNGRkZmFkODViZGIiLCJpaWQiOiJkNDgzMjQzMS1mNjkzLTQ5ODItYTMxZi0wMmVkZDYyYTcxYTMifQ.C0-jFf69b4ulXhCg6sF6CsvMSaKNrZPKZgdaBlRqXGg",
    "type": "IDSelfieCollection",
    "expected_value": "Please follow the provided link to provide your ID and selfie",
    "last_attr_value_used": false
  }

In this response, we are looking for the type parameter. If the value is IDSelfieCollection, verification with a valid ID and selfie is required. In the following step, we will demonstrate how to process this.

Step Two: Fulfill the ID Verification Requirement

For maximum security, the MassPay Payout Platform uses the industry-leading Veriff platform to verify data and users. At this point, you have two options on how to use Veriff.

📘

What is Veriff?

Veriff is an identity verification platform that allows businesses to securely and efficiently verify the identities of their users. Veriff provides a variety of verification solutions, such as document verification, biometric analysis, and liveness detection, by combining cutting-edge technology with human knowledge.

Provide direct link to your customers

The first and simplest method of verification is to simply provide the link that you obtained from the API call.
In our case, the API response returns a value with a https link to direct Veriff verification.

    "value": "https://magic.falcon-1-eu.veriff.me/v/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3MDg2NDkzMDEsInNlc3Npb25faWQiOiJhYzFjNDc4OC03NWEwLTRkZGItOWRiZS0yNGRkZmFkODViZGIiLCJpaWQiOiJkNDgzMjQzMS1mNjkzLTQ5ODItYTMxZi0wMmVkZDYyYTcxYTMifQ.C0-jFf69b4ulXhCg6sF6CsvMSaKNrZPKZgdaBlRqXGg"

👍

You can directly prompt the user to verify their identity by clicking on this URL, which you can paste anywhere you choose.

📘

Veriff SDKs

Additionally, the Veriff SDK is available to you as a MassPay customer and can be integrated into your code. Once you have the session URL from the attribute value, you can use the SDK to insert it for an embedded experience. You can find Veriff SDK here.

Upload the IDs through the MassPay API

For direct ID uploads to our database, another way is to use the MassPay API call. Using this approach, the Know Your Customer procedure will be executed without a hitch.

  1. Open your Postman and import OpenApi specification with POST https://{environment}.masspay.io/{VERSION}/user/{user_token}/kyc/id
  2. Fill all the required parameters into the Header:
ParameterDescriptionPossible values
environmentSelect the version of the API environment you want to use.- api
- staging-api
versionSelect the version of the API you want to use.- v0.1.0
- v0.1.1
- v0.1.2
- v0.1.3
- v0.1.4
user_tokenInsert your user_token.
curl --request POST \
     --url https://api.masspay.io/v0.1.4/user/user_token/kyc/id \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
  1. In the Body section, an ID must be inserted using three separate API objects. In order to complete the verification process, you need to choose the appropriate type (face, document-front, document-back) and upload an encoded image in Base64 format that does not exceed 10MB in size. So, the API body can look like this:
[
  {
    "type": "face",
    "content": "amFzZGthc2Rqa3Nqa2Fkamthc2RramFkcw=="
  },
  {
    "type": "document-front",
    "content": "amFzZGthc2Rqa3Nqa2Fkamthc2RraajASdAq=="
  },
  {
    "type": "document-back",
    "content": "amFzZGthc2Rqa3Nqa2Fkamthc2ROjnUImao=="
  }
]
  1. Call the REST API. The operation is successful if the Body is empty and the API response is 200.

Your customer's verification in the intricate KYC process is complete with this action.

👍

Feel free to reach out to us if you have any questions or need clarification. We are here to help you!