Pre-redeem
Pre-redeem flow
sequenceDiagram
actor Customer
participant Partner
participant PINHype as PIN Hype
Customer->>+Partner: Choose the products and make de payment
Partner->>+PINHype: Submit productId choosed and partnerReference <br />POST /pre-redeem
PINHype->>-Partner: Returns redeem page url
Partner->>-Customer: Redirect the customer to the redeem page url
Customer->>+PINHype: Access our redeem page and fill required fields to redeem product
PINHype->>-Customer: Delivery the product
note
Just call the /pre-redeem endpoint after payment confirmation
How to make a request?
Pre-redeem schema
The below fields are mandatory in your request.
Field | Description |
---|---|
productId | You can get the productId using the /catalog endpoints. |
partnerReference | Purchase order number created by the partner. This number is what identifies this purchase and must be unique per partner. |
Send you pre-redeem request
Below you can find an example of the request
POST /pre-redeem
curl --location --request POST 'https://stock.hype.games/api/pre-redeem' \
--header 'Authorization: Bearer ACCESS-TOKEN-HERE' \
--header 'Content-Type: application/json' \
--data-raw '{
"productId": 12,
"partnerReference": "123456"
}'
* The customer object is optional, if you do not send this information, we ask the customer at the time of redeem on our page.
Response example
Now you just need to redirect customer to the redirectLink
returned
{
"status": "delivered",
"transaction": {
"transactionId": 100000025,
"key": "AAA-BBB-CCC",
"redirectLink": "https://redeem.hype.games/AAA-BBB-CCC",
"partnerReference": "123465"
}
}
Here you can find one example of the content of the redirection page.
On this page the customer will finalize the product redeem