Liberar Version Code
Cadastre o range de version codes do seu aplicativo Android para evitar erros de atestação na integração com a SDK Zoop.
Cadastre o range de version codes (Android Play Integrity) do seu aplicativo para evitar erros de atestação na integração com a SDK Zoop.
Sem o cadastro do range de version codes, pode ocorrer erro de atestação na integração com a SDK. Realize esse passo antes de iniciar os testes.
Pré-requisitos
- Obtenha suas credenciais CSO (Client ID e Client Secret). Entre em contato com o suporte Zoop caso ainda não possua.
- Identifique o packageName do seu aplicativo (ex:
com.zoop.sdk.taponphone.sample). - Instale o Postman ou Insomnia para realizar as chamadas à API.
Configurar o token de acesso
A API utiliza autenticação OAuth 2.0 (Client Credentials). Configure o token no Postman seguindo os passos abaixo:
- Acesse a aba Authorization e selecione o Auth Type como OAuth 2.0.
- Em Configure New Token, preencha os campos:
| Campo | Valor |
|---|---|
| Grant Type | Client Credentials |
| Access Token URL | https://login.microsoftonline.com/common/oauth2/v2.0/token |
| Client ID | Seu Client ID (credencial CSO) |
| Client Secret | Seu Client Secret (credencial CSO) |
| Scope | https://mpplivece.onmicrosoft.com/625f88e3-3b1c-4209-a160-e06c1b7d0718/.default |
| Client Authentication | Send client credentials in body |
- Clique em Get New Access Token.
- Após gerar o token, clique em Use Token para aplicá-lo às requisições.
Com o token configurado, você pode utilizar todos os endpoints descritos abaixo.
Endpoints da API
Base URL: https://api-na1.mypinpad.io
GET — Listar version codes cadastrados
Retorna os version codes atualmente aceitos no Android Play Integrity para o seu aplicativo.
GET /risk/policies/package/{packageName}/versions
Path Parameters
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
packageName | string | Sim | Package name do seu aplicativo (ex: com.zoop.sdk.taponphone.sample) |
Exemplo de resposta (200 OK):
{
"versionCodes": [1, 2, 3, 4, 5]
}Códigos de resposta:
| Código | Descrição |
|---|---|
200 | OK — Version codes retornados |
400 | Bad Request — Requisição inválida |
404 | Not Found — Package não encontrado |
412 | Precondition Failed — Version codes presentes em múltiplas políticas |
PUT — Inserir/Atualizar range de version codes
Insere ou atualiza o range completo de version codes aceitos para o seu aplicativo.
Defina um range maior que o version code atual do seu aplicativo para cobrir futuras atualizações. Por exemplo, se o version code atual é
1, cadastre um range de1a50. Não há limite de range — escolha o que fizer sentido para o seu ciclo de releases.
PUT /risk/policies/package/{packageName}/versions
Path Parameters
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
packageName | string | Sim | Package name do seu aplicativo |
Request Body (raw / JSON)
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
versionCodes | integer[] | nullable | Sim | Array com os version codes a serem aceitos |
Exemplo de body:
{
"versionCodes": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
}Códigos de resposta:
| Código | Descrição |
|---|---|
204 | No Content — Version codes atualizados |
400 | Bad Request — Requisição inválida |
404 | Not Found — Package não encontrado |
412 | Precondition Failed — Version codes presentes em múltiplas políticas |
PUT — Inserir um único version code
Adiciona um único version code à lista de aceitos para o seu aplicativo.
PUT /risk/policies/package/{packageName}/version/{version}
Path Parameters
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
packageName | string | Sim | Package name do seu aplicativo |
version | integer (int64) | Sim | Version code a ser adicionado |
Códigos de resposta:
| Código | Descrição |
|---|---|
204 | No Content — Version code adicionado |
400 | Bad Request — Requisição inválida |
404 | Not Found — Package não encontrado |
412 | Precondition Failed — Version codes presentes em múltiplas políticas |
DELETE — Remover um version code
Remove um version code específico da lista de aceitos para o seu aplicativo.
DELETE /risk/policies/package/{packageName}/version/{version}
Path Parameters
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
packageName | string | Sim | Package name do seu aplicativo |
version | integer (int64) | Sim | Version code a ser removido |
Códigos de resposta:
| Código | Descrição |
|---|---|
204 | No Content — Version code removido |
400 | Bad Request — Requisição inválida |
404 | Not Found — Package não encontrado |
412 | Precondition Failed — Version codes presentes em múltiplas políticas |
Collection de exemplo (Postman)
Disponibilizamos uma collection Postman com parâmetros pré-configurados. Basta inserir suas credenciais CSO nos campos Client ID e Client Secret.
Ver collection JSON completa
Copie o JSON abaixo e importe no Postman em File → Import → Raw Text:
{
"info": {
"_postman_id": "",
"name": "Version Codes API Production",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": ""
},
"item": [
{
"name": "Sample",
"item": [
{
"name": "Get Play integrity Version Code",
"request": {
"auth": {
"type": "oauth2",
"oauth2": [
{ "key": "clientSecret", "value": "", "type": "string" },
{ "key": "clientId", "value": "", "type": "string" },
{ "key": "scope", "value": "https://mpplivece.onmicrosoft.com/625f88e3-3b1c-4209-a160-e06c1b7d0718/.default", "type": "string" },
{ "key": "accessTokenUrl", "value": "https://login.microsoftonline.com/common/oauth2/v2.0/token", "type": "string" },
{ "key": "client_authentication", "value": "body", "type": "string" },
{ "key": "grant_type", "value": "client_credentials", "type": "string" },
{ "key": "authUrl", "value": "", "type": "string" },
{ "key": "addTokenTo", "value": "header", "type": "string" }
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://api-na1.mypinpad.io/risk/policies/package/com.zoop.demo.taponphone/versions",
"protocol": "https",
"host": ["api-na1", "mypinpad", "io"],
"path": ["risk", "policies", "package", "com.zoop.demo.taponphone", "versions"]
}
},
"response": []
},
{
"name": "Update Play integrity Version Code",
"request": {
"auth": {
"type": "oauth2",
"oauth2": [
{ "key": "client_authentication", "value": "body", "type": "string" },
{ "key": "clientSecret", "value": "", "type": "string" },
{ "key": "clientId", "value": "", "type": "string" },
{ "key": "grant_type", "value": "client_credentials", "type": "string" },
{ "key": "scope", "value": "https://mpplivece.onmicrosoft.com/625f88e3-3b1c-4209-a160-e06c1b7d0718/.default", "type": "string" },
{ "key": "accessTokenUrl", "value": "https://login.microsoftonline.com/common/oauth2/v2.0/token", "type": "string" },
{ "key": "authUrl", "value": "", "type": "string" },
{ "key": "addTokenTo", "value": "header", "type": "string" }
]
},
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"versionCodes\": [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50]\n}",
"options": { "raw": { "language": "json" } }
},
"url": {
"raw": "https://api-na1.mypinpad.io/risk/policies/package/com.zoop.demo.taponphone/versions",
"protocol": "https",
"host": ["api-na1", "mypinpad", "io"],
"path": ["risk", "policies", "package", "com.zoop.demo.taponphone", "versions"]
}
},
"response": []
},
{
"name": "Update Play integrity Version Code (SINGLE)",
"request": {
"auth": {
"type": "oauth2",
"oauth2": [
{ "key": "clientSecret", "value": "", "type": "string" },
{ "key": "clientId", "value": "", "type": "string" },
{ "key": "client_authentication", "value": "body", "type": "string" },
{ "key": "grant_type", "value": "client_credentials", "type": "string" },
{ "key": "scope", "value": "https://mpplivece.onmicrosoft.com/625f88e3-3b1c-4209-a160-e06c1b7d0718/.default", "type": "string" },
{ "key": "accessTokenUrl", "value": "https://login.microsoftonline.com/common/oauth2/v2.0/token", "type": "string" },
{ "key": "authUrl", "value": "", "type": "string" },
{ "key": "addTokenTo", "value": "header", "type": "string" }
]
},
"method": "PUT",
"header": [],
"url": {
"raw": "https://api-na1.mypinpad.io/risk/policies/package/com.zoop.demo.taponphone/version/102",
"protocol": "https",
"host": ["api-na1", "mypinpad", "io"],
"path": ["risk", "policies", "package", "com.zoop.demo.taponphone", "version", "102"]
}
},
"response": []
},
{
"name": "Delete Play integrity Version Code (SINGLE)",
"request": {
"auth": {
"type": "oauth2",
"oauth2": [
{ "key": "client_authentication", "value": "body", "type": "string" },
{ "key": "clientSecret", "value": "", "type": "string" },
{ "key": "clientId", "value": "", "type": "string" },
{ "key": "grant_type", "value": "client_credentials", "type": "string" },
{ "key": "scope", "value": "https://mpplivece.onmicrosoft.com/625f88e3-3b1c-4209-a160-e06c1b7d0718/.default", "type": "string" },
{ "key": "accessTokenUrl", "value": "https://login.microsoftonline.com/common/oauth2/v2.0/token", "type": "string" },
{ "key": "authUrl", "value": "", "type": "string" },
{ "key": "addTokenTo", "value": "header", "type": "string" }
]
},
"method": "DELETE",
"header": [],
"url": {
"raw": "https://api-na1.mypinpad.io/risk/policies/package/com.zoop.demo.taponphone/version/102",
"protocol": "https",
"host": ["api-na1", "mypinpad", "io"],
"path": ["risk", "policies", "package", "com.zoop.demo.taponphone", "version", "102"]
}
},
"response": []
}
],
"auth": {
"type": "oauth2",
"oauth2": [
{ "key": "clientSecret", "value": "", "type": "string" },
{ "key": "tokenName", "value": "Sample", "type": "string" },
{ "key": "clientId", "value": "", "type": "string" },
{ "key": "scope", "value": "https://mpplivece.onmicrosoft.com/625f88e3-3b1c-4209-a160-e06c1b7d0718/.default", "type": "string" },
{ "key": "accessTokenUrl", "value": "https://login.microsoftonline.com/common/oauth2/v2.0/token", "type": "string" },
{ "key": "grant_type", "value": "client_credentials", "type": "string" },
{ "key": "client_authentication", "value": "body", "type": "string" },
{ "key": "addTokenTo", "value": "header", "type": "string" }
]
}
}
]
}Updated about 2 hours ago
