Contents

Migrate a Subscription to Advanced Commerce API

Migrate a subscription that a customer purchased through In-App Purchase to a subscription you manage using the Advanced Commerce API.

URL

POST https://api.storekit.itunes.apple.com/advancedCommerce/v1/subscription/migrate/{transactionId}

Sandbox URL

POST https://api.storekit-sandbox.itunes.apple.com/advancedCommerce/v1/subscription/migrate/{transactionId}

Path Parameters

NameTypeDescription
transactionId Requiredstring

The transaction identifier of the auto-renewable subscription to migrate. Use the subscription’s original transaction ID or any subsequent transaction ID of a transaction related to the subscription.

Response Codes

StatusReasonTypeDescription
200OK
Content-Type: application/json
SubscriptionMigrateResponse

Request succeeded.

400Bad Request
Content-Type: application/json
(RepeatedRequestReferenceIdError | NullRequestInfoError | NullTaxCodeError | NullItemsError | NullDescriptorsError | NullSKUError | NullDisplayNameError | NullDescriptionError | InvalidAppAccountTokenError | NullRequestReferenceIDError | InvalidRequestReferenceIDError | InvalidConsistencyTokenError | InvalidStorefrontError | SKULengthExceededError | DescriptionLengthExceededError | DisplayNameLengthExceededError | InvalidDisplayNameError | InvalidDescriptionError | InvalidProductError | InvalidSKUError | InvalidTaxProductCodeError | MismatchedStorefrontError | MissingPricingConfigForStorefrontError | OperationNotAllowedError | MalformedPayloadError | AtLeastOneItemError | NullTargetProductIDError | InvalidTargetProductIDError | SubscriptionAlreadyMigratedError | ItemLimitExceededError | PendingChangesMismatchError)

401Unauthorized

The JSON Web Token (JWT) in the authorization header is invalid. For more information, see Authorizing API requests from your server.

403Forbidden
Content-Type: application/json
(SubscriptionDoesNotExistError | SubscriptionAlreadyExistsError | SubscriptionNotEligibleError | ProductNotOwnedError | InactiveACASubError | ProductNotEligibleError | StorefrontChangeError | MigrationNotAllowedWhenPriceIncreaseCommunicatedError)

404Not Found
Content-Type: application/json
(TransactionIdNotFoundError | ProductNotFoundError)

429
Content-Type: application/json
RateLimitExceededError

The request exceeded the rate limit. For more information, see Identifying rate limits for Advanced Commerce APIs.

500Internal Server Error
Content-Type: application/json
(GeneralInternalError | GeneralInternalRetryableError)

Server error. Try again later.

Mentioned in

Discussion

HTTP Body

The request body that contains the details for the migration.

See Also

Migration from the server