Validate card in wallet
Introduction
This article explains how to validate card in wallet through the REST API.
How to use?
Make a POST request to the endpoint /wallet/transactions/pre-approved
/wallet/transactions/pre-approved
With a valid access token, make a request to the (POST/wallet/transactions/pre-approved
) endpoint, sending the following parameters:
The identity.value field must belong to the credit card owner. The company é field is provided by Unico. The redirectUrl field is used to redirect the person to the desired url address. The redirection is done at the end of the flow (webview). This field is optional. The expirationDate field is also optional.
The name field must be sent with the correct name and beware of encoding problems, incorrect and/or invalid values can cause problems with approval in the flow. Since this field is used in the experience and communication with the user.
The other fields are mandatory.
If everything is right in the request, the response is a JSON with the transaction ID, transaction status, token that can be used in the iFrame and the capture link, as follows:
If the pre-approval decides that it is not necessary to capture the biometrics, the response will have a different status and a link for the capture will not be generated, as follows:
If an error occurs, the response is a JSON with the error and the error code:
The following is a list of possible errors returned by the service:
400
40001
error decoding json
The data sent does not match the service contract
400
40002
error validating json
Some of the information is badly formatted or not filled in
403
40301
not allowed
The user does not have permission to perform such an action.
404
40404
company not found
The company does not exist
429
40001
too many requests
Ratelimit reached
500
50001
internal error
Internal service failure
Still need help?
Didn't find something or still need help? If you're already a client or partner, you can reach out through our Help Center.
Last updated