App Store Server API Golang Client
The Golang server library for the App Store Server API and App Store Server Notifications.
The App Store Server API is a REST API that you call from your server to request and provide information about your customers' in-app purchases.
The App Store Server API is independent of the app’s installation status on the customers’ devices. The App Store server returns information based on a customer’s in-app purchase history regardless of whether the customer installs, removes, or reinstalls the app on their devices.
go get github.com/richzw/appstoreLog in to App Store Connect and complete the following steps:
- Select Users and Access, and then select the Keys tab.
- Select In-App Purchase under the Key Type.
- Click Generate API Key or the Add (+) button.
- Enter a name for the key. The name is for your reference only and isn’t part of the key itself. Click Generate.
- Click Download API Key next to the new API key. And store your private key in a secure place.
…GetTransactionInfo API, and then check the transactionId in the response matches the one you are looking for.4040010, indicating a TransactionIdNotFoundError, make a call to the endpoint using the sandbox URL.…………import (
"github.com/richzw/appstore"
"github.com/golang-jwt/jwt/v4"
)
func main() {
c := &appstore.StoreConfig{
KeyContent: []byte(ACCOUNTPRIVATEKEY),
KeyID: "FAKEKEYID",
BundleID: "fake.bundle.id",
Issuer: "xxxxx-xx-xx-xx-xxxxxxxxxx",
Sandbox: false,
}
tokenStr := "JWSTransactionDecodedPayload Encode String"
a := appstore.NewStoreClient(c)
jws, err := a.ParseNotificationV2WithClaim(tokenStr)
// access the fields of JWSTransactionDecodedPayload from jws directly
}…App Store Server API 1.19+
appstore is licensed under the MIT.
No open issues yet, or sync has not completed.