Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

255
Visualizações
How to call the Google Play Void Purchases API from PHP?

I am trying to implement a call to the Google Play Voided Purchases API from our PHP server.

I understand that I should call

GET https://www.googleapis.com/androidpublisher/v2/applications/
your_package_name/purchases/voidedpurchases?access_token=your_auth_token

To have access_token I created a service account and got the private key JSON file. I saw that it's complicated to use it directly in order to get the access_token and the recommended method is to use Google Client API libraries.

However the PHP client library is in Beta stage and the sample I found is using Google_Service_Books. In the library code I saw the class AndroidPublisher/VoidedPurchase.php but I don't understand how to use it.

Can anyone provide an example for calling the void purchases API from PHP, using the client library or without it? or how to get the access_token from the service account JSON key file?


I have already read the following instructions:

  • Google instructions for the void purchases api https://developers.google.com/android-publisher/voided-purchases
  • Creating a service account https://developers.google.com/identity/protocols/OAuth2ServiceAccount
  • Google API PHP client (Beta): https://github.com/google/google-api-php-client
about 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda