Unable to extend subscriptions via API

Good morning, we have a backend making calls to the subscriptions API to check the status of users subscriptions. Now, besides the check we need sometimes to extend subscriptions, using the api:

https://api.storekit.itunes.apple.com/inApps/v1/subscriptions/extend/{originalTransactionId}

To call this api we need a signed JWT Token and the originalTransactionId. Now, calling the api with the concrete parameters we receive always error response like this:

StatusCode: 404, ReasonPhrase: 'Not Found', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers: { Date: Wed, 17 May 2023 14:48:36 GMT Server: Apache Strict-Transport-Security: max-age=31536000 X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block Content-Security-Policy: default-src 'self' *.apple.com; X-Content-Type-Options: nosniff Content-Length: 196 Content-Type: text/html; charset=iso-8859-1 }; content is <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL was not found on this server.</p> </body></html>

Consider that the originalTransactionId is taken from the response of a previous verifyReceipt API, and the error does not seem related to the authentication (so I tend to exclude issues with the signed token)

What could be the problem? What is the right way to extend a subscription via API call?

Thank you.

Replies

Please raise this via http://feedbackassistant.apple.com and add the curl request and full response in the ticket and let us know the ID. Thank you.

Here is the ID: FB12198154 (Unable to extend subscriptions via API)

Thank you

  • I've added a new request/response (failed again) on the same ticket.

Add a Comment

Regarding the error on calling the extension API the issue was on the way I built the signed token. It has been fixed and now the Api call works as expected. Thank you.