Wallet

Última atualização: 15 de Abril de 2021
Last update: 15th April, 2021

Introdução

API de solução antifraude para carteiras digitais. Nossos modelos e a abordagem de IA validam a verdadeira identidade digital do usuário final por meio da combinação de dados, análise de dispositivos e transações realizadas, prevenindo riscos de fraude em cada momento, seja ele Onboarding ou Transação (que podem ser: cash-in, cash-out, pagamentos, transferências e cadastro do cartões).

Introduction

Anti-fraud solution API for digital wallets. Our models and the AI approach validate the true digital identity of the end user through the combination of data, analysis of devices and transactions carried out, preventing risks of fraud at all times, be it Onboarding or Transaction (which can be: cash-in , cash-out, payments, transfers and card registration).

Autenticação

Todas as requisições submetidas à nossa API devém ser realizadas através de um token gerado através de um usuário, senha e id da entidade que devem ser fornecidos pela ClearSale. Entre em contato com o seu consultor de vendas para mais informações.

Na autenticação, além do token retornamos seu tempo de expiração. É necessário que contemple no seu desenvolvimento o gerenciamento da vida útil do token com base nesse tempo de expiração. Só gere um novo token após a expiração do seu token atual.

Authentication

All requests submitted to our API must be made through a token generated through a user, password and entity id that must be provided by ClearSale. Contact your sales consultant for more information.

In authentication, in addition to the token we return its expiration time. It is necessary to include in your development the management of the token's life based on this expiration time. Only generate a new token after your current token expires.

Requisição
POST https://walletsapi.clearsale.com.br/v1/authentication HTTP/1.1
Content-Type: application/json
{
    "Username": "{Seu Usuário}",
    "Password": "{Sua Senha}"
}
POST https://stagingwalletapi.clearsale.com.br/v1/authentication HTTP/1.1
Content-Type: application/json
{
    "Username": "{Seu Usuário}",
    "Password": "{Sua Senha}"
}
Request
POST https://walletsapi.clearsale.com.br/v1/authentication HTTP/1.1
Content-Type: application/json
{
    "Username": "{Your Username}",
    "Password": "{Your Password}"
}
POST https://stagingwalletapi.clearsale.com.br/v1/authentication HTTP/1.1
Content-Type: application/json
{
    "Username": "{Your Username}",
    "Password": "{Your Password}"
}
Resposta
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "Token": "{Valor do Token}",
    "ExpirationDate": "{Tempo de Expiração do Token}"
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized
Content-Type: application/json; charset=utf-8
{
    "message": "Username or Password is incorrect"
}
Response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "Token": "{Token Value}",
    "ExpirationDate": "{Token Expiration Time}"
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized
Content-Type: application/json; charset=utf-8
{
    "message": "Username or Password is incorrect"
}

Mobile SDK

Para completa utilização do Wallet é necessário que o SDK esteja integrado no ato da captura dos dados no aplicativo.

Para maiores informações sobre as configurações do SDK clique aqui.

Mobile SDK

For complete use of the Wallet it is necessary that the SDK is integrated in the act of capturing data in the application.

For more information about the SDK settings click here.

Onboarding


O envio de uma carga inicial do histórico de cadastros de contas, bancos e cartões é essencial para a análise eficaz das transações. Verifique com seu representante comercial o envio da base via SFTP.

Solicite acesso ao suporte@clear.sale, caso ainda não possua cadastro em nossa base de dados.

Contexto Arquivo de Validação Obrigatório
Accounts AccountsValidationRequest.xlsx
  • Nome do arquivo deve conter o identificador de contexto
  • Arquivo em formato .xlsx
  • Cadastro para acesso ao sistema de SFTP
Banks BanksValidationRequest.xlsx
Cards CardsValidationRequest.xlsx

Onboarding


Sending an initial load of record account, bank and card history is essential for effective transaction analysis. Check with your sales representative or send the base via SFTP.

Request access to suporte@clear.sale, if you do not have a registration in our database.

Context Validation file Required
Accounts AccountsValidationRequest.xlsx
  • File in .xlsx format
  • File name must contain the context identifier
  • Registration for access to the SFTP system
Banks BanksValidationRequest.xlsx
Cards CardsValidationRequest.xlsx

Accounts

Esse contexto está relacionado aos dados de cadastro de uma conta, onde é possível criar, modificar ou remover esta carteira digital.

Accounts

This context is related to the registration data of an account, where it is possible to create, modify or remove this digital wallet.

Envio

Este método é utilizado para fazer o envio de uma transação de Conta no Wallet e receber um score de fraude e uma recomendação de decisão.

Send

This method is used to send a Account transaction to Wallet and receive a data fraud score and a decision recommendation.

Requisição
POST https://walletsapi.clearsale.com.br/v1/accounts HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Event": "new",
    "AccountId": "abc123",
    "Name": "José da Silva",
    "Email": "jose@silva.com",
    "VerifiedEmail": true,
    "Document": "45964891578",
    "Phone": "5511998877665",
    "VerifiedPhone": true,
    "Birthdate": "1970-01-19",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1",
    "Address": {
        "Zipcode": "05712320",
        "Street": "R. Dev. II ",
        "Number": "201",
        "Complement": "N/A",
        "District": "Jardim do Bom Comércio",
        "City": "São Paulo",
        "State": "SP",
        "Country": "Brazil"
    }
}
POST https://walletsapi.clearsale.com.br/v1/accounts HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Event": "new",
    "AccountId": "abc123",
    "Name": "José da Silva",
    "Email": "jose@silva.com",
    "VerifiedEmail": true,
    "Document": "45964891578",
    "Phone": "5511998877665",
    "VerifiedPhone": true,
    "Birthdate": "1970-01-19",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1",
    "Address": {
        "Zipcode": "05712320",
        "Street": "R. Dev. II ",
        "Number": "201",
        "Complement": "N/A",
        "District": "Jardim do Bom Comércio",
        "City": "São Paulo",
        "State": "SP",
        "Country": "Brazil"
    }
}
Request
POST https://walletsapi.clearsale.com.br/v1/accounts HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Event": "new",
    "AccountId": "abc123",
    "Name": "José da Silva",
    "Email": "jose@silva.com",
    "VerifiedEmail": true,
    "Document": "45964891578",
    "Phone": "5511998877665",
    "VerifiedPhone": true,
    "Birthdate": "1970-01-19",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1",
    "Address": {
        "Zipcode": "05712320",
        "Street": "R. Dev. II ",
        "Number": "201",
        "Complement": "N/A",
        "District": "Jardim do Bom Comércio",
        "City": "São Paulo",
        "State": "SP",
        "Country": "Brazil"
    }
}
POST https://stagingwalletapi.clearsale.com.br/v1/accounts HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Event": "new",
    "AccountId": "abc123",
    "Name": "José da Silva",
    "Email": "jose@silva.com",
    "VerifiedEmail": true,
    "Document": "45964891578",
    "Phone": "5511998877665",
    "VerifiedPhone": true,
    "Birthdate": "1970-01-19",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1",
    "Address": {
        "Zipcode": "05712320",
        "Street": "R. Dev. II ",
        "Number": "201",
        "Complement": "N/A",
        "District": "Jardim do Bom Comércio",
        "City": "São Paulo",
        "State": "SP",
        "Country": "Brazil"
    }
}
Resposta
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 197,
    "Event": "new",
    "AccountId": "abc123",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
Response
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 197,
    "Event": "new",
    "AccountId": "abc123",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden

Consulta

Este método é utilizado para buscar informações de uma única transação de Conta no Wallet.

Check

This method is used to retrieve information from a single Account transaction in Wallet.

Requisição
Requisição com resultados vinculados a biometria.
GET https://walletsapi.clearsale.com.br/v1/accounts/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Requisição sem resultados vinculados a biometria.
GET https://walletsapi.clearsale.com.br/v1/accounts/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Requisição com resultados vinculados a biometria.
GET https://stagingwalletapi.clearsale.com.br/v1/accounts/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Requisição sem resultados vinculados a biometria.
GET https://stagingwalletapi.clearsale.com.br/v1/accounts/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Request
Requisition with results linked to biometrics
GET https://walletsapi.clearsale.com.br/v1/accounts/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Request without results linked to biometrics.
GET https://walletsapi.clearsale.com.br/v1/accounts/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Requisition with results linked to biometrics
GET https://stagingwalletapi.clearsale.com.br/v1/accounts/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Request without results linked to biometrics.
GET https://stagingwalletapi.clearsale.com.br/v1/accounts/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Resposta
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 197,
    "Event": "new",
    "AccountId": "abc123",
    "Status": "approved",
    "Score": 85.00,
    "Biometric":
    {
        "BiometricId": "abcd1",
        "Score": 2.89,
    }
}
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 197,
    "Event": "new",
    "AccountId": "abc123",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
Response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 197,
    "Event": "new",
    "AccountId": "abc123",
    "Status": "approved",
    "Score": 85.00,
    "Biometric":
    {
        "BiometricId": "abcd123",
        "Score": 2.89
    }
}
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 197,
    "Event": "new",
    "AccountId": "abc123",
    "Status": "approved",
    "Score": 85.00    
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found

Busca por AccountId

Este método é utilizado para buscar o histórico de uma determinada transação de Conta no Wallet.

Search by AccountId

This method is used to search the history of a specific Account transaction in Wallet.

Requisição
GET https://walletsapi.clearsale.com.br/v1/accounts/{accountId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/accounts/{accountId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Request
GET https://walletsapi.clearsale.com.br/v1/accounts/{accountId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/accounts/{accountId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Resposta
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "Location": 1,
    "TotalPages": 3,
    "TotalResults": 9,
    "Results": [
        {
            "AnalysisId": 197,
            "Event": "new",
            "AccountId": "abc123",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 198,
            "Event": "change"
            "AccountId": "abc123",
            "Status":  "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 199,
            "Event": "remove",
            "AccountId": "abc123",
            "Status":  "approved",
            "Score": 85.00
        }
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
Response
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "Location": 1,
    "TotalPages": 3,
    "TotalResults": 9,
    "Results": [
        {
            "AnalysisId": 197,
            "Event": "new",
            "AccountId": "abc123",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 198,
            "Event": "change"
            "AccountId": "abc123",
            "Status":  "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 199,
            "Event": "remove",
            "AccountId": "abc123",
            "Status":  "approved",
            "Score": 85.00
        }
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found

Dicionário de variáveis


Transaction

Nome Descrição Tipo Tamanho Obrigatório
Event Descrição do evento relacionado a conta
[new, change, remove]
String - Sim
AccountId Identificador da conta gerado pelo lojista String - Sim
Name Nome do cliente String - Sim
Email E-mail do cliente String - Sim
VerifiedEmail Email já foi analisado Bool - Não
Document CPF do cliente String 11 Sim
Phone Telefone celular do cliente
5511123456789 - Código internacional + Código de área + Número celular
String 13 Sim
VerifiedPhone Telefone já foi analisado Bool - Não
Birthdate Data de Nascimento do cliente
[YYYY-MM-DD]
Data de Nascimento é obrigatório caso for utilizar o módulo de Biometrics.
String 10 Não
SessionId Valor do SessionId capturado pelo Behavior Analytics
(Javascript ou SDK)
String 5~128 Não
Address Objeto com informações de endereço do cliente Address - Não

Variable dictionary


Transaction

Name Description Type Size Required
Event Account-related event description
[new, change, remove]
String - Yes
AccountId Account identifier generated by the shopkeeper String - Yes
Name Client Name String - Yes
Email Client E-mail String - Yes
VerifiedEmail Email has already been analyzed Bool - No
Document Customer CPF (government Id) String 11 Yes
Phone Customer Cell phone
5511123456789 - International code + Area code + Cell phone number
String 13 Yes
VerifiedPhone Phone has already been analyzed Bool - No
Birthdate Customer Birth Date
[YYYY-MM-DD]
Birthdate is mandatory if you are going to use the Biometrics module.
String 10 No
SessionId SessionId value captured by Behavior Analytics
(Javascript or SDK)
String 5~128 No
Address Object with customer address information Address - No

Result

Nome Descrição Tipo
AnalysisId Identificador gerado pelo ClearSale para rastrear uma transação Int
Status Status de análise indicado pela ClearSale.
[approved, reproved, manual review]
String
Score Score de fraude Decimal
Biometric Objeto com informações do resultado de biometria Biometric

Result

Name Description Type
AnalysisId Identifier created by ClearSale to fetch a transaction Int
Status Analysis status generated by ClearSale.
[approved, reproved, manual review]
String
Score Data fraud score Decimal
Biometric Object with biometric result data Biometric

Biometric

Nome Descrição Tipo
BiometricId Identificador de Biometria gerado pelo lojista String
Score Score de fraude Decimal

Biometric

Name Description Type
BiometricId Biometric identifier generated by the shopkeeper String
Score Data fraud score Decimal

Address

Nome Descrição Tipo Tamanho Obrigatório
Zipcode Código Postal do endereço do cliente (não pode ser enviado nulo, em branco ou "00000000") String 8 Sim
Street Endereço do cliente String - Sim
Number Número do endereço do cliente (não pode ser enviado nulo, em branco ou somente zeros) String 10 Sim
Complement Complemento do endereço do cliente String - Não
District Distrito do endereço do cliente String - Sim
City Cidade do cliente String - Sim
State Estado do cliente String - Sim
Country País do cliente String - Não

Address

Name Description Type Size Required
Zipcode Customer Postal code (cannot be sent null, blank or "00000000") String 8 Yes
Street Customer Address String - Yes
Number Customer Address Number (cannot be sent null, blank or only zeros) String 10 Yes
Complement Customer Address additional info String - No
District Customer Address District String - Yes
City Customer Address City String - Yes
State Customer Address State String - Yes
Country Customer Address Country String - No

Banks

Esse contexto está relacionado aos dados de cadastro de um banco.

Banks

This context is related to the registration data of an bank.

Envio

Este método é utilizado para fazer a gestão de um Banco de uma conta no Wallet e receber um score de fraude e uma recomendação de decisão.

Send

This method is used to send a Bank transaction to Wallet and receive a data fraud score and a decision recommendation.

Requisição
POST https://walletsapi.clearsale.com.br/v1/banks HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Event": "new",
    "BankId": "321abc",
    "AccountId": "abc123",
    "BankNumber": "001",
    "Agency": "0167",
    "AccountNumber": "20795",
    "Name": "João da Silva",
    "Type": "current account",
    "Document": "90936335033",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
POST https://stagingwalletapi.clearsale.com.br/v1/banks HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Event": "new",
    "BankId": "321abc",
    "AccountId": "abc123",
    "BankNumber": "001",
    "Agency": "0167",
    "AccountNumber": "20795",
    "Name": "João da Silva",
    "Type": "current account",
    "Document": "90936335033",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Request
POST https://walletsapi.clearsale.com.br/v1/banks HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Event": "new",
    "BankId": "321abc",
    "AccountId": "abc123",
    "BankNumber": "001",
    "Agency": "0167",
    "AccountNumber": "20795",
    "Name": "João da Silva",
    "Type": "current account",
    "Document": "90936335033",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
POST https://stagingwalletapi.clearsale.com.br/v1/banks HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Event": "new",
    "BankId": "321abc",
    "AccountId": "abc123",
    "BankNumber": "001",
    "Agency": "0167",
    "AccountNumber": "20795",
    "Name": "João da Silva",
    "Type": "current account",
    "Document": "90936335033",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Resposta
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 38,
    "Event": "new",
    "AccountId": "abc123",
    "BankId": "321abc",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
Response
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 38,
    "Event": "new",
    "AccountId": "abc123",
    "BankId": "321abc",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden

Consulta

Este método é utilizado para buscar informações de uma única transação de Banco de uma conta no Wallet.

Check

This method is used to retrieve information for a single Bank transaction from an account in Wallet.

Requisição
GET https://walletsapi.clearsale.com.br/v1/banks/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/banks/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Request
GET https://walletsapi.clearsale.com.br/v1/banks/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/banks/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Resposta
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 38,
    "Event": "new",
    "AccountId": "abc123",
    "BankId": "321abc",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
Response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 38,
    "Event": "new",
    "AccountId": "abc123",
    "BankId": "321abc",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found

Consulta por BankId

Este método é utilizado para buscar o histórico de uma determinada transação de Banco no Wallet.

Search by BankId

This method is used to search the history of a specific Bank transaction in Wallet.

Requisição
GET https://walletsapi.clearsale.com.br/v1/banks/{bankId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/banks/{bankId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Request
GET https://walletsapi.clearsale.com.br/v1/banks/{bankId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/banks/{bankId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Resposta
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "Location": 1,
    "TotalPages": 3,
    "TotalResults": 9,
    "Results": [
        {
            "AnalysisId": 38,
            "Event": "new",
            "AccountId": "abc123",
            "BankId": "321abc",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 39,
            "Event": "change",
            "AccountId": "abc123",
            "BankId": "321abc",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 40,
            "Event": "remove",
            "AccountId": "abc123",
            "BankId": "321abc",
            "Status": "approved",
            "Score": 85.00
        }
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
Response
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "Location": 1,
    "TotalPages": 3,
    "TotalResults": 9,
    "Results": [
        {
            "AnalysisId": 38,
            "Event": "new",
            "AccountId": "abc123",
            "BankId": "321abc",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 39,
            "Event": "change",
            "AccountId": "abc123",
            "BankId": "321abc",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 40,
            "Event": "remove",
            "AccountId": "abc123",
            "BankId": "321abc",
            "Status": "approved",
            "Score": 85.00
        }
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found

Dicionário de variáveis


Transaction

Nome Descrição Tipo Tamanho Obrigatório
Event Descrição do evento relacionado a conta
[new, change, remove]
String - Sim
AccountId Identificador da conta gerado pelo lojista String - Sim
BankId Identificador do banco gerado pelo lojista String - Sim
BankNumber Número identificador do banco String 3 Sim
Agency Agência String 4 Sim
AccountNumber Número da conta String 10 Sim
Document CPF do cliente String 11 Sim
Name Nome do Cliente String - Sim
Type Tipo de Conta Bancária
[current account, savings account, salary account]
String - Sim
SessionId Valor do SessionId capturado pelo Behavior Analytics
(Javascript ou SDK)
String 5~128 Não

Variable dictionary


Transaction

Name Description Type Size Required
Event Account-related event description
[new, change, remove]
String - Yes
AccountId Account identifier generated by the shopkeeper String - Yes
BankId Bank identifier generated by the shopkeeper String - Yes
BankNumber Bank identifier number String 3 Yes
Agency Bank agency String 4 Yes
AccountNumber Account Number String 10 Yes
Document Customer CPF (government Id) String 11 No
Name Client Name String - Yes
Type Bank account type
[current account, savings account, salary account]
String - Yes
SessionId SessionId value captured by Behavior Analytics
(Javascript or SDK)
String 5~128 No

Result

Nome Descrição Tipo
AnalysisId Identificador gerado pelo ClearSale para rastrear uma transação Int
Status Status de análise indicado pela ClearSale.
[approved, reproved, manual review]
String
Score Score de fraude Decimal

Result

Name Description Type
AnalysisId Identifier created by ClearSale to fetch a transaction Int
Status Analysis status generated by ClearSale.
[approved, reproved, manual review]
String
Score Data fraud score Decimal

Biometria

Esse contexto está relacionado aos dados de biometria de uma conta.

Biometrics

This context is related to the biometric data of an account.

Envio

Este método é usado para fazer o envio de uma transação de Biometria no Wallet e receber um score de similaridade.

Send

This method is used to send a Biometrics transaction to Wallet and receive a data similarity score.

Requisição
POST https://walletsapi.clearsale.com.br/v1/biometrics/{context} HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "AnalysisId":189,
    "AccountId": "abc123",
    "BiometricId": "123abc",
    "Image": "image-base64"
}
POST https://stagingwalletapi.clearsale.com.br/v1/biometrics/{context} HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "AnalysisId":189,
    "AccountId": "abc123",
    "BiometricId": "123abc",
    "Image": "image-base64"
}
Request
POST https://walletsapi.clearsale.com.br/v1/biometrics/{context} HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "AnalysisId":189,
    "AccountId": "abc123",
    "BiometricId": "123abc",
    "Image": "image-base64"
}
POST https://stagingwalletapi.clearsale.com.br/v1/biometrics/{context} HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "AnalysisId":189,
    "AccountId": "abc123",
    "BiometricId": "123abc",
    "Image": "image-base64"
}
Resposta
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "Id": 32,
    "AnalysisId": 189,
    "AccountId": "abc123",
    "BiometricId": "123abc",
    "Score": 8.69
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
Response
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "Id": 32,
    "AnalysisId": 189,
    "AccountId": "abc123",
    "BiometricId": "123abc",
    "Score": 8.69
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden

Consulta

Este método é utilizado para buscar informações de uma transação de Biometria no Wallet.

Check

This method is used to retrieve information about a Biometrics transaction from Wallet.

Requisição
GET https://walletsapi.clearsale.com.br/v1/biometrics/{Id} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/biometrics/{Id} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Request
GET https://walletsapi.clearsale.com.br/v1/biometrics/{Id} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/biometrics/{Id} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Resposta
HTTP/1.1 200 Ok
Content-Type: application/json; charset=utf-8
{
    "Id": 16,
    "AnalysisId": 189,
    "AccountId": "abc123",
    "BiometricId": "123abc",
    "Score": 8.69
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
Response
HTTP/1.1 200 Ok
Content-Type: application/json; charset=utf-8
{
    "Id": 16,
    "AnalysisId": 189,
    "AccountId": "abc123",
    "BiometricId": "123abc",
    "Score": 8.69
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found

Busca por BiometricId

Este método é utilizado para buscar o histórico de uma determinada transação de Biometria no Wallet.

Search by BiometricId

This method is used to search the history of a specific Biometric transaction in Wallet.

Requisição
GET https://walletsapi.clearsale.com.br/v1/biometrics/{biometricId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/biometrics/{biometricId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Request
GET https://walletsapi.clearsale.com.br/v1/biometrics/{biometricId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/biometrics/{biometricId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Resposta
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "Location": 1,
    "TotalPages": 1,
    "TotalResults": 2,
    "Results": [
        {
            "Id": 16,
            "AnalysisId": 189,
            "AccountId": "abc123",
            "BiometricId": "123abc",
            "Score": 8.69
        },
        {
            "Id": 17,
            "AnalysisId": 190,
            "AccountId": "abc123",
            "BiometricId": "123abc",
            "Score": 9.01
        }        
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
Response
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "Location": 1,
    "TotalPages": 1,
    "TotalResults": 2,
    "Results": [
        {
            "Id": 16,
            "AnalysisId": 189,
            "AccountId": "abc123",
            "BiometricId": "123abc",
            "Score": 8.69
        },
        {
            "Id": 17,
            "AnalysisId": 190,
            "AccountId": "abc123",
            "BiometricId": "123abc",
            "Score": 9.01
        }        
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found

Dicionário de variáveis


Transaction

Nome Descrição Tipo Tamanho Obrigatório
Context Identificador de Contexto
[accounts]
String - Sim
AnalysisId Identificador gerado pelo ClearSale para rastrear uma transação Int - Sim
AccountId Identificador da conta gerado pelo lojista String - Sim
Image Imagem em formato base64 String - Sim
BiometricId Identificador da conta gerado pelo lojista String - Sim

Variable dictionary


Transaction

Name Description Type Size Required
Context Context identifier
[accounts]
String - Yes
AnalysisId Identifier created by ClearSale to fetch a transaction Int - Yes
AccountId Account identifier generated by the shopkeeper String - Yes
Image Image in base64 format String - Yes
BiometricId Biometric identifier generated by the shopkeeper String - Yes

Result

Nome Descrição Tipo
Id Identificador gerado pelo ClearSale para rastrear uma transação Int
Score Score de similaridade
Se Score == null. Não há dados suficientes em nossas bases para a geração do score.
Decimal

Result

Nome Descrição Tipo
Id Identifier created by ClearSale to fetch a transaction Int
Score Data similarity score
If Score == null. There is no sufficient data in our databases to generate a score.
Decimal

Cards

Esse contexto está relacionado aos dados de cadastro, edição ou remoção de cartões.

Cards

This context is related to card registration, editing or removal data.

Envio

Este método é utilizado para fazer a gestão de um Cartão de uma conta no Wallet e receber um score de fraude e uma recomendação de decisão.

Send

This method is used to manage the Card of a Wallet account and receive a data fraud score and a decision recommendation.

Requisição
POST https://walletsapi.clearsale.com.br/v1/cards HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Event": "new",
    "AccountId": "abc123",
    "CardId": "abc123",
    "Document": "40406268851",
    "Bin": "123456",
    "End": "1234",
    "Expiring": "02/2021",
    "Owner": "José da Silva",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1",
    "Address": {
        "ZipCode": "05712320",
        "Street": "R. Dev. II ",
        "Number": "201",
        "Complement": "N/A",
        "District": "Jardim do Bom Comércio",
        "City": "São Paulo",
        "State": "SP",
        "Country": "Brazil"
    }
}
POST https://stagingwalletapi.clearsale.com.br/v1/cards HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Event": "new",
    "AccountId": "abc123",
    "CardId": "abc123",
    "Document": "40406268851",
    "Bin": "123456",
    "End": "1234",
    "Expiring": "02/2021",
    "Owner": "José da Silva",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1",
    "Address": {
        "ZipCode": "05712320",
        "Street": "R. Dev. II ",
        "Number": "201",
        "Complement": "N/A",
        "District": "Jardim do Bom Comércio",
        "City": "São Paulo",
        "State": "SP",
        "Country": "Brazil"
    }
}
Request
POST https://walletsapi.clearsale.com.br/v1/cards HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Event": "new",
    "AccountId": "abc123",
    "CardId": "abc123",
    "Document": "40406268851",
    "Bin": "123456",
    "End": "1234",
    "Expiring": "02/2021",
    "Owner": "José da Silva",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1",
    "Address": {
        "ZipCode": "05712320",
        "Street": "R. Dev. II ",
        "Number": "201",
        "Complement": "N/A",
        "District": "Jardim do Bom Comércio",
        "City": "São Paulo",
        "State": "SP",
        "Country": "Brazil"
    }
}
POST https://stagingwalletapi.clearsale.com.br/v1/cards HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Event": "new",
    "AccountId": "abc123",
    "CardId": "abc123",
    "Document": "40406268851",
    "Bin": "123456",
    "End": "1234",
    "Expiring": "02/2021",
    "Owner": "José da Silva",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1",
    "Address": {
        "ZipCode": "05712320",
        "Street": "R. Dev. II ",
        "Number": "201",
        "Complement": "N/A",
        "District": "Jardim do Bom Comércio",
        "City": "São Paulo",
        "State": "SP",
        "Country": "Brazil"
    }
}
Resposta
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 38,
    "Event": "new",
    "AccountId": "abc123",
    "CardId": "abc123",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
Response
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 38,
    "Event": "new",
    "AccountId": "abc123",
    "CardId": "abc123",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden

Consulta

Este método é utilizado para buscar informações de uma única transação de Cartão de uma conta no Wallet.

Check

This method is used to retrieve information for a single Card transaction from an account in Wallet.

Requisição
GET https://walletsapi.clearsale.com.br/v1/cards/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/cards/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Request
GET https://walletsapi.clearsale.com.br/v1/cards/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/cards/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Resposta
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 38,
    "Event": "new",
    "AccountId": "abc123",
    "CardId": "abc123",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
Response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 38,
    "Event": "new",
    "AccountId": "abc123",
    "CardId": "abc123",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found

Consulta por CardId

Este método é utilizado para buscar o histórico de uma determinada transação de Cartão no Wallet.

Search by CardId

This method is used to search the history of a specific Card transaction in Wallet.

Requisição
GET https://walletsapi.clearsale.com.br/v1/cards/{cardId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/cards/{cardId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Request
GET https://walletsapi.clearsale.com.br/v1/cards/{cardId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/cards/{cardId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Resposta
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "Location": 1,
    "TotalPages": 3,
    "TotalResults": 9,
    "Results": [
        {
            "AnalysisId": 38,
            "Event": "new",
            "AccountId": "abc123",
            "CardId": "abc123",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 39,
            "Event": "change",
            "AccountId": "abc123",
            "CardId": "abc123",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 40,
            "Event": "remove",
            "AccountId": "abc123",
            "CardId": "abc123",
            "Status": "approved",
            "Score": 85.00
        }
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
Response
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "Location": 1,
    "TotalPages": 3,
    "TotalResults": 9,
    "Results": [
        {
            "AnalysisId": 38,
            "Event": "new",
            "AccountId": "abc123",
            "CardId": "abc123",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 39,
            "Event": "change",
            "AccountId": "abc123",
            "CardId": "abc123",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 40,
            "Event": "remove",
            "AccountId": "abc123",
            "CardId": "abc123",
            "Status": "approved",
            "Score": 85.00
        }
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found

Dicionário de variáveis


Transaction

Nome Descrição Tipo Tamanho Obrigatório
Event Descrição do evento relacionado a conta
[new, change, remove]
String - Sim
AccountId Identificador da conta gerado pelo lojista String - Sim
CardId Identificador do cartão gerado pelo lojista String - Sim
Document CPF relacionado ao dono do cartão String 11 Não
Bin Os seis primeiros números do cartão Int 6 Sim
End Os quatro últimos números do cartão Int 4 Sim
Expiring Data de expiração do cartão
[MM-YYYY]
String 7 Sim
Owner Nome do proprietário do cartão String - Sim
SessionId Valor do SessionId capturado pelo Behavior Analytics
(Javascript ou SDK)
String 5~128 Não
Address Objeto com informações de endereço do cliente Address - Não

Variable Dictionary


Transaction

Name Description Type Size Required
Event Account-related event description
[new, change, remove]
String - Yes
AccountId Account identifier generated by the shopkeeper String - Yes
CardId Card identifier generated by the shopkeeper String - Yes
Document Customer CPF (government Id) related to the cardholder String 11 No
Bin The first six numbers on card Int 6 Yes
End The last four numbers on the card Int 4 Yes
Expiring Card expiration date
[MM-YYYY]
String 7 Yes
Owner Card Owner Name String - Yes
SessionId SessionId value captured by Behavior Analytics
(Javascript or SDK)
String 5~128 No
Address Object with customer address information Address - No

Result

Nome Descrição Tipo
AnalysisId Identificador gerado pelo ClearSale para rastrear uma transação Int
Status Status de análise indicado pela ClearSale.
[approved, reproved, manual review]
String
Score Score de fraude Decimal

Result

Name Description Type
AnalysisId Identifier created by ClearSale to fetch a transaction Int
Status Analysis status generated by ClearSale.
[approved, reproved, manual review]
String
Score Data fraud score Decimal

Address

Nome Descrição Tipo Tamanho Obrigatório
Zipcode Código Postal do endereço do cliente (não pode ser enviado nulo, em branco ou "00000000") String 8 Sim
Street Endereço do cliente String - Sim
Number Número do endereço do cliente (não pode ser enviado nulo, em branco ou somente zeros) String 10 Sim
Complement Complemento do endereço do cliente String - Não
District Distrito do endereço do cliente String - Sim
City Cidade do cliente String - Sim
State Estado do cliente String - Sim
Country País do cliente String - Não

Address

Name Description Type Size Required
Zipcode Customer Postal code (cannot be sent null, blank or "00000000") String 8 Yes
Street Customer Address String - Yes
Number Customer Address Number (cannot be sent null, blank or only zeros) String 10 Yes
Complement Customer Address additional info String - No
District Customer Address District String - Yes
City Customer Address City String - Yes
State Customer Address State String - Yes
Country Customer Address Country String - No

Cash in

Esse contexto está relacionado aos dados para depósito de saldo na carteira, que pode ser feito via transferência de conta bancária, débito de cartões, pagamento de boletos ou via pagamento em loja física.

Cash in

This context is related to data for depositing balance in the wallet, which can be done via bank account transfer, debit cards, payment of slips or payment in physical store.

Envio

Este método é utilizado para fazer o envio de uma transação de Depósito no Wallet e receber um score de fraude e uma recomendação de decisão.

Send

This method is used to send a Cash in transaction to Wallet and receive a data fraud score and a decision recommendation.

Requisição
Indicado para um depósito vinculado a um banco. Deve incluir um bankId.
POST https://walletsapi.clearsale.com.br/v1/cashin HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
   "Type": "bank",
   "AccountId": "abc123",
   "BankId": "zwy987",
   "TransactionId": "zwy987",
   "Amount": 123.45,
   "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para um depósito vinculado a um cartão. Deve incluir um cardId.
POST https://walletsapi.clearsale.com.br/v1/cashin HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
   "Type": "card",
   "AccountId": "abc123",
   "CardId": "zwy987",
   "TransactionId": "zwy987",
   "Amount": 123.45,
   "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para um depósito vínculado a um boleto-bancário.
POST https://walletsapi.clearsale.com.br/v1/cashin HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
   "Type": "bank-slip",
   "AccountId": "abc123",
   "TransactionId": "zwy987",
   "Amount": 123.45,
   "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para um depósito vínculado a uma loja.
POST https://walletsapi.clearsale.com.br/v1/cashin HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
   "Type": "store",
   "AccountId": "abc123",
   "TransactionId": "zwy987",
   "Amount": 123.45,
   "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para um depósito vinculado a um banco. Deve incluir um bankId.
POST https://stagingwalletapi.clearsale.com.br/v1/cashin HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
   "Type": "bank",
   "AccountId": "abc123",
   "BankId": "zwy987",
   "TransactionId": "zwy987",
   "Amount": 123.45,
   "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para um depósito vinculado a um cartão. Deve incluir um cardId.
POST https://stagingwalletapi.clearsale.com.br/v1/cashin HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
   "Type": "card",
   "AccountId": "abc123",
   "CardId": "zwy987",
   "TransactionId": "zwy987",
   "Amount": 123.45,
   "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para um depósito vínculado a um boleto-bancário.
POST https://stagingwalletapi.clearsale.com.br/v1/cashin HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
   "Type": "bank-slip",
   "AccountId": "abc123",
   "TransactionId": "zwy987",
   "Amount": 123.45,
   "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para um depósito vínculado a uma loja.
POST https://stagingwalletapi.clearsale.com.br/v1/cashin HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
   "Type": "store",
   "AccountId": "abc123",
   "TransactionId": "zwy987",
   "Amount": 123.45,
   "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Request
Indicated for a deposit linked to a bank. It must include a bankId.
POST https://walletsapi.clearsale.com.br/v1/cashin HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "bank",
    "AccountId": "abc123",
    "BankId": "zwy987",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a deposit linked to a card. It must include a cardId.
POST https://walletsapi.clearsale.com.br/v1/cashin HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "card",
    "AccountId": "abc123",
    "CardId": "zwy987",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a deposit linked to a bank-slip.
POST https://walletsapi.clearsale.com.br/v1/cashin HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "bank-slip",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a deposit linked to a store.
POST https://walletsapi.clearsale.com.br/v1/cashin HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "store",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a deposit linked to a bank. It must include a bankId.
POST https://stagingwalletapi.clearsale.com.br/v1/cashin HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "bank",
    "AccountId": "abc123",
    "BankId": "zwy987",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a deposit linked to a card. It must include a cardId.
POST https://stagingwalletapi.clearsale.com.br/v1/cashin HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "card",
    "AccountId": "abc123",
    "CardId": "zwy987",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a deposit linked to a bank-slip.
POST https://stagingwalletapi.clearsale.com.br/v1/cashin HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "bank-slip",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a deposit linked to a store.
POST https://stagingwalletapi.clearsale.com.br/v1/cashin HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "store",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Resposta
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 30,
    "Type": "bank",
    "AccountId": "abc123",
    "BankId": "zwy987",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 30,
    "Type": "card",
    "AccountId": "abc123",
    "CardId": "zwy987",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 30,
    "Type": "bank-slip",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 30,
    "Type": "store",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
Response
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 30,
    "Type": "bank",
    "AccountId": "abc123",
    "BankId": "zwy987",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 30,
    "Type": "card",
    "AccountId": "abc123",
    "CardId": "zwy987",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 30,
    "Type": "bank-slip",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 30,
    "Type": "store",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden

Consulta

Este método é utilizado para buscar informações de uma transação de Depósito no Wallet.

Check

This method is used to retrieve information about a Cash in transaction from Wallet.

Requisição
GET https://walletsapi.clearsale.com.br/v1/cashin/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/cashin/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Request
GET https://walletsapi.clearsale.com.br/v1/cashin/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/cashin/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Resposta
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 30,
    "Type": "card",
    "AccountId": "abc123",
    "CardId": "zwy987",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
Response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 30,
    "Type": "card",
    "AccountId": "abc123",
    "CardId": "zwy987",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found

Consulta por TransactionId

Este método é utilizado para buscar o histórico de uma determinada transação de Depósito no Wallet.

Search by TransactionId

This method is used to search the history of a specific Cash in transaction in Wallet.

Requisição
GET https://walletsapi.clearsale.com.br/v1/cashin/{transactionId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/cashin/{transactionId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Request
GET https://walletsapi.clearsale.com.br/v1/cashin/{transactionId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/cashin/{transactionId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Resposta
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "Location": 1,
    "TotalPages": 3,
    "TotalResults": 9,
    "Results": [
        {
            "AnalysisId": 13,
            "Type": "bank",
            "AccountId": "abc123",
            "BankId": "123abc"
            "TransactionId": "zwy987",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 14,
            "Type": "bank-slip",
            "AccountId": "abc123",
            "TransactionId": "zwy987",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 15,
            "Type": "card",
            "AccountId": "abc123",
            "TransactionId": "zwy987",
            "CardId": "zwy987",
            "Status": "approved",
            "Score": 85.00
        }
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
Response
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "Location": 1,
    "TotalPages": 3,
    "TotalResults": 9,
    "Results": [
        {
            "AnalysisId": 13,
            "Type": "bank",
            "AccountId": "abc123",
            "BankId": "123abc"
            "TransactionId": "zwy987",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 14,
            "Type": "bank-slip",
            "AccountId": "abc123",
            "TransactionId": "zwy987",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 15,
            "Type": "card",
            "AccountId": "abc123",
            "TransactionId": "zwy987",
            "CardId": "zwy987",
            "Status": "approved",
            "Score": 85.00
        }
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found

Dicionário de variáveis


Transaction

Nome Descrição Tipo Tamanho Obrigatório
Type Descrição do tipo de transferência
[bank, card, bank-slip, store]
String - Sim
AccountId Identificador da conta String - Sim
CardId Identificador do cartão gerado pelo lojista String - Não
BankId Identificador do banco gerado pelo lojista String - Não
TransactionId Identificador gerado pelo lojista para a transação String - Sim
Amount Valor resgatado Decimal 0.01 Sim
SessionId Valor do SessionId capturado pelo Behavior Analytics
(Javascript ou SDK)
String 5~128 Não

Variable Dictionary


Transaction

Name Description Type Size Required
Type Description of the transfer type
[bank, card, bank-slip, store, atm]
String - Yes
AccountId Account identifier generated by the shopkeepert String - Yes
CardId Card identifier generated by the shopkeeper String - No
BankId Bank identifier generated by the shopkeeper String - No
TransactionId Identifier generated by the merchant for the transaction String - Yes
Amount Rescue value Decimal 0.01 Yes
SessionId SessionId value captured by Behavior Analytics
(Javascript or SDK)
String 5~128 No

Result

Nome Descrição Tipo
AnalysisId Identificador gerado pelo ClearSale para rastrear uma transação Int
Status Status de análise indicado pela ClearSale.
[approved, reproved, manual review]
String
Score Score de fraude Decimal

Result

Name Description Type
AnalysisId Identifier created by ClearSale to fetch a transaction Int
Status Analysis status generated by ClearSale.
[approved, reproved, manual review]
String
Score Data fraud score Decimal

Payments

Esse contexto está relacionado aos dados de pagamento de boletos, boletos de convênio, pagamentos realizados em loja física, recarga de celular pré-pago, cartões pré-pago e bilhete único.

Payments

This context is related to payment details for payment slips, payment slips, physical store payments, prepaid cell phone recharge, prepaid cards and single ticket.

Envio

Este método é utilizado para fazer o envio de uma transação de Pagamento no Wallet e receber um score de fraude e uma recomendação de decisão.

Send

This method is used to send a Payment transaction to Wallet and receive a data fraud score and a decision recommendation.

Requisição
Indicado para um pagamento do tipo convênio.
POST https://walletsapi.clearsale.com.br/v1/payments HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "covenant",
    "Methods": [
        {
            "Method": "balance",
            "Amount": 123.45
        },
        {
            "Method": "card",
            "CardId": "abc123",
            "Amount": 123.45
        }
    ],
    "Document": "45964891578",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "DueDate": "2029-12-26",
    "Beneficiary": "Name",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para um pagamento do tipo boleto bancário.
POST https://walletsapi.clearsale.com.br/v1/payments HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "bank-slip",
    "Methods": [
        {
            "Method": "balance",
            "Amount": 123.45
        },
        {
            "Method": "card",
            "CardId": "abc123",
            "Amount": 123.45
        }
    ],
    "Document": "45964891578",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "DueDate": "2029-12-26",
    "Beneficiary": "Name",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para um pagamento do tipo recarga. Deve incluir CardNumber/PhoneNumber como informação adicional.
POST https://walletsapi.clearsale.com.br/v1/payments HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "recharge",
    "Methods": [
        {
            "Method": "balance",
            "Amount": 123.45
        },
        {
            "Method": "card",
            "CardId": "abc123",
            "Amount": 123.45
        }
    ],
    "AdditionalInformation":{
        "Description": "Some good development things",
    	"PhoneNumber":"11976968913",
    	"CardNumber": "124567912356000001"
    },
    "Document": "45964891578",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "DueDate": "2029-12-26",
    "Beneficiary": "Name",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para um pagamento do tipo item. Deve incluir o valor dos Itens.
POST https://walletsapi.clearsale.com.br/v1/payments HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "item",
    "Methods": [
        {
            "Method": "balance",
            "Amount": 50.00
        },
        {
            "Method": "card",
            "CardId": "abc123",
            "Amount": 50.00
        }
    ],
    "Items": [
        {
            "Quantity": 10,
            "Amount": 10,
            "Description": "Development things"
        }
    ],
    "Document": "45964891578",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "DueDate": "2029-12-26",
    "Beneficiary": "Name",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para um pagamento do tipo convênio.
POST https://stagingwalletapi.clearsale.com.br/v1/payments HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "covenant",
    "Methods": [
        {
            "Method": "balance",
            "Amount": 123.45
        },
        {
            "Method": "card",
            "CardId": "abc123",
            "Amount": 123.45
        }
    ],
    "Document": "45964891578",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "DueDate": "2029-12-26",
    "Beneficiary": "Name",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para um pagamento do tipo boleto bancário.
POST https://stagingwalletapi.clearsale.com.br/v1/payments HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "bank-slip",
    "Methods": [
        {
            "Method": "balance",
            "Amount": 123.45
        },
        {
            "Method": "card",
            "CardId": "abc123",
            "Amount": 123.45
        }
    ],
    "Document": "45964891578",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "DueDate": "2029-12-26",
    "Beneficiary": "Name",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para um pagamento do tipo recarga. Deve incluir CardNumber/PhoneNumber como informação adicional.
POST https://stagingwalletapi.clearsale.com.br/v1/payments HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "recharge",
    "Methods": [
        {
            "Method": "balance",
            "Amount": 123.45
        },
        {
            "Method": "card",
            "CardId": "abc123",
            "Amount": 123.45
        }
    ],
    "AdditionalInformation":{
        "Description": "Some good development things",
    	"PhoneNumber":"11976968913",
    	"CardNumber": "124567912356000001"
    },
    "Document": "45964891578",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "DueDate": "2029-12-26",
    "Beneficiary": "Name",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para um pagamento do tipo item. Deve incluir o valor dos Itens.
POST https://stagingwalletapi.clearsale.com.br/v1/payments HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "item",
    "Methods": [
        {
            "Method": "balance",
            "Amount": 50.00
        },
        {
            "Method": "card",
            "CardId": "abc123",
            "Amount": 50.00
        }
    ],
    "Items": [
        {
            "Quantity": 10,
            "Amount": 10,
            "Description": "Development things"
        }
    ],
    "Document": "45964891578",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "DueDate": "2029-12-26",
    "Beneficiary": "Name",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Request
Indicated for a covenant payment.
POST https://walletsapi.clearsale.com.br/v1/payments HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "covenant",
    "Methods": [
        {
            "Method": "balance",
            "Amount": 123.45
        },
        {
            "Method": "card",
            "CardId": "abc123",
            "Amount": 123.45
        }
    ],
    "Document": "45964891578",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "DueDate": "2029-12-26",
    "Beneficiary": "Name",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a bank-slip payment.
POST https://walletsapi.clearsale.com.br/v1/payments HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "bank-slip",
    "Methods": [
        {
            "Method": "balance",
            "Amount": 123.45
        },
        {
            "Method": "card",
            "CardId": "abc123",
            "Amount": 123.45
        }
    ],
    "Document": "45964891578",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "DueDate": "2029-12-26",
    "Beneficiary": "Name",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a recharge payment. CardNumber/PhoneNumber must be included as additional information.
POST https://walletsapi.clearsale.com.br/v1/payments HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "recharge",
    "Methods": [
        {
            "Method": "balance",
            "Amount": 123.45
        },
        {
            "Method": "card",
            "CardId": "abc123",
            "Amount": 123.45
        }
    ],
    "AdditionalInformation":{
        "Description": "Some good development things",
    	"PhoneNumber":"11976968913",
    	"CardNumber": "124567912356000001"
    },
    "Document": "45964891578",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "DueDate": "2029-12-26",
    "Beneficiary": "Name",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a item payment. The value of the Items must be included.
POST https://walletsapi.clearsale.com.br/v1/payments HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "item",
    "Methods": [
        {
            "Method": "balance",
            "Amount": 50.00
        },
        {
            "Method": "card",
            "CardId": "abc123",
            "Amount": 50.00
        }
    ],
    "Items": [
        {
            "Quantity": 10,
            "Amount": 10,
            "Description": "Development things"
        }
    ],
    "Document": "45964891578",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "DueDate": "2029-12-26",
    "Beneficiary": "Name",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a covenant payment.
POST https://stagingwalletapi.clearsale.com.br/v1/payments HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "covenant",
    "Methods": [
        {
            "Method": "balance",
            "Amount": 123.45
        },
        {
            "Method": "card",
            "CardId": "abc123",
            "Amount": 123.45
        }
    ],
    "Document": "45964891578",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "DueDate": "2029-12-26",
    "Beneficiary": "Name",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a bank-slip payment.
POST https://stagingwalletapi.clearsale.com.br/v1/payments HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "bank-slip",
    "Methods": [
        {
            "Method": "balance",
            "Amount": 123.45
        },
        {
            "Method": "card",
            "CardId": "abc123",
            "Amount": 123.45
        }
    ],
    "Document": "45964891578",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "DueDate": "2029-12-26",
    "Beneficiary": "Name",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a recharge payment. CardNumber/PhoneNumber must be included as additional information.
POST https://stagingwalletapi.clearsale.com.br/v1/payments HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "recharge",
    "Methods": [
        {
            "Method": "balance",
            "Amount": 123.45
        },
        {
            "Method": "card",
            "CardId": "abc123",
            "Amount": 123.45
        }
    ],
    "AdditionalInformation":{
        "Description": "Some good development things",
    	"PhoneNumber":"11976968913",
    	"CardNumber": "124567912356000001"
    },
    "Document": "45964891578",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "DueDate": "2029-12-26",
    "Beneficiary": "Name",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a item payment. The value of the Items must be included.
POST https://stagingwalletapi.clearsale.com.br/v1/payments HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "item",
    "Methods": [
        {
            "Method": "balance",
            "Amount": 50.00
        },
        {
            "Method": "card",
            "CardId": "abc123",
            "Amount": 50.00
        }
    ],
    "Items": [
        {
            "Quantity": 10,
            "Amount": 10,
            "Description": "Development things"
        }
    ],
    "Document": "45964891578",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "DueDate": "2029-12-26",
    "Beneficiary": "Name",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Resposta
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 36,
    "Type": "covenant",
    "Methods": [
        {
            "Method": "balance"
        },
        {
            "Method": "card",
            "CardId": "abc123"
        }
    ],
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 36,
    "Type": "bank-slip",
    "Methods": [
        {
            "Method": "balance"
        },
        {
            "Method": "card",
            "CardId": "abc123"
        }
    ],
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 36,
    "Type": "recharge",
    "Methods": [
        {
            "Method": "balance"
        },
        {
            "Method": "card",
            "CardId": "abc123"
        }
    ],
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 36,
    "Type": "item",
    "Methods": [
        {
            "Method": "balance"
        },
        {
            "Method": "card",
            "CardId": "abc123"
        }
    ],
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
Response
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 36,
    "Type": "covenant",
    "Methods": [
        {
            "Method": "balance"
        },
        {
            "Method": "card",
            "CardId": "abc123"
        }
    ],
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 36,
    "Type": "bank-slip",
    "Methods": [
        {
            "Method": "balance"
        },
        {
            "Method": "card",
            "CardId": "abc123"
        }
    ],
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 36,
    "Type": "recharge",
    "Methods": [
        {
            "Method": "balance"
        },
        {
            "Method": "card",
            "CardId": "abc123"
        }
    ],
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 36,
    "Type": "item",
    "Methods": [
        {
            "Method": "balance"
        },
        {
            "Method": "card",
            "CardId": "abc123"
        }
    ],
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden

Consulta

Este método é utilizado para buscar informações de uma transação de Pagamento no Wallet.

Check

This method is used to retrieve information about a Payment transaction from Wallet.

Requisição
GET https://walletsapi.clearsale.com.br/v1/payments/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/payments/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Request
GET https://walletsapi.clearsale.com.br/v1/payments/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/payments/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Resposta
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 36,
    "Methods": [
        {
            "Method": "balance"
        },
        {
            "Method": "card",
            "CardId": "abc123"
        }
    ],
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
Response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 36,
    "Methods": [
        {
            "Method": "balance"
        },
        {
            "Method": "card",
            "CardId": "abc123"
        }
    ],
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found

Consulta por TransactionId

Este método é utilizado para buscar o histórico de uma determinada transação de Pagamento no Wallet.

Search by TransactionId

This method is used to search the history of a specific Payment transaction in Wallet.

Requisição
GET https://walletsapi.clearsale.com.br/v1/payments/{transactionId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/payments/{transactionId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Request
GET https://walletsapi.clearsale.com.br/v1/payments/{transactionId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/payments/{transactionId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Resposta
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "Location": 1,
    "TotalPages": 2,
    "TotalResults": 4,
    "Results": [
        {
            "AnalysisId": 36,
            "AccountId": "abc123",
            "TransactionId": "zwy987",
            "Status": "approved",
            "Score": 85.00
        }, 
        {
            "AnalysisId": 37,
            "AccountId": "abc123",
            "TransactionId": "zwy987",
            "Status": "approved",
            "Score": 85.00
        },
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
Response
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "Location": 1,
    "TotalPages": 2,
    "TotalResults": 4,
    "Results": [
        {
            "AnalysisId": 36,
            "AccountId": "abc123",
            "TransactionId": "zwy987",
            "Status": "approved",
            "Score": 85.00
        }, 
        {
            "AnalysisId": 37,
            "AccountId": "abc123",
            "TransactionId": "zwy987",
            "Status": "approved",
            "Score": 85.00
        },
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found

Dicionário de variáveis


Transaction

Nome Descrição Tipo Tamanho Obrigatório
Type Descrição do tipo de pagamento
[covenant, bank-slip, recharge, item]
String - Sim
AccountId Identificador da conta gerado pelo lojista String - Sim
TransactionId Identificador gerado pelo lojista para a transação String - Sim
Amount Valor de pagamento Decimal 0.01 Sim
DueDate Data de vencimento do pagamento
[YYYY-MM-DD]
String 10 Sim
Beneficiary Beneficiário do pagamento String - Sim
SessionId Valor do SessionId capturado pelo Behavior Analytics
(Javascript ou SDK)
String 5~128 Não
Methods Objeto com informações dos métodos de pagamento Methods - Sim
Document CPF do cliente
CPNJ do cliente
String 11-14 Sim
Items Objeto com informações dos itens para pagamento. Items - Não
AdditionalInformation Objeto com informações adicionais ao pagamento. AdditionalInformation - Não

Variable Dictionary


Transaction

Name Description Type Size Required
Type Description of the payment type
[covenant, bank-slip, recharge, item]
String - Yes
AccountId Account identifier generated by the shopkeeper String - Yes
TransactionId Identifier generated by the merchant for the transaction String - Yes
Amount Payment value Decimal 0.01 Yes
DueDate Payment Due Date
[YYYY-MM-DD]
String 10 Yes
Beneficiary Payee String - Yes
SessionId SessionId value captured by Behavior Analytics
(Javascript or SDK)
String 5~128 No
Methods Object with payment method information Methods - Yes
Document Customer CPF (Government Id)
Customer CPNJ (Employer Identification Number)
String 11-14 Yes
Items Object with item information for payment. Items - No
AdditionalInformation Object with additional payment information. AdditionalInformation - No

Result

Nome Descrição Tipo
AnalysisId Identificador gerado pelo ClearSale para rastrear uma transação Int
Status Status de análise indicado pela ClearSale.
[approved, reproved, manual review]
String
Score Score de fraude Decimal

Result

Name Description Type
AnalysisId Identifier created by ClearSale to fetch a transaction Int
Status Analysis status generated by ClearSale.
[approved, reproved, manual review]
String
Score Data fraud score Decimal

Methods

Nome Descrição Tipo Tamanho Obrigatório
Method Descrição do tipo de pagamento
[balance, card]
String - Sim
Amount Valor da parcela Decimal 0.01 Sim
CardId Identificador do cartão gerado pelo lojista String - Não
Installment Quantidade de parcelas Int 1 Não

Methods

Name Description Type Size Required
Method Payment type description
[balance, card]
String - Yes
Amount installment value Decimal 0.01 Yes
CardId Card identifier generated by the shopkeeper String - No
Installment Number of installments Int 1 No

Items

Nome Descrição Tipo Tamanho Obrigatório
Quantity Quantidade de itens String 1 Não
Amount Valor de pagamento Decimal 0.01 Sim
Description Descrição do item String - Não

Items

Name Description Type Size Required
Quantity Quantity of items String 1 No
Amount Payment Amount Decimal 0.01 Yes
Description Item Description String - No

AdditionalInformation

Nome Descrição Tipo Tamanho Obrigatório
Description Descrição opcional String - Não
PhoneNumber Número do telefone celular vinculado String - Não
CardNumber Número do cartão vinculado String - Não

AdditionalInformation

Name Description Type Size Required
Description Optional description String - No
PhoneNumber Linked cell phone number String - No
CardNumber Linked card number String - No

Pix

Esse contexto está relacionado aos dados para execução de uma transação Pix no Wallet.

Pix

This context is related to data for executing a transaction pix in the wallet.

Envio

Este método é utilizado para fazer o envio de uma transação de Pix no Wallet e receber insights, ratings, score de fraude e uma recomendação de decisão.

Send

This method is used to send a Pix transaction to Wallet and receive insights, ratings, data fraud score and a decision recommendation.

Requisição
POST https://walletsapi.clearsale.com.br/v1/pix HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "TransactionType": "PACS.004",
    "EndToEndId ": "PACS.004",
    "Channel": "WEB",
    "QrCode": {
        "Value": "00020101021126440014br.gov.bcb.pix0122fulano2019@example.com5204000053039865802BR5913FULANO DE TAL6008BRASILIA6304DFE3",
        "DynaMicUrl": {
            "Url": "http://bx.com.br/spi/U0VHUkVET1RPVEFMTUVOVEVBTEVBVE9SSU8=",
            "Ip": "127.0.0.1"
        }
    },
    "Recipient": {
        "Document": "44946324810",
        "DocumentType": "CPF",
        "PixAccount": {
            "Participant": "237",
            "Branch": "2478",
            "AccountNumber": "152710",
            "AccountType": "CACC",
            "OpeningDate": "10-10-2021"
        },
        "Key": {
            "Value": "5511976151520",
            "Type": "Phone"
        }
    },
    "Sender": {
        "PixAccount": {
            "Participant": "237",
            "Branch": "8487",
            "AccountNumber": "157890",
            "AccountType": "CACC",
            "OpeningDate": "10-10-2021"
        }
    },
    "Currency": "Real",
    "Amount": 10.5,
    "ReferenceDate": "10-10-2021",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
POST https://stagingwalletapi.clearsale.com.br/v1/pix HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "TransactionType": "PACS.004",
    "EndToEndId ": "PACS.004",
    "Channel": "WEB",
    "QrCode": {
        "Value": "00020101021126440014br.gov.bcb.pix0122fulano2019@example.com5204000053039865802BR5913FULANO DE TAL6008BRASILIA6304DFE3",
        "DynaMicUrl": {
            "Url": "http://bx.com.br/spi/U0VHUkVET1RPVEFMTUVOVEVBTEVBVE9SSU8=",
            "Ip": "127.0.0.1"
        }
    },
    "Recipient": {
        "Document": "44946324810",
        "DocumentType": "CPF",
        "PixAccount": {
            "Participant": "237",
            "Branch": "2478",
            "AccountNumber": "152710",
            "AccountType": "CACC",
            "OpeningDate": "10-10-2021"
        },
        "Key": {
            "Value": "5511976151520",
            "Type": "Phone"
        }
    },
    "Sender": {
        "PixAccount": {
            "Participant": "237",
            "Branch": "8487",
            "AccountNumber": "157890",
            "AccountType": "CACC",
            "OpeningDate": "10-10-2021"
        }
    },
    "Currency": "Real",
    "Amount": 10.5,
    "ReferenceDate": "10-10-2021",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Request
POST https://walletsapi.clearsale.com.br/v1/pix HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "TransactionType": "PACS.004",
    "EndToEndId ": "PACS.004",
    "Channel": "WEB",
    "QrCode": {
        "Value": "00020101021126440014br.gov.bcb.pix0122fulano2019@example.com5204000053039865802BR5913FULANO DE TAL6008BRASILIA6304DFE3",
        "DynaMicUrl": {
            "Url": "http://bx.com.br/spi/U0VHUkVET1RPVEFMTUVOVEVBTEVBVE9SSU8=",
            "Ip": "127.0.0.1"
        }
    },
    "Recipient": {
        "Document": "44946324810",
        "DocumentType": "CPF",
        "PixAccount": {
            "Participant": "237",
            "Branch": "2478",
            "AccountNumber": "152710",
            "AccountType": "CACC",
            "OpeningDate": "10-10-2021"
        },
        "Key": {
            "Value": "5511976151520",
            "Type": "Phone"
        }
    },
    "Sender": {
        "PixAccount": {
            "Participant": "237",
            "Branch": "8487",
            "AccountNumber": "157890",
            "AccountType": "CACC",
            "OpeningDate": "10-10-2021"
        }
    },
    "Currency": "Real",
    "Amount": 10.5,
    "ReferenceDate": "10-10-2021",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
POST https://stagingwalletapi.clearsale.com.br/v1/pix HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "TransactionType": "PACS.004",
    "EndToEndId ": "PACS.004",
    "Channel": "WEB",
    "QrCode": {
        "Value": "00020101021126440014br.gov.bcb.pix0122fulano2019@example.com5204000053039865802BR5913FULANO DE TAL6008BRASILIA6304DFE3",
        "DynaMicUrl": {
            "Url": "http://bx.com.br/spi/U0VHUkVET1RPVEFMTUVOVEVBTEVBVE9SSU8=",
            "Ip": "127.0.0.1"
        }
    },
    "Recipient": {
        "Document": "44946324810",
        "DocumentType": "CPF",
        "PixAccount": {
            "Participant": "237",
            "Branch": "2478",
            "AccountNumber": "152710",
            "AccountType": "CACC",
            "OpeningDate": "10-10-2021"
        },
        "Key": {
            "Value": "5511976151520",
            "Type": "Phone"
        }
    },
    "Sender": {
        "PixAccount": {
            "Participant": "237",
            "Branch": "8487",
            "AccountNumber": "157890",
            "AccountType": "CACC",
            "OpeningDate": "10-10-2021"
        }
    },
    "Currency": "Real",
    "Amount": 10.5,
    "ReferenceDate": "10-10-2021",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Resposta
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 341,
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00,
    "Insights": [
        {
            "Code": "GER2151",
            "Description": "CPF com incidência de transações positivas",
            "Type": "CPF",
            "Category": "Característica CPF",
            "Relevance": "Positivo",
            "RelatedTo": [
                "Document"
            ]
        },
        {
            "Code": "GER2117",
            "Description": "Estado de emissão do CPF: SP",
            "Type": "CPF",
            "Category": "Característica CPF",
            "Relevance": "Neutro",
            "RelatedTo": [
                "Document"
            ]
        }
    ],
    "Ratings": [
        {
            "Value": 1,
            "Reason": "Initial",
            "CreatedAt": "2021-03-10T17:26:25.974Z",
            "RelatedTo": [
                "Document",
                "Email"
            ]
        }
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
Response
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 341,
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00,
    "Insights": [
        {
            "Code": "GER2151",
            "Description": "CPF com incidência de transações positivas",
            "Type": "CPF",
            "Category": "Característica CPF",
            "Relevance": "Positivo",
            "RelatedTo": [
                "Document"
            ]
        },
        {
            "Code": "GER2117",
            "Description": "Estado de emissão do CPF: SP",
            "Type": "CPF",
            "Category": "Característica CPF",
            "Relevance": "Neutro",
            "RelatedTo": [
                "Document"
            ]
        }
    ],
    "Ratings": [
        {
            "Value": 1,
            "Reason": "Initial",
            "CreatedAt": "2021-03-10T17:26:25.974Z",
            "RelatedTo": [
                "Document",
                "Email"
            ]
        }
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden

Consulta

Este método é utilizado para buscar informações de uma transação de Pix no Wallet.

Check

This method is used to retrieve information about a Pix transaction from Wallet.

Requisição
GET https://walletsapi.clearsale.com.br/v1/pix/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/pix/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Request
GET https://walletsapi.clearsale.com.br/v1/pix/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/pix/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Resposta
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 341,
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00,
    "Insights": [
        {
            "Code": "GER2151",
            "Description": "CPF com incidência de transações positivas",
            "Type": "CPF",
            "Category": "Característica CPF",
            "Relevance": "Positivo",
            "RelatedTo": [
                "Document"
            ]
        },
        {
            "Code": "GER2117",
            "Description": "Estado de emissão do CPF: SP",
            "Type": "CPF",
            "Category": "Característica CPF",
            "Relevance": "Neutro",
            "RelatedTo": [
                "Document"
            ]
        }
    ],
    "Ratings": [
        {
            "Value": 1,
            "Reason": "Initial",
            "CreatedAt": "2021-03-10T17:26:25.974Z",
            "RelatedTo": [
                "Document",
                "Email"
            ]
        }
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
Response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 341,
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00,
    "Insights": [
        {
            "Code": "GER2151",
            "Description": "CPF com incidência de transações positivas",
            "Type": "CPF",
            "Category": "Característica CPF",
            "Relevance": "Positivo",
            "RelatedTo": [
                "Document"
            ]
        },
        {
            "Code": "GER2117",
            "Description": "Estado de emissão do CPF: SP",
            "Type": "CPF",
            "Category": "Característica CPF",
            "Relevance": "Neutro",
            "RelatedTo": [
                "Document"
            ]
        }
    ],
    "Ratings": [
        {
            "Value": 1,
            "Reason": "Initial",
            "CreatedAt": "2021-03-10T17:26:25.974Z",
            "RelatedTo": [
                "Document",
                "Email"
            ]
        }
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found

Consulta por TransactionId

Este método é utilizado para buscar o histórico de uma determinada transação de Pix no Wallet.

Search by TransactionId

This method is used to search the history of a specific Pix transaction in Wallet.

Requisição
GET https://walletsapi.clearsale.com.br/v1/pix/{transactionId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/pix/{transactionId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Request
GET https://walletsapi.clearsale.com.br/v1/pix/{transactionId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/pix/{transactionId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Resposta
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "Location": 1,
    "TotalPages": 1,
    "TotalResults": 1,
    "Results": [
        {
            "AnalysisId": 341,
            "AccountId": "abc123",
            "TransactionId": "zwy987",
            "Status": "approved",
            "Score": 85.00,
            "Insights": [
                {
                    "Code": "GER2151",
                    "Description": "CPF com incidência de transações positivas",
                    "Type": "CPF",
                    "Category": "Característica CPF",
                    "Relevance": "Positivo",
                    "RelatedTo": [
                        "Document"
                    ]
                },
                {
                    "Code": "GER2117",
                    "Description": "Estado de emissão do CPF: SP",
                    "Type": "CPF",
                    "Category": "Característica CPF",
                    "Relevance": "Neutro",
                    "RelatedTo": [
                        "Document"
                    ]
                }
            ],
            "Ratings": [
                {
                    "Value": 1,
                    "Reason": "Initial",
                    "CreatedAt": "2021-03-10T17:26:25.974Z",
                    "RelatedTo": [
                        "Document",
                        "Email"
                    ]
                }
            ]
        }
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
Response
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "Location": 1,
    "TotalPages": 1,
    "TotalResults": 1,
    "Results": [
        {
            "AnalysisId": 341,
            "AccountId": "abc123",
            "TransactionId": "zwy987",
            "Status": "approved",
            "Score": 85.00,
            "Insights": [
                {
                    "Code": "GER2151",
                    "Description": "CPF com incidência de transações positivas",
                    "Type": "CPF",
                    "Category": "Característica CPF",
                    "Relevance": "Positivo",
                    "RelatedTo": [
                        "Document"
                    ]
                },
                {
                    "Code": "GER2117",
                    "Description": "Estado de emissão do CPF: SP",
                    "Type": "CPF",
                    "Category": "Característica CPF",
                    "Relevance": "Neutro",
                    "RelatedTo": [
                        "Document"
                    ]
                }
            ],
            "Ratings": [
                {
                    "Value": 1,
                    "Reason": "Initial",
                    "CreatedAt": "2021-03-10T17:26:25.974Z",
                    "RelatedTo": [
                        "Document",
                        "Email"
                    ]
                }
            ]
        }
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found

Dicionário de variáveis


Transaction

Nome Descrição Tipo Tamanho Obrigatório
AccountId Identificador da conta String - Sim
TransactionId Identificador gerado pelo lojista para a transação String - Sim
TransactionType Tipo da mensagem usada na transação SPI
[PACS.008, PACS.004]
String - Não
EndToEndId identificação única atribuída pelo componente iniciador a identificar inequivocamente a transação. Mesmo valor usado nas mensagens PACS.008 e PACS.004 String - Não
TxId identificação de transação usada em mensagens PACS para SPI em transações PIX por QRCode ou Link String - Não
Channel Canal de origem da transação
[WEB, MOBILE, AGENCY]
String - Sim
SessionId Valor do SessionId capturado pelo Behavior Analytics
(Javascript ou SDK)
String 5~128 Não
QrCode Objeto com informações referentes a QrCode QrCode - Não
UrlLink Objeto com informações referentes a Url UrlLink - Não
Recipient Objeto com informações referentes a quem recebe a transação Recipient - Sim
Sender Objeto com informações referentes a quem envia a transação Sender - Sim
Currency Identificador da moeda usada na transação String - Sim
Amount Valor da transferência Decimal 0.01 Sim
ReferenceDate Data e hora da transação String - Sim

Variable Dictionary


Transaction

Name Description Type Size Required
AccountId Account identifier generated by the shopkeepert String - Yes
TransactionId Identifier generated by the merchant for the transaction String - Yes
TransactionType Type of message used in the SPI transaction
[PACS.008, PACS.004]
String - No
EndToEndId Unique identification assigned by the initiating component to unequivocally identify the transaction. Same value used in messages PACS.008 and PACS.004 String - No
TxId Transaction identification used in PACS messages for SPI in PIX transactions via QRCode or Link String - No
Channel Transaction source channel
[WEB, MOBILE, AGENCY]
String - Yes
SessionId SessionId value captured by Behavior Analytics
(Javascript ou SDK)
String 5~128 No
QrCode Object with qrcode information QrCode - No
UrlLink Object with url information UrlLink - No
Recipient Object with information regarding who receives the transaction Recipient - Yes
Sender Object with information regarding who sends the transaction Sender - Yes
Currency Currency identifier used in the transaction String - Yes
Amount Transfer amount Decimal 0.01 Yes
ReferenceDate Transaction date and time String - Yes

Result

Nome Descrição Tipo
AnalysisId Identificador gerado pelo ClearSale para rastrear uma transação Int
Status Status de análise indicado pela ClearSale.
[approved, reproved, manual review]
String
Score Score de fraude Decimal
Insights Objeto contendo informações de insights do cliente Object
Rating Objeto contendo informações de rating do cliente Object

Result

Name Description Type
AnalysisId Identifier created by ClearSale to fetch a transaction Int
Status Analysis status generated by ClearSale.
[approved, reproved, manual review]
String
Score Data fraud score Decimal
Insights Object with insights information Object
Rating Object with rating information Object

QrCode

Nome Descrição Tipo Tamanho Obrigatório
Value Valor QrCode (fixo/dinâmico) String - Não
DynamicUrl Objeto com informações referentes a Url DynamicUrl - Não

QrCode

Name Description Type Size Required
Value Value QrCode (fixed/dynamic) String - No
DynamicUrl Object with url information DynamicUrl - No

DynamicUrl

Nome Descrição Tipo Tamanho Obrigatório
Url Valor da Url String - Não
Ip Valor Ip da Url String - Não

DynamicUrl

Name Description Type Size Required
Url Url value String - No
Ip Url Ip Value String - No

Recipient

Nome Descrição Tipo Tamanho Obrigatório
Document Valor do documento. Somente números sem formatação String - Sim
DocumentType Tipo do documento
[CPF, CNPJ]
String - Sim
PixAccount Informações do objeto de conta bancária PixAccount - Sim
Key Objeto com informações referentes as chaves utilizadas na transação Key - Não

Recipient

Name Description Type Size Required
Document Document's value. Only plain numbers String - Yes
DocumentType Document type
[CPF, CNPJ]
String - Yes
PixAccount Object with information bank account information PixAccount - Yes
Key Object with information regarding the keys used in the transaction Key - No

Key

Nome Descrição Tipo Tamanho Obrigatório
Value Valor da chave DICT
Se Type == CPF. Utilizar somente números
Se Type == PHONE. Utilizar número do telefone incluindo código do país e código da área
String - Sim
Type Chave na DICT
["CPF", "PHONE", "EMAIL", "EVP"]
String - Sim

Key

Name Description Type Size Required
Value DICT key value
If Type == CPF. Use only numbers
If Type == PHONE. Use phone number including country code and area code
String - Yes
Type Key in DICT
["CPF", "PHONE", "EMAIL", "EVP"]
String - Yes

PixAccount

Nome Descrição Tipo Tamanho Obrigatório
Participant Número do banco (identificador SPB) String - Sim
Branch Número da agência da conta bancária sem o dígito String - Sim
AccountNumber Número da conta bancária String - Sim
AccountType Tipo de conta
[CACC,SLRY,SVGS]
String - Sim
OpeningDate Data de abertura da conta String - Sim

PixAccount

Name Description Type Size Required
Participant Bank number (SPB identifier) String - Yes
Branch Bank account branch number without the digit String - Yes
AccountNumber Bank account number String - Yes
AccountType Account Type
[CACC,SLRY,SVGS]
String - Yes
OpeningDate Account opening date String - Yes

Sender

Nome Descrição Tipo Tamanho Obrigatório
PixAccount Informações do objeto de Conta bancária PixAccount - Sim

Sender

Name Description Type Size Required
PixAccount Object with information bank account information PixAccount - Yes

Transfers

Esse contexto está relacionado aos dados de transferência entre carteiras digitais previamente cadastradas – Peer-to-Peer.

Transfers

This context is related to the transfer data between previously registered digital wallets - Peer-to-Peer.

Envio

Este método é utilizado para fazer o envio de uma transação de Transferência no Wallet e receber um score de fraude e uma recomendação de decisão.

Send

This method is used to send a Transfer transaction to Wallet and receive a data fraud score and a decision recommendation.

Requisição
Indicado para uma transferência direta.
POST https://walletsapi.clearsale.com.br/v1/transfers HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "direct",
    "SenderAccountId": "abc123",
    "RecipientAccountId": "zwy987",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para uma transferência vinculada à um saldo de cashback.
POST https://walletsapi.clearsale.com.br/v1/transfers HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "cash",
    "SenderAccountId": "abc123",
    "RecipientAccountId": "zwy987",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para uma transferência vinculada à um cartão. Deve incluir um cardId.
POST https://walletsapi.clearsale.com.br/v1/transfers HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "card",
    "SenderAccountId": "abc123",
    "RecipientAccountId": "zwy987",
    "CardId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para uma transferência direta.
POST https://stagingwalletapi.clearsale.com.br/v1/transfers HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "direct",
    "SenderAccountId": "abc123",
    "RecipientAccountId": "zwy987",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para uma transferência vinculada à um saldo de cashback.
POST https://stagingwalletapi.clearsale.com.br/v1/transfers HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "cash",
    "SenderAccountId": "abc123",
    "RecipientAccountId": "zwy987",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para uma transferência vinculada à um cartão. Deve incluir um cardId.
POST https://stagingwalletapi.clearsale.com.br/v1/transfers HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "card",
    "SenderAccountId": "abc123",
    "RecipientAccountId": "zwy987",
    "CardId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Request
Indicated for a direct transfer.
POST https://walletsapi.clearsale.com.br/v1/transfers HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "direct",
    "SenderAccountId": "abc123",
    "RecipientAccountId": "zwy987",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a transfer linked to a cashback balance.
POST https://walletsapi.clearsale.com.br/v1/transfers HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "cash",
    "SenderAccountId": "abc123",
    "RecipientAccountId": "zwy987",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a transfer linked to a card. It must include a cardId.
POST https://walletsapi.clearsale.com.br/v1/transfers HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "card",
    "SenderAccountId": "abc123",
    "RecipientAccountId": "zwy987",
    "CardId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a direct transfer.
POST https://stagingwalletapi.clearsale.com.br/v1/transfers HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "direct",
    "SenderAccountId": "abc123",
    "RecipientAccountId": "zwy987",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a transfer linked to a cashback balance.
POST https://stagingwalletapi.clearsale.com.br/v1/transfers HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "cash",
    "SenderAccountId": "abc123",
    "RecipientAccountId": "zwy987",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a transfer linked to a card. It must include a cardId.
POST https://stagingwalletapi.clearsale.com.br/v1/transfers HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "card",
    "SenderAccountId": "abc123",
    "RecipientAccountId": "zwy987",
    "CardId": "abc123",
    "TransactionId": "zwy987",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Resposta
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 30,
    "Type": "direct",
    "SenderAccountId": "abc123",
    "RecipientAccountId": "zwy987",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 30,
    "Type": "cash",
    "SenderAccountId": "abc123",
    "RecipientAccountId": "zwy987",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 30,
    "Type": "card",
    "SenderAccountId": "abc123",
    "RecipientAccountId": "zwy987",
    "CardId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
Response
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 30,
    "Type": "direct",
    "SenderAccountId": "abc123",
    "RecipientAccountId": "zwy987",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 30,
    "Type": "cash",
    "SenderAccountId": "abc123",
    "RecipientAccountId": "zwy987",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 30,
    "Type": "card",
    "SenderAccountId": "abc123",
    "RecipientAccountId": "zwy987",
    "CardId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden

Consulta

Este método é utilizado para buscar informações de uma transação de Transferência no Wallet.

Check

This method is used to search for information about a Transfer transaction in Wallet.

Requisição
GET https://walletsapi.clearsale.com.br/v1/transfers/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/transfers/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Request
GET https://walletsapi.clearsale.com.br/v1/transfers/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/transfers/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Resposta
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 30,
    "Type": "card",
    "SenderAccountId": "abc123",
    "RecipientAccountId": "zwy987",
    "CardId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
Response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 30,
    "Type": "card",
    "SenderAccountId": "abc123",
    "RecipientAccountId": "zwy987",
    "CardId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found

Consulta por TransactionId

Este método é utilizado para buscar o histórico de uma determinada trasação de Transferência no Wallet.

Search by TransactionId

This method is used to search the history of a specific Transfer transaction in Wallet.

Requisição
GET https://walletsapi.clearsale.com.br/v1/transfers/{transactionId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/transfers/{transactionId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Request
GET https://walletsapi.clearsale.com.br/v1/transfers/{transactionId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/transfers/{transactionId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Resposta
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "Location": 1,
    "TotalPages": 3,
    "TotalResults": 9,
    "Results": [
        {
            "AnalysisId": 30,
            "Type": "direct",
            "SenderAccountId": "abc123",
            "RecipientAccountId": "zwy987",
            "TransactionId": "zwy987",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 31,
            "Type": "cash",
            "SenderAccountId": "abc123",
            "RecipientAccountId": "zwy987",
            "TransactionId": "zwy987",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 32,
            "Type": "direct",
            "SenderAccountId": "abc123",
            "RecipientAccountId": "zwy987",
            "TransactionId": "zwy987",
            "Status": "approved",
            "Score": 85.00
        }
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
Response
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "Location": 1,
    "TotalPages": 3,
    "TotalResults": 9,
    "Results": [
        {
            "AnalysisId": 30,
            "Type": "direct",
            "SenderAccountId": "abc123",
            "RecipientAccountId": "zwy987",
            "TransactionId": "zwy987",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 31,
            "Type": "cash",
            "SenderAccountId": "abc123",
            "RecipientAccountId": "zwy987",
            "TransactionId": "zwy987",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 32,
            "Type": "direct",
            "SenderAccountId": "abc123",
            "RecipientAccountId": "zwy987",
            "TransactionId": "zwy987",
            "Status": "approved",
            "Score": 85.00
        }
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found

Dicionário de variáveis


Transaction

Nome Descrição Tipo Tamanho Obrigatório
Type Descrição do tipo de transferência
[direct, cash, card]
String - Sim
SenderAccountId Identificador da conta de origem gerado pelo lojista String - Sim
RecipientAccountId Identificador da conta de destino gerado pelo lojista String - Sim
CardId Identificador do cartão gerado pelo lojista String - Não
TransactionId Identificador gerado pelo lojista para a transação String - Sim
Amount Valor de transferência Decimal 0.01 Sim
SessionId Valor do SessionId capturado pelo Behavior Analytics
(Javascript ou SDK)
String 5~128 Não

Variable Dictionary


Transaction

Name Description Type Size Required
Type Description of the transfer type
[direct, cash, card]
String - Yes
SenderAccountId Source Account identifier generated by the shopkeeper String - Yes
RecipientAccountId Destination Account identifier generated by the shopkeeper String - Yes
CardId Card identifier generated by the shopkeeper String - No
TransactionId Identifier generated by the merchant for the transaction String - Yes
Amount Transfer value Decimal 0.01 Yes
SessionId SessionId value captured by Behavior Analytics
(Javascript or SDK)
String 5~128 No

Result

Nome Descrição Tipo
AnalysisId Identificador gerado pelo ClearSale para rastrear uma transação Int
Status Status de análise indicado pela ClearSale.
[approved, reproved, manual review]
String
Score Score de fraude Decimal

Result

Name Description Type
AnalysisId Identifier created by ClearSale to fetch a transaction Int
Status Analysis status generated by ClearSale.
[approved, reproved, manual review]
String
Score Data fraud score Decimal

Withdraw

Esse contexto está relacionado a saques de saldo da carteira digital efetuados em caixas eletrônicos 24h ou caixas de lojas físicas.

Withdraw

This context is related to withdrawals from the digital wallet balance made at ATMs 24h or at physical stores.

Envio

Este método é utilizado para fazer o envio de uma transação de Saque no Wallet e receber um score de fraude e uma recomendação de decisão.

Send

This method is used to send a Withdraw transaction to Wallet and receive a data fraud score and a decision recommendation.

Requisição
Indicado para um saque vinculado a um banco. Deve incluir um bankId.
POST https://walletsapi.clearsale.com.br/v1/withdraw HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "bank",
    "AccountId": "abc123",
    "BankId": "abc123",
    "TransactionId": "zwy987",
    "Place": "local",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para um saque vinculado a uma loja.
POST https://walletsapi.clearsale.com.br/v1/withdraw HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "store",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Place": "local",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para um saque vinculado a um caixa eletrônico.
POST https://walletsapi.clearsale.com.br/v1/withdraw HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "atm",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Place": "local",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para um saque vinculado a um banco. Deve incluir um bankId.
POST https://stagingwalletapi.clearsale.com.br/v1/withdraw HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "bank",
    "AccountId": "abc123",
    "BankId": "abc123",
    "TransactionId": "zwy987",
    "Place": "local",
    "Amount": "123.45",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para um saque vinculado a uma loja.
POST https://stagingwalletapi.clearsale.com.br/v1/withdraw HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "store",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Place": "local",
    "Amount": "123.45",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicado para um saque vinculado a um caixa eletrônico.
POST https://stagingwalletapi.clearsale.com.br/v1/withdraw HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "atm",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Place": "local",
    "Amount": "123.45",
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Request
Indicated for a withdrawal linked to a bank. It must include a bankId.
POST https://walletsapi.clearsale.com.br/v1/withdraw HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "bank",
    "AccountId": "abc123",
    "BankId": "abc123",
    "TransactionId": "zwy987",
    "Place": "local",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a withdrawal linked to a store.
POST https://walletsapi.clearsale.com.br/v1/withdraw HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "store",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Place": "local",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a withdrawal linked to a atm.
POST https://walletsapi.clearsale.com.br/v1/withdraw HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "atm",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Place": "local",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a withdrawal linked to a bank. It must include a bankId.
POST https://stagingwalletapi.clearsale.com.br/v1/withdraw HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "bank",
    "AccountId": "abc123",
    "BankId": "abc123",
    "TransactionId": "zwy987",
    "Place": "local",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a withdrawal linked to a store.
POST https://stagingwalletapi.clearsale.com.br/v1/withdraw HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "store",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Place": "local",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Indicated for a withdrawal linked to a atm.
POST https://stagingwalletapi.clearsale.com.br/v1/withdraw HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "atm",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Place": "local",
    "Amount": 123.45,
    "SessionId": "5f29d44c-b2ae-494a-a276-a515eda858b1"
}
Resposta
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 22,
    "Type": "bank",
    "AccountId": "abc123",
    "BankId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 22,
    "Type": "store",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 22,
    "Type": "atm",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
Response
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 22,
    "Type": "bank",
    "AccountId": "abc123",
    "BankId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 22,
    "Type": "store",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 22,
    "Type": "atm",
    "AccountId": "abc123",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden

Consulta

Este método é utilizado para buscar informações de uma transação de Saque no Wallet.

Check

This method is used to search for a Wallet balance Withdraw transaction information.

Requisição
GET https://walletsapi.clearsale.com.br/v1/withdraw/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/withdraw/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Request
GET https://walletsapi.clearsale.com.br/v1/withdraw/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/withdraw/{analysisId} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Resposta
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 22,
    "Type": "bank",
    "AccountId": "abc123",
    "BankId": "123abc",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
Response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "AnalysisId": 22,
    "Type": "bank",
    "AccountId": "abc123",
    "BankId": "123abc",
    "TransactionId": "zwy987",
    "Status": "approved",
    "Score": 85.00
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found

Consulta por TransactionId

Este método é utilizado para buscar o histórico de uma determinada transação de Saque no Wallet.

Search by TransactionId

This method is used to search the history of a specific Withdraw transaction in Wallet.

Requisição
GET https://walletsapi.clearsale.com.br/v1/withdraw/{transactionId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/withdraw/{transactionId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Request
GET https://walletsapi.clearsale.com.br/v1/withdraw/{transactionId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
GET https://stagingwalletapi.clearsale.com.br/v1/withdraw/{transactionId}/search?limit={limit}&page={page} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {Token}
Resposta
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "Location": 1,
    "TotalPages": 3,
    "TotalResults": 9,
    "Results": [
        {
            "AnalysisId": 22,
            "Type": "store",
            "AccountId": "abc123",
            "TransactionId": "zwy987",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 23,
            "Type": "store",
            "AccountId": "abc123",
            "TransactionId": "zwy987",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 24,
            "Type": "bank",
            "AccountId": "abc123",
            "BankId": "123abc",
            "TransactionId": "zwy987",
            "Status": "approved",
            "Score": 85.00
        }
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
Response
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
    "Location": 1,
    "TotalPages": 3,
    "TotalResults": 9,
    "Results": [
        {
            "AnalysisId": 22,
            "Type": "store",
            "AccountId": "abc123",
            "TransactionId": "zwy987",
            "Status": "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 23,
            "Type": "store",
            "AccountId": "abc123",
            "TransactionId": "zwy987",
            "Status":  "approved",
            "Score": 85.00
        },
        {
            "AnalysisId": 24,
            "Type": "bank",
            "AccountId": "abc123",
            "BankId": "123abc",
            "TransactionId": "zwy987",
            "Status":  "approved",
            "Score": 85.00
        }
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found

Dicionário de variáveis


Transaction

Nome Descrição Tipo Tamanho Obrigatório
Type Descrição do tipo de saque
[bank, store, atm]
String - Sim
AccountId Identificador da conta gerado pelo lojista String - Sim
BankId Identificador do banco gerado pelo lojista String - No
TransactionId Identificador gerado pelo lojista para a transação String - Sim
Place Local de retirada String - Sim
Amount Valor do saque Decimal 0.01 Sim
SessionId Valor do SessionId capturado pelo Behavior Analytics
(Javascript ou SDK)
String 5~128 Não

Variable Dictionary


Transaction

Name Description Type Size Required
Type Description of the withdraw type
[bank, store, atm]
String - Yes
AccountId Account identifier generated by the shopkeeper String - Yes
BankId Bank identifier generated by the shopkeeper String - No
TransactionId Identifier generated by the merchant for the transaction String - Yes
Place Location information String - Yes
Amount Withdrawal amount Decimal 0.01 Yes
SessionId SessionId value captured by Behavior Analytics
(Javascript or SDK)
String 5~128 No

Result

Nome Descrição Tipo
AnalysisId Identificador gerado pelo ClearSale para rastrear uma transação Int
Status Status de análise indicado pela ClearSale.
[approved, reproved, manual review]
String
Score Score de fraude Decimal

Result

Name Description Type
AnalysisId Identifier created by ClearSale to fetch a transaction Int
Status Analysis status generated by ClearSale.
[approved, reproved, manual review]
String
Score Data fraud score Decimal

Notificação de alteração de transação (Webhook)

Transaction change notification(Webhook)


Cadastro de URL

Sempre que ocorrer uma alteração de uma transação, o Webhook da Clearsale irá enviar uma notificação para uma URL que deverá ser implementada no lado do integrador.

Para cadastrar as URLs é necessário contatar seu gerente de conta informando os dados da tabela abaixo:


Dado Descrição
Nome Cliente Nome Fantasia do cliente que contratou Wallet
URL URL que será chamada quando houver uma alteração na transação (a mesma URL poderá se repetir entre os tipos de alteração), exemplo: https://api.clearsale.com.br/products/v1/wallet/webhook
Token O token informado deverá ser uma chave secreta que será enviado nas chamadas de Webhook no Header "Authorization: Bearer {Token}"
Tipo Opções de envio de validações.
16 - Accounts
32 - Cards
64 - Payments
128 - Transfers
256 - Withdraw
512 - Cash in
1024 - Banks

URL Registration

Whenever a transaction changes, Clearsale's Webhook will send a notification to a URL that must be implemented on the integrator's side.

To register the URLs, it is necessary to contact your account manager informing the data in the table below:


Data Description
Client Name Registred Trade Mark
URL URL that will be called when there is a change in the transaction (the same URL can be repeated between the types of changes), example: https://api.clearsale.com.br/products/v1/wallet/webhook
Token The informed token must be a secret key that will be sent in Webhook calls in the Header "Authorization: Bearer {Token}"
Type Options to send:
16 - Accounts
32 - Cards
64 - Payments
128 - Transfers
256 - Withdraw
512 - Cash in
1024 - Banks

Chamada de retorno

Os dados da alteração não serão informados na notificação do Webhook, portanto, fica a cargo do integrador o consumo da consulta.


Requisição
POST {Url Cadastrada}
Authorization: Bearer {Token Cadastrado}
Content-Type: application/json; charset=utf-8
{
    "Code": "{Código da Transação}",
    "TypeId": "16|32|64|128|256|512|1024",
    "Description": "{Descrição da Alteração}",
    "Date": "2019-06-07T12:45:00.000"
}

Importante: Se a URL do integrador retornar qualquer Status HTTP diferente de 200 (Ok), será feita outra tentativa de notificar a transação.

Callback

The change data will not be informed in the Webhook notification, therefore, it is up to the integrator to consume the consultation.


Request
POST {Registered URL}
Authorization: Bearer {Registered Token}
Content-Type: application/json; charset=utf-8
{
    "Code": "{AnalysisId}",
    "TypeId": "16|32|64|128|256|512|1024",
    "Description": "{Change Description}",
    "Date": "2019-06-07T12:45:00.000"
}

Important: If the integrator URL returns any HTTP Status other than 200 (Ok), another attempt will be made to notify the transaction.

Reportar Evento

Esse contexto está relacionado ao envio de eventos que possam alterar o resultado da análise.

Reportar Evento

This context is related to the sending of events that can alter the analysis result.

Envio

Este método é usado para relatar análises que tiveram seu status alterado e requerem re-analise.

Send


This method is used to report analyzes that have had their status changed and require re-analysis.

Requisição
Indicado para informar que houve chargeback. Habilitado para todos os contextos.
POST https://walletsapi.clearsale.com.br/v1/reports/{context} HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "chargeback",
    "AnalysisId": [
        101,
        224,
        460,
        662
  ]
}
Indicado para informar que um pagamento foi confirmado. Habilitado para o contexto de Payment.
POST https://walletsapi.clearsale.com.br/v1/reports/{context} HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "confirmed",
    "AnalysisId": [
        101,
        224,
        460,
        662
  ]
}
Indicado para informar que o prazo para pagamento expirou. Habilitado para o contexto de Payment.
POST https://walletsapi.clearsale.com.br/v1/reports/{context} HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "expired",
    "AnalysisId": [
        101,
        224,
        460,
        662
  ]
}
Indicado para informar que houve chargeback. Habilitado para todos os contextos.
POST https://stagingwalletapi.clearsale.com.br/v1/reports/{context} HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "chargeback",
    "AnalysisId": [
        101,
        224,
        460,
        662
  ]
}
Indicado para informar que um pagamento foi confirmado. Habilitado para o contexto de Payment.
POST https://stagingwalletapi.clearsale.com.br/v1/reports/{context} HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "confirmed",
    "AnalysisId": [
        101,
        224,
        460,
        662
  ]
}
Indicado para informar que o prazo para pagamento expirou. Habilitado para o contexto de Payment.
POST https://stagingwalletapi.clearsale.com.br/v1/reports/{context} HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "expired",
    "AnalysisId": [
        101,
        224,
        460,
        662
  ]
}
Request
Indicated to inform that there was chargeback. Enabled for all contexts.
POST https://walletsapi.clearsale.com.br/v1/reports/{context} HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "chargeback",
    "AnalysisId": [
        101,
        224,
        460,
        662
  ]
}
Indicated to inform that a payment has been confirmed. Enabled for the Payment context.
POST https://walletsapi.clearsale.com.br/v1/reports/{context} HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "confirmed",
    "AnalysisId": [
        101,
        224,
        460,
        662
  ]
}
Indicated to inform that the payment deadline has expired. Enabled for the Payment context.
POST https://walletsapi.clearsale.com.br/v1/reports/{context} HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "expired",
    "AnalysisId": [
        101,
        224,
        460,
        662
  ]
}
Indicated to inform that there was chargeback. Enabled for all contexts.
POST https://stagingwalletapi.clearsale.com.br/v1/reports/{context} HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "chargeback",
    "AnalysisId": [
        101,
        224,
        460,
        662
  ]
}
Indicated to inform that a payment has been confirmed. Enabled for the Payment context.
POST https://stagingwalletapi.clearsale.com.br/v1/reports/{context} HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "confirmed",
    "AnalysisId": [
        101,
        224,
        460,
        662
  ]
}
Indicated to inform that the payment deadline has expired. Enabled for the Payment context.
POST https://stagingwalletapi.clearsale.com.br/v1/reports/{context} HTTP/1.1
Content-Type: application/json
Accept:application/json
Authorization: Bearer {Token}
{
    "Type": "expired",
    "AnalysisId": [
        101,
        224,
        460,
        662
  ]
}
Resposta
HTTP/1.1 200 Ok
Content-Type: application/json; charset=utf-8
{
    "Orders": [
        {
            "Code": "{context}-101",
            "Status": "not found"
        },
        {
            "Code": "{context}-224",
            "Status": "done"
        },
        {
            "Code": "{context}-460",
            "Status": "done"
        },
        {
            "Code": "{context}-662",
            "Status": "not found"
        }
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden
Response
HTTP/1.1 200 Ok
Content-Type: application/json; charset=utf-8
{
    "Orders": [
        {
            "Code": "{context}-101",
            "Status": "not found"
        },
        {
            "Code": "{context}-224",
            "Status": "done"
        },
        {
            "Code": "{context}-460",
            "Status": "done"
        },
        {
            "Code": "{context}-662",
            "Status": "not found"
        }
    ]
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "automatically generate id.",
    "errors": {
        "ExampleProperty": [
            "error description."
        ],
    }
}
HTTP/1.1 401 Unauthorized  
HTTP/1.1 403 Forbidden

Dicionário de variáveis


Transaction

Nome Descrição Tipo Tamanho Obrigatório
AnalysisId Identificador gerado pelo ClearSale para rastrear uma transação Int - Sim
Type Descrição do tipo de evento
[chargeback, confirmed,expired]
String - Sim
Context Identificador de Contexto
[accounts, banks, cards, cashin, payments, pix, transfers, withdraw]
String - Sim

Variable Dictionary


Transaction

Name Description Type Size Required
AnalysisId Identifier created by ClearSale to fetch a transaction Int - Yes
Type Description of the event type
[chargeback, confirmed,expired]
String - Yes
Context Context identifier
[accounts, banks, cards, cashin, payments, pix, transfers, withdraw]
String - Yes