Contents

Request Transaction Refund

Request a refund for a one-time charge or subscription transaction.

URL

POST https://api.storekit.itunes.apple.com/advancedCommerce/v1/transaction/requestRefund/{transactionId}

Sandbox URL

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

Path Parameters

NameTypeDescription
transactionId Requiredstring

The transaction identifier for which you request a refund.

Response Codes

StatusReasonTypeDescription
200OK
Content-Type: application/json
RequestRefundResponse

Request succeeded.

400Bad Request
Content-Type: application/json
(RepeatedRequestReferenceIdError | NullRequestInfoError | InvalidAppAccountTokenError | NullRequestReferenceIDError | InvalidRequestReferenceIDError | InvalidConsistencyTokenError | InvalidStorefrontError | MismatchedStorefrontError | MismatchedStorefrontError | OperationNotAllowedError | MalformedPayloadError | SimulateRefundDeclineOnlyInSandboxError | RefundAmountWithoutCustomError | NullRefundRiskingError | InvalidRefundTypeError | InvalidRefundReasonError | NegativeRefundAmountError | NullRefundAmountError | NullRefundReasonError | NullRefundTypeError | RemovalAllNotAllowedError | PendingRefundError | ProratedOnlyLatestTransactionError | PartialSimulateRefundDeclineError)

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 | SubscriptionNotEligibleError | ProductNotOwnedError | InsufficientFundsError | AlreadyRefundedError | TransactionNotRefundableError)

404Not Found
Content-Type: application/json
TransactionIdNotFoundError

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

Refer to the Advanced Commerce API Addendum to learn the use cases for the Cancel a Subscription, Revoke Subscription, and Request Transaction Refund APIs.

HTTP Body

The request body.

See Also

Refund request from the server