Explain a Customer’s Purchase History
Review purchase history and subscription status for transaction [transaction ID]. Prepare a customer support summary without changing the subscription.
Leina connects to App Store Server API to help you explain purchases and investigate subscription questions. Ask in your team chat. Leina does the work and brings back the result.
Connect App Store Server API, choose what to share, and hand off your first task.
You
Check transaction [transaction ID]. Summarize this customer’s subscription history and current status for our support reply.
Leina
I reviewed the purchase history and subscription records. The latest subscription is active.
App Store · Support summary
Customer subscription
The latest renewal is reflected in the subscription record.
An App Store AI agent can turn a customer’s purchase history and subscription records into a support summary without changing their subscription.
You specify the source and the destination. Leina uses the content available to your connection and returns the result for you to review.
The App Store Server API gives app teams access to purchase and subscription records.
Provide a transaction belonging to this customer and app.
Read the purchase and subscription records.
Summarize the reported status for support.
Copy a prompt, add your details, and send it to Leina in your connected team chat.
Review purchase history and subscription status for transaction [transaction ID]. Prepare a customer support summary without changing the subscription.
Review App Store notifications during [time range], including failed deliveries. Summarize the delivery problems by notification type.
Your next App Store Server API task can start with a message.
Tell Leina what you need in your team chat. Include the source, destination, and expected result.
Connect the tools involved and give Leina access to the content it needs.
Share the source material, say where the result belongs, and describe what you need.
Review the result and any changes in the connected app.
Hand off these everyday tasks to your AI employee.
List a customer's in-app purchase transactions for your app, oldest first by default, decoded from the signed payloads Apple returns. Pass sort DESCENDING to get the most recent transactions first. Returns up to 20 transactions per page.
Read one in-app purchase transaction by identifier, decoded from the signed payload Apple returns.
Read the app download transaction for a customer, decoded from the signed payload Apple returns. It records when and on which platform the customer first acquired the app.
Look up the in-app purchase transactions behind an order ID from a customer's App Store receipt, to check that the order is genuine and belongs to your app. Apple serves this endpoint only in the production environment, so it fails on a sandbox connection.
Set or replace the app account token on a transaction, to associate a purchase made outside your app with a customer on your own service. Overwrites any token already set.
Tell the App Store that your server finished delivering the content for a transaction. Call it only after the customer has the content; it cannot be undone. Apple still returns a finished transaction from get_transaction_history, so do not treat its disappearance as confirmation.
Read the status of every auto-renewable subscription a customer has for your app, grouped by subscription group, with the latest transaction and renewal information of each decoded from the signed payloads Apple returns.
Extend the renewal date of one customer's active auto-renewable subscription, to compensate for a service outage or a cancelled event. The extension cannot be reversed, and Apple emails the customer about the new renewal date.
Extend the renewal date of every active subscription to one product, optionally limited to some storefronts. The App Store processes the request asynchronously; poll get_subscription_renewal_date_extension_status for the outcome. The extension cannot be reversed.
Check how far the App Store has got with a renewal date extension that was requested for all active subscribers of a product.
List the in-app purchase transactions the App Store refunded for a customer in your app, newest first, decoded from the signed payloads Apple returns. Returns up to 20 transactions per page.
Send consumption information for an in-app purchase after a CONSUMPTION_REQUEST notification, so the App Store can decide on the customer's refund request. Apple expects an answer within 12 hours of the notification. Use this for App Store in-app purchases that do not go through the Advanced Commerce API.
Send the version 1 consumption information for an in-app purchase after a CONSUMPTION_REQUEST notification. Apple documents this shape for purchases made through the Advanced Commerce API; use send_consumption_information for ordinary App Store in-app purchases.
Ask the App Store to send a TEST notification to the App Store Server Notifications URL configured for your app, and get back the token that identifies the attempt. Fails when no notification URL is configured for the selected environment.
Read the delivery result of a test notification, with the notification payload decoded from the signed payload Apple returns. Apple answers 404 until it has finished the first delivery attempt.
List the App Store Server Notifications the App Store tried to deliver to your server in a time span, with each notification payload decoded. History covers the past 180 days in production and the past 30 days in sandbox, and returns up to 20 records per page.
Upload a PNG image for retention messages, either a FULL_SIZE image shown above the message body or a BULLET_POINT icon. The image starts in the PENDING state and Apple reviews it before it can be displayed; check the state with get_retention_image_list. Each app can hold up to 2000 images and an identifier can be uploaded only once. Only images and messages in the APPROVED state are shown to customers; the sandbox approves uploads immediately. Apple grants Retention Messaging API access per developer account; without it these endpoints answer 404 with no error body.
List every image uploaded for retention messaging in this app and environment, with its size slot and approval state. Only images and messages in the APPROVED state are shown to customers; the sandbox approves uploads immediately. Apple grants Retention Messaging API access per developer account; without it these endpoints answer 404 with no error body.
Delete an uploaded retention image. Apple refuses with 403 while a message still references the image, so delete the message first; a missing image answers 404. Apple grants Retention Messaging API access per developer account; without it these endpoints answer 404 with no error body.
Upload the text of a retention message: a header, a body, optionally a full-size image and bullet points with icons. The message starts in the PENDING state and Apple reviews it; check the state with get_retention_message_list. Leave out image and bulletPoints for messages you will use as switch-plan or promotional-offer messages. Each app can hold up to 2000 messages and an identifier can be uploaded only once. Only images and messages in the APPROVED state are shown to customers; the sandbox approves uploads immediately. Apple grants Retention Messaging API access per developer account; without it these endpoints answer 404 with no error body.
List every message uploaded for retention messaging in this app and environment, with its approval state. A message that carries an image also needs that image to be APPROVED; check it with get_retention_image_list. Apple grants Retention Messaging API access per developer account; without it these endpoints answer 404 with no error body.
Delete an uploaded retention message. A missing message answers 404. Stop returning the identifier from your Get Retention Message endpoint first, and delete any image it used afterwards with delete_retention_image. Apple grants Retention Messaging API access per developer account; without it these endpoints answer 404 with no error body.
Set the default retention message the App Store shows for one subscription product in one locale, replacing any default configured before. Only text-based messages, with or without an image, can be defaults, and both the message and its image must be APPROVED. Products without a default in a locale show no retention message there, and the default is also the fallback when your real-time endpoint fails. Apple grants Retention Messaging API access per developer account; without it these endpoints answer 404 with no error body.
Read which message is configured as the default retention message for one subscription product in one locale. Returns a null messageIdentifier when no default is configured there. Apple grants Retention Messaging API access per developer account; without it these endpoints answer 404 with no error body.
Remove the default retention message of one subscription product in one locale, so the App Store shows no retention message there. Succeeds even when no default was configured. Apple grants Retention Messaging API access per developer account; without it these endpoints answer 404 with no error body.
Register the URL of your Get Retention Message endpoint for the environment of this connection, replacing any URL registered before. Once set, the App Store calls it whenever a subscriber opens the cancellation flow and shows the message you pick. A production URL is accepted only after your endpoint passed the sandbox performance test (Apple answers 403 otherwise). Apple grants Retention Messaging API access per developer account; without it these endpoints answer 404 with no error body.
Read the URL of the Get Retention Message endpoint registered for the environment of this connection. Returns a null realtimeUrl when none is registered. Apple grants Retention Messaging API access per developer account; without it these endpoints answer 404 with no error body.
Unregister the Get Retention Message endpoint URL for the environment of this connection. Afterwards the App Store shows only default messages in that environment until a URL is registered again. Apple grants Retention Messaging API access per developer account; without it these endpoints answer 404 with no error body.
Start Apple's performance test of the Get Retention Message endpoint registered in the sandbox, using an active sandbox subscription as the sample purchase. Passing the test is required before configure_retention_realtime_url accepts a production URL. Returns the request identifier and the test parameters; the test runs for the returned totalDuration. Available only on a connection whose environment is sandbox; Apple serves the performance test endpoints on the sandbox host alone. Apple grants Retention Messaging API access per developer account; without it these endpoints answer 404 with no error body.
Read the outcome of a sandbox performance test started with initiate_retention_performance_test: PENDING while it runs, then PASS or FAIL together with the measured response times, success rate and failure counts. Available only on a connection whose environment is sandbox; Apple serves the performance test endpoints on the sandbox host alone. Apple grants Retention Messaging API access per developer account; without it these endpoints answer 404 with no error body.
Connect the Apps your work depends on, and give Leina the context to carry the task forward.
Hand off a task while your team is discussing it. Leina uses your connected tools and brings the result back to the conversation.
See How Leina Works in SlackI reviewed the purchase history and subscription records. The latest subscription is active.
Use the matching environment. Sandbox and TestFlight purchases belong to the sandbox; production purchases use production.
No. Reading purchase history and status does not modify renewal dates or customer entitlements.
Start with one task you already need to do. Tell Leina what a finished result should look like.
Connect App Store Server API, choose what to share, and hand off your first task.