PIN Hype API (1.1.0)
This is an API that aims to integrate partners who want to offer our product catalog quickly and practically.
Pin Hype is a credit or game key redeem platform development by Level Up! Interactive, the leading game publisher in Latin America since 2004.
Customer page to redeem a Pin Hype https://redeem.hype.games
The authentication data (identifier
and secret
) is shared at the beginning of the developed by email, request the authentication data by email partner.hype@levelup.com.br
For token authentication we use JSON (JSON Web Tokens) https://jwt.io/introduction/
The test and production environment have the same URL, what differs from a test request is the credentials (Identifier and Secret), our commercial team will send two credentials, one for testing and one for production.
All endpoints have a rate limit. It is possible to make up to 50 requests per second. Any requests made above this limit will receive an error (503 - Service Unavailable). Failing requests can be made again after the period of 1 second. The limit is shared between all endpoints.
If you are integrating our service in a mobile application, it's a good idea to be able to change product availability on each platform separatelly. We understand Terms change over time and understand the Terms from Google Play or App Store may differ in needs. Separating the platforms in your system is a good way to make sure your products will always be available.
Request to get Authorization Token
This endpoint is to get the token, the token is a mandatory header parameter in the api's main endpoints. The parameters sent from the request body (identifier
and secret
) are email information at the beginning of development.
Request Body schema: application/json
identifier required | string |
secret required | string |
Responses
Request samples
- Payload
{- "identifier": "string",
- "secret": "string"
}
Response samples
- 200
- 400
{- "accessToken": "aaAA.bbBB.ccCC",
- "refreshToken": "abc123def456",
- "createdAt": "2022-09-21T12:44:51.7706398-03:00",
- "expiredAt": "2022-09-22T12:44:51.7706398-03:00",
- "isAuthenticated": true
}
Request to refresh Authorization Token
This endpoint is a good practice to avoid constant sending of sensitive data (identifier
and secret
). To get a new token just send the previous token and refresh token endpointed in POST Auth endopint
Request Body schema: application/json
accessToken required | string |
refreshToken required | string |
Responses
Request samples
- Payload
{- "accessToken": "aaAA.bbBB.ccCC",
- "refreshToken": "abc123def456"
}
Response samples
- 200
- 400
{- "accessToken": "aaAA.bbBB.ccCC",
- "refreshToken": "abc123def456",
- "createdAt": "2022-09-21T12:44:51.7706398-03:00",
- "expiredAt": "2022-09-22T12:44:51.7706398-03:00",
- "isAuthenticated": true
}
Returns available collections and products
Returns all product catalogs available to Partner, products are grouped by product collections in a hierarchical structure (such as a tree)
Authorizations:
query Parameters
country | string Default: "BR" Send the code of country like ISO 3166 |
currency | string Default: "BRL" Send the code of currency like ISO 4217 |
language | string Default: "pt-BR" Send the code of language like ISO ISO 639-1 |
Responses
Response samples
- 200
- 400
[- {
- "id": 3,
- "name": "Jogos Steam para PC",
- "termsAndConditions": "Após a visualização da chave no Hype, não há como realizar...",
- "howToRedeem": "Para adquirir seu jogo é muito fácil! \\r\\nApós concluir a compra deste produto...",
- "collections": [
- { }
], - "products": [
- {
- "id": 0,
- "name": "Grand Theft Auto V",
- "salesPrice": 66.49,
- "originalPrice": 69.99,
- "discountPercent": 5,
- "partnerCostPrice": 63.69,
- "countryCode": "BR",
- "salesCurrencyCode": "BRL",
- "salesCurrencySymbol": "R$",
- "tags": [
- {
- "id": 0,
- "name": "string"
}
]
}
], - "tags": [
- {
- "id": 0,
- "name": "string"
}
]
}
]
Returns available collections by partner
Returns only the product collection but without related products by partner.
Authorizations:
query Parameters
country | string Default: "BR" Send the code of country like ISO 3166 |
currency | string Default: "BRL" Send the code of currency like ISO 4217 |
language | string Default: "pt-BR" Send the code of language like ISO ISO 639-1 |
Responses
Response samples
- 200
- 400
[- {
- "id": 3,
- "name": "Jogos Steam para PC",
- "termsAndConditions": "Após a visualização da chave no Hype, não há como realizar...",
- "howToRedeem": "Para adquirir seu jogo é muito fácil! \\r\\nApós concluir a compra deste produto...",
- "collections": [
- { }
], - "products": [
- {
- "id": 0,
- "name": "Grand Theft Auto V",
- "salesPrice": 66.49,
- "originalPrice": 69.99,
- "discountPercent": 5,
- "partnerCostPrice": 63.69,
- "countryCode": "BR",
- "salesCurrencyCode": "BRL",
- "salesCurrencySymbol": "R$",
- "tags": [
- {
- "id": 0,
- "name": "string"
}
]
}
], - "tags": [
- {
- "id": 0,
- "name": "string"
}
]
}
]
Returns available products by partner from a specific collection
Returns a list of products from a specific collection. The collectionId
parameter represents the product collection id
Authorizations:
path Parameters
collectionId required | integer |
query Parameters
country | string Default: "BR" Send the code of country like ISO 3166 |
currency | string Default: "BRL" Send the code of currency like ISO 4217 |
language | string Default: "pt-BR" Send the code of language like ISO ISO 639-1 |
Responses
Response samples
- 200
- 400
[- {
- "id": 3,
- "name": "Jogos Steam para PC",
- "termsAndConditions": "Após a visualização da chave no Hype, não há como realizar...",
- "howToRedeem": "Para adquirir seu jogo é muito fácil! \\r\\nApós concluir a compra deste produto...",
- "collections": [
- { }
], - "products": [
- {
- "id": 0,
- "name": "Grand Theft Auto V",
- "salesPrice": 66.49,
- "originalPrice": 69.99,
- "discountPercent": 5,
- "partnerCostPrice": 63.69,
- "countryCode": "BR",
- "salesCurrencyCode": "BRL",
- "salesCurrencySymbol": "R$",
- "tags": [
- {
- "id": 0,
- "name": "string"
}
]
}
], - "tags": [
- {
- "id": 0,
- "name": "string"
}
]
}
]
Returns available info product
Return all data from a single product and with information from which collection it belongs
Authorizations:
path Parameters
productId required | integer |
query Parameters
country | string Default: "BR" Send the code of country like ISO 3166 |
currency | string Default: "BRL" Send the code of currency like ISO 4217 |
language | string Default: "pt-BR" Send the code of language like ISO ISO 639-1 |
Responses
Response samples
- 200
- 400
{- "id": 0,
- "name": "Grand Theft Auto V",
- "description": "Grand Theft Auto V para PC oferece aos jogadores a opção de explorar o gigantesco e premiado mundo ...",
- "salesPrice": 66.49,
- "originalPrice": 69.99,
- "discountPercent": 5,
- "partnerCostPrice": 63.69,
- "howToRedeem": "string",
- "termsAndConditions": "string",
- "countryCode": "BR",
- "salesCurrencyCode": "BRL",
- "salesCurrencySymbol": "R$",
- "collections": [
- {
- "id": 0,
- "name": "Jogos Steam para PC",
- "termsAndConditions": "Após a visualização da chave no Hype, não há como realizar...",
- "howToRedeem": "Para adquirir seu jogo é muito fácil! \\r\\nApós concluir a compra deste produto...",
- "collection": { }
}
]
}
Returns whether or not the product has stock
Returns a stock status of a product and the amount of the product in stock. When the product is of unlimited stock the amount value returns "-1"
Authorizations:
path Parameters
productId required | integer |
query Parameters
country | string Default: "BR" Send the code of country like ISO 3166 |
currency | string Default: "BRL" Send the code of currency like ISO 4217 |
language | string Default: "pt-BR" Send the code of language like ISO ISO 639-1 |
Responses
Response samples
- 200
- 400
{- "hasStock": true,
- "amount": -1
}
Book a Pin for a specific product
Book a Pin Hype for a specific product. If provided, the customer data (Document, Name and/or Birthdate) must be valid. These data will be checked in official sources.
Authorizations:
Request Body schema: application/json
Pre Redeem
productId required | number <int32> Our product Id in catalog request |
partnerReference required | string Purchase order number created by the partner. This number is what identifies this purchase and must be unique per partner. |
countryCode | string Default: "BR" Use the code of country where you gonna seller the pin hype, based on ISO 3166-1. In case of the value not send the api is set BR |
currencyCode | string Default: "BRL" Use the code of currency you gonna seller the pin hype, based on ISO 4217. In case of the value not send the api is set BRL |
object (CustomerSchema) |
Responses
Request samples
- Payload
{- "productId": 1,
- "partnerReference": "100000121",
- "countryCode": "BR",
- "currencyCode": "BRL",
- "customer": {
- "document": "123.456.789-10",
- "name": "João Silva",
- "bornAt": "1996-03-24",
- "zipCode": "04046-500",
- "streetName": "Av. Jabaquara",
- "streetNumber": "3060",
- "complement": "8º andar",
- "neighborhood": "Planalto Paulista",
- "city": "São Paulo",
- "state": "SP",
- "countryCode": "BR"
}
}
Response samples
- 200
- 400
{- "status": "delivered",
- "transaction": {
- "transactionId": 123456789,
- "key": "AAAA-BBBB-CCCC-DDDD-EEEE",
- "partnerReference": "100000121"
}
}
Reversal by TransactionId
Reversal by TransactionId
Authorizations:
Request Body schema: application/json
Reversal
transactionId required | number <int32> Our transaction Id |
Responses
Request samples
- Payload
{- "transactionId": 1000035
}
Response samples
- 200
- 400
{- "message": "Successful cancellation",
- "status": "Canceled in stock",
- "transactionId": 1000035
}
Reversal by PartnerReference
Reversal by PartnerReference
Authorizations:
path Parameters
partnerReference required | string Purchase order number created by the partner. This number is what identifies this purchase and must be unique per partner. |
Responses
Response samples
- 200
- 400
{- "message": "Successful cancellation",
- "status": "Canceled in stock",
- "transactionId": 1000035
}
Returns sales list for period not exceeding 31 days
Authorizations:
path Parameters
startDate required | string <date> Period start date (YYYY-MM-DD) ISO 8601 |
finishDate required | string <date> Period end date (YYYY-MM-DD) ISO 8601 |
query Parameters
searchIsByCreateDate | boolean <bool> Use true if you want list sales for create date, default value is false and return sales paid in period |
Responses
Response samples
- 200
- 400
[- {
- "transactionId": 0,
- "partnerReference": "string",
- "salesPrice": 69.99,
- "partnerCostPrice": 63.69,
- "productId": 0,
- "productName": "string",
- "status": "Redeemed by Client",
- "transactionDate": "string",
- "countryCode": "BR",
- "salesCurrencyCode": "BRL",
- "salesCurrencySymbol": "R$",
- "key": "string",
- "keySentToCustomer": true
}
]
Returns sales information for a specific transaction (Our transaction Id)
Authorizations:
path Parameters
transactionId required | integer Our transaction Id |
Responses
Response samples
- 200
- 400
{- "transactionId": 0,
- "partnerReference": "string",
- "salesPrice": 69.99,
- "partnerCostPrice": 63.69,
- "productId": 0,
- "productName": "string",
- "status": "Redeemed by Client",
- "transactionDate": "string",
- "countryCode": "BR",
- "salesCurrencyCode": "BRL",
- "salesCurrencySymbol": "R$",
- "key": "string",
- "keySentToCustomer": true
}
Returns sales information for a specific transaction (Your transaction Id or order number)
Authorizations:
path Parameters
partnerReferenceId required | string Your transaction Id or order number |
Responses
Response samples
- 200
- 400
[- {
- "transactionId": 0,
- "partnerReference": "string",
- "salesPrice": 69.99,
- "partnerCostPrice": 63.69,
- "productId": 0,
- "productName": "string",
- "status": "Redeemed by Client",
- "transactionDate": "string",
- "countryCode": "BR",
- "salesCurrencyCode": "BRL",
- "salesCurrencySymbol": "R$",
- "key": "string",
- "keySentToCustomer": true
}
]
Returns sales information by searching for buyer document number
Authorizations:
path Parameters
documentNumber required | string Buyer's document number (no mask) |
Responses
Response samples
- 200
- 400
[- {
- "transactionId": 0,
- "partnerReference": "string",
- "salesPrice": 69.99,
- "partnerCostPrice": 63.69,
- "productId": 0,
- "productName": "string",
- "status": "Redeemed by Client",
- "transactionDate": "string",
- "countryCode": "BR",
- "salesCurrencyCode": "BRL",
- "salesCurrencySymbol": "R$",
- "key": "string",
- "keySentToCustomer": true
}
]