RequestInfo
The metadata to include in server requests.
Declaration
object RequestInfoProperties
| Name | Type | Description |
|---|---|---|
appAccountToken | uuid | A UUID that represents an app account token, to associate with the transaction in the request. |
consistencyToken | string | The value of the advancedCommerceConsistencyToken that you receive in the JWSRenewalInfo renewal information for a subscription. Don’t generate this value. |
requestReferenceId Required | uuid | A UUID that you provide to uniquely identify each request. If the request times out, you can use the same |
Discussion
You provide the RequestInfo in your Advanced Commerce API server requests to uniquely identify your requests. You also have the option to provide additional data in the RequestInfo object.
Include the app account token, optionally
You can include an appAccountToken in RequestInfo to associate an account on your system with the purchase. The App Store returns the same appAccountToken value in the transaction information.
If you include appAccountToken in the RequestInfo, you don’t need to include the app account token as a purchase option by adding appAccountToken(_:) to the product purchase options (purchase(options:)).
For more information about sending API requests from your app, see Sending Advanced Commerce API requests from your app.
Include the consistency token, optionally
The consistency token helps prevent unintended operations that might occur when the server gets multiple or overlapping requests for the same subscription.
Subscriptions receive a new consistency token in the advancedCommerceRenewalInfo object of the JWSRenewalInfo each time the system updates the subscrpition renewal information. Include the consistency token when you use the SubscriptionCreateRequest operation to resubscribe to the subscription and provide the previousTransactionID.
Don’t include a consistency token when:
You haven’t received a consistency token.
You’re using the OneTimeChargeCreateRequest operation.
You’re using the SubscriptionCreateRequest operation for an initial subscription purchase.