You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+11-1
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,17 @@ func main() {
58
58
59
59
- Validate the receipt
60
60
- One option could be to validate the receipt with the App Store server through `GetTransactionInfo` API, and then check the `transactionId` in the response matches the one you are looking for.
61
-
61
+
- The App Store Server API differentiates between a sandbox and a production environment based on the base URL:
62
+
- Use https://api.storekit.itunes.apple.com/ for the production environment.
63
+
- Use https://api.storekit-sandbox.itunes.apple.com/ for the sandbox environment.
64
+
- If you're unsure about the environment, follow these steps:
65
+
- Initiate a call to the endpoint using the production URL. If the call is successful, the transaction identifier is associated with the production environment.
66
+
- If you encounter an error code `4040010`, indicating a `TransactionIdNotFoundError`, make a call to the endpoint using the sandbox URL.
- If you exceed a per-hour limit, the API rejects the request with an HTTP 429 response, with a RateLimitExceededError in the body. Consider the following as you integrate the API:
69
+
- If you periodically call the API, throttle your requests to avoid exceeding the per-hour limit for an endpoint.
70
+
- Manage the HTTP 429 RateLimitExceededError in your error-handling process. For example, log the failure and queue the job to process it again at a later time.
71
+
- Check the Retry-After header if you receive the HTTP 429 error. This header contains a UNIX time, in milliseconds, that informs you when you can next send a request.
62
72
- Error handling
63
73
- handler error per [apple store server api error](https://developer.apple.com/documentation/appstoreserverapi/error_codes) document
0 commit comments