Skip to main content

PIN Hype API (1.1.0)

Introduction

This is an API that aims to integrate partners who want to offer our product catalog quickly and practically.

What is Pin Hype?

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

How to Authenticate?

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/

Test Environment

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.

Rate Limit

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.

Mobile apps

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.

Auth

Auth

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

Content type
application/json
{
  • "identifier": "string",
  • "secret": "string"
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "accessToken": "aaAA.bbBB.ccCC",
  • "refreshToken": "abc123def456"
}

Response samples

Content type
application/json
{
  • "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
}

Catalog

Catalog

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

Content type
application/json
[
  • {
    }
]

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

Content type
application/json
[
  • {
    }
]

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

Content type
application/json
[
  • {
    }
]

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

Content type
application/json
{
  • "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": [
    ]
}

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

Content type
application/json
{
  • "hasStock": true,
  • "amount": -1
}

Pre-redeem

Pre-redeem

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

Content type
application/json
{
  • "productId": 1,
  • "partnerReference": "100000121",
  • "countryCode": "BR",
  • "currencyCode": "BRL",
  • "customer": {
    }
}

Response samples

Content type
application/json
{}

Reversal

Cancel redeem

Reversal by TransactionId

Reversal by TransactionId

Authorizations:
Request Body schema: application/json

Reversal

transactionId
required
number <int32>

Our transaction Id

Responses

Request samples

Content type
application/json
{
  • "transactionId": 1000035
}

Response samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "message": "Successful cancellation",
  • "status": "Canceled in stock",
  • "transactionId": 1000035
}

Report

Report

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

Content type
application/json
[
  • {
    }
]

Returns sales information for a specific transaction (Our transaction Id)

Authorizations:
path Parameters
transactionId
required
integer

Our transaction Id

Responses

Response samples

Content type
application/json
{
  • "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

Content type
application/json
[
  • {
    }
]

Returns sales information by searching for buyer document number

Authorizations:
path Parameters
documentNumber
required
string

Buyer's document number (no mask)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Echo

Echo

Request to check if application is online

Responses