Recarga para Jogos



Fluxo da recarga



  1. Para efetuar a recarga de créditos para um jogo é necessário que o cliente selecione e escolha o plano/valor.

  2. Após a confirmação da recarga para um jogo, retornamos o código PIN ao cliente.

  3. Com o código PIN em mãos, o cliente acessa o site/app do provedor e resgata os créditos obtidos.


Provedores disponíveis


  • Blizzard;
  • GG Credits Free Fire;
  • HABBO;
  • League of Legends;
  • PS Plus;
  • PSN Store;
  • Rixty;
  • STEAM;
  • Xbox Live;
  • Xbox Live (CSV).

Atenção

Os valores oferecidos para a recarga não são flexíveis e variam de acordo com a operadora.



Ações a serem executadas para recarga de Jogos



1) Listar todos os provedores de Jogos
GET https://sandbox-api.openbank.stone.com.br/api/v1/topups/games/providers
Header request
{
    "authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI4d3NUd3BhYTRJWUZIYWV5ZFRubnRoRC1UaVlCaU9kanNmOGx6RUlMR1hVIn0.eyJqdGkiOiJiODQ0NDc4OS01ODE5LTQ4MTUtYjc1NC04MDU5NmMyYTg4MGYiLCJleHAiOjE2MTY2OTk5MjQsIm5iZiI6MCwiaWF0IjoxNjE2Njk5MDI0LCJpc3MiOiJodHRwczovL3NhbmRib3gtYWNjb3VudHMub3BlbmJhbmsuc3RvbmUuY29tLmJyL2F1dGgvcmVhbG1zL3N0b25lX2JhbmsiLCJzdWIiOiJhYzE5MGRmYy00YTBjLTQ5ODUtYmQwNi03NWE5Zjc3NjU0MTMiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiIwNjVlY2IwOC0yNDM5LTQwYzAtOGUxMy0yYjQzYzIxNzQzZTMiLCJhdXRoX3RpbWUiOjAsInNlc3Npb25fc3RhdGUiOiIwMjhlMjY3ZS0zMjYwLTQzNDMtODQ2ZS1hOTRkNzlmZTFjYWEiLCJhY3IiOiIxIiwic2NvcGUiOiJwYXltZW50YWNjb3VudDpwYXltZW50bGlua3M6d3JpdGUgcGF5bWVudGFjY291bnQ6Y29udGFjdDp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x-stone-idempotency-key": "0001"
}
  • x-stone-idempotency-key é opcional, para mais informações consulte o Overview.
Response
200 ok
{
    "providers": [
        {
            "name": "GG Credits Free Fire",
            "id": 2151
        },
        {
            "name": "LEVEL UP",
            "id": 2096
        },
        {
            "name": "PSN Store",
            "id": 2147
        },
        {
            "name": "PS Plus",
            "id": 2148
        },
        {
            "name": "Xbox Live Gold",
            "id": 2125
        },
        {
            "name": "Xbox Live (CSV)",
            "id": 2149
        }
    ]
}
Possíveis casos de erro ao listar provedores
401 - Unauthorized

Caso o cliente não tenha realizado a autenticação.

{
    "type": "srn:error:unauthenticated"
}
403 - Forbidden

Caso o cliente não tenha permissão para listar os provedores.

{
  "type": "srn:error:forbidden"
}

2) Listar todos os valores para o provedor
GET https://sandbox-api.openbank.stone.com.br/api/v1/topups/games/values/{provider-id}
Header request
{
    "authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI4d3NUd3BhYTRJWUZIYWV5ZFRubnRoRC1UaVlCaU9kanNmOGx6RUlMR1hVIn0.eyJqdGkiOiJiODQ0NDc4OS01ODE5LTQ4MTUtYjc1NC04MDU5NmMyYTg4MGYiLCJleHAiOjE2MTY2OTk5MjQsIm5iZiI6MCwiaWF0IjoxNjE2Njk5MDI0LCJpc3MiOiJodHRwczovL3NhbmRib3gtYWNjb3VudHMub3BlbmJhbmsuc3RvbmUuY29tLmJyL2F1dGgvcmVhbG1zL3N0b25lX2JhbmsiLCJzdWIiOiJhYzE5MGRmYy00YTBjLTQ5ODUtYmQwNi03NWE5Zjc3NjU0MTMiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiIwNjVlY2IwOC0yNDM5LTQwYzAtOGUxMy0yYjQzYzIxNzQzZTMiLCJhdXRoX3RpbWUiOjAsInNlc3Npb25fc3RhdGUiOiIwMjhlMjY3ZS0zMjYwLTQzNDMtODQ2ZS1hOTRkNzlmZTFjYWEiLCJhY3IiOiIxIiwic2NvcGUiOiJwYXltZ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01Jf5hxMYq1oSobOL3-RuGWJLoPOXkJyAbOm5hS15QgSuwp_qOU8VAEa3Yg",
    "x-stone-idempotency-key": "0001"
}
  • x-stone-idempotency-key é opcional, para mais informações consulte o Overview.
Responses
200 ok

- Name: GG Credits Free Fire / id: 2151

{
    "product": [
        {
            "value": 3000
        },
        {
            "value": 5000
        },
        {
            "value": 15000
        }
    ]
}

- Name: LEVEL UP / id: 2096

{
    "product": [
        {
            "product_name": "LEVELUP 20",
            "value": 2000
        },
        {
            "product_name": "LEVELUP 40",
            "value": 4000
        }
    ]
}
Possíveis casos de erro ao listar valores para o provedor
400 - Bad Request

Caso o cliente tenha passado letras no lugar dos números no id do provedor, por exemplo.

{
  "type": "srn:error:invalid_params"
}
401 - Unauthorized

Caso o cliente não tenha realizado a autenticação.

{
    "type": "srn:error:unauthenticated"
}
403 - Forbidden

Caso o cliente não tenha permissão para listar os valores para o provedor.

{
  "type": "srn:error:forbidden"
}

3) Simular uma recarga de Jogos
POST https://sandbox-api.openbank.stone.com.br/api/v1/topups/games/dry-run
Header request
{
    "authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI4d3NUd3BhYTRJWUZIYWV5ZFRubnRoRC1UaVlCaU9kanNmOGx6RUlMR1hVIn0.eyJqdGkiOiJiODQ0NDc4OS01ODE5LTQ4MTUtYjc1NC04MDU5NmMyYTg4MGYiLCJleHAiOjE2MTY2OTk5MjQsIm5iZiI6MCwiaWF0IjoxNjE2Njk5MDI0LCJpc3MiOiJodHRwczovL3NhbmRib3gtYWNjb3VudHMub3BlbmJhbmsuc3RvbmUuY29tLmJyL2F1dGgvcmVhbG1zL3N0b25lX2JhbmsiLCJzdWIiOiJhYzE5MGRmYy00YTBjLTQ5ODUtYmQwNi03NWE5Zjc3NjU0MTMiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiIwNjVlY2IwOC0yNDM5LTQwYzAtOGUxMy0yYjQzYzIxNzQzZTMiLCJhdXRo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dWEwbJ2uevV3V_Q-RL3me8vykNTWGiT-dmyWvFN-XAq889_F1ZQskHsLz-ZtlrFw3XjitnLvEJbg9iyxVA7AuwnexBIQS4gU9QwMXcJjij9JowYbLu4ANUITXU01Jf5hxMYq1oSobOL3-RuGWJLoPOXkJyAbOm5hS15QgSuwp_qOU8VAEa3Yg",
    "x-stone-idempotency-key": "0001"
}
  • x-stone-idempotency-key é opcional, para mais informações consulte o Overview.
Body Request
{
  "account_id": "e4043bb5-542b-46f6-bcbc-0e63d37e1c47",
  "amount": 500,
  "provider_id": "2149"
}
Response
202 Accepted
{
    "amount": 500,
    "account_id": "e4043bb5-542b-46f6-bcbc-0e63d37e1c47",
    "provider_id": "2149"
}
Possíveis casos de erro ao simular recarga
400 - Bad Request

Caso o cliente tenha passado um valor inválido:

{
   "type": "srn:error:invalid_amount",
   "title": "Given amount is less than or equal to zero"
}

Caso o cliente não tenha saldo suficiente para realizar a transação:

{
    "type": "srn:error:not_enough_funds"
}

Caso o cliente tenha passado letras no lugar dos números no valor da recarga, por exemplo.

{
  "type": "srn:error:invalid_params"
}
403 - Forbidden

Caso o cliente não tenha permissão para realizar a simulação de recarga.

{
  "type": "srn:error:forbidden"
}

4) Executar uma recarga de Jogos
POST https://sandbox-api.openbank.stone.com.br/api/v1/topups/games
Header request
{
    "authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI4d3NUd3BhYTRJWUZIYWV5ZFRubnRoRC1UaVlCaU9kanNmOGx6RUlMR1hVIn0.eyJqdGkiOiJiODQ0NDc4OS01ODE5LTQ4MTUtYjc1NC04MDU5NmMyYTg4MGYiLCJleHAiOjE2MTY2OTk5MjQsIm5iZiI6MCwiaWF0IjoxNjE2Njk5MDI0LCJpc3MiOiJodHRwczovL3NhbmRib3gtYWNjb3VudHMub3BlbmJhbmsuc3RvbmUuY29tLmJyL2F1dGgvcmVhbG1zL3N0b25lX2JhbmsiLCJzdWIiOiJhYzE5MGRmYy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hwR92EogMNRIWUej4z-P-p3UaStYlaYd5Bfx4hl7da4ly62K1LEBI7LOqCFkbHMlnJfglp3dFS2M3iHZ571BNSmCff3wUiFy6zoHxFaKEUPy0V8e6mCQwFuapdIvDocA4Z4xYh049dWEwbJ2uevV3V_Q-RL3me8vykNTWGiT-dmyWvFN-XAq889_F1ZQskHsLz-ZtlrFw3XjitnLvEJbg9iyxVA7AuwnexBIQS4gU9QwMXcJjij9JowYbLu4ANUITXU01Jf5hxMYq1oSobOL3-RuGWJLoPOXkJyAbOm5hS15QgSuwp_qOU8VAEa3Yg",
    "x-stone-idempotency-key": "0001",
    "x-stone-challenge-solution": "81080d67-aac9-415b-868f-4403243201d3"
}
  • x-stone-idempotency-key é opcional, para mais informações consulte o Overview.
  • x-stone-challenge-solution é obrigatório,clique aqui para ter acesso ao fluxo de autorização do challenge
Body Request
{
  "account_id": "e4043bb5-542b-46f6-bcbc-0e63d37e1c47",
  "amount": 500,
  "provider_id": "2149"
}
Response
200 ok
{
    "id": "eee1466a-458a-4afa-87ec-6a52fc3ff331",
    "receipt": "          PROTOCOLO 0002751870\n1          06/04/2021        14:42\nTERM 228005 AGENTE 228005 AUTE 04926\n----------------------------------------\nAUTO 978079                            \n<VIA1>\nESTE CUPOM NAO TEM VALOR FISCAL\nPRODUTO: XBOX LIVE (CSV)\nVALOR: R$  5,00\nPIN: 6365-4427-6400-1327\nSERIE: 00000000\n\nCOMO RESGATAR O CODIGO XBOX:\nVISITE XBOX.COM/REDEEMCODE\nDIGITE O CODIGO DESTE RECIBO E COMECE A \nUSAR!\n\nAPOS O USO, INUTILIZE ESTE CUPOM\nIS2B - INTEGRATED SOLUTIONS TO BUSINESS\n\n\n\n\n</VIA1>----------------------------------------\n\n",
    "transaction_id": "58a3e84d-c33c-4681-bd41-855c56f27eb9",
    "pin": "6365-4427-6400-1327"
}
Possíveis casos de erro ao realizar recarga
400 - Bad Request

Caso o cliente tenha passado um valor inválido:

{
  "type": "srn:error:invalid_amount",
  "title": "Given amount is less than or equal to zero"
}

Caso o cliente não tenha saldo suficiente para realizar a transação:

{
  "type": "srn:error:not_enough_funds"
}

Caso o cliente tenha passado letras no lugar dos números no valor da recarga, por exemplo.

{
  "type": "srn:error:invalid_params"
}
403 - Forbidden

Caso o cliente não tenha permissão para realizar a recarga.

{
  "type": "srn:error:forbidden"
}



Última modificação: 06.04.2021