The Samsung IAP Subscription API is used to cancel, refund, revoke, and check the status of Samsung In-App Purchase (IAP) subscriptions. Before you can start using the IAP Subscription API, you must meet all requirements, use the required authorization header parameters, and use the required URL path paremeters in your requests. See Get Started with the IAP APIs for more information.
The following is a quick reference to the IAP Subscription APIs:
Cancel the subscription corresponding to the given purchaseId.
When a subscription is canceled, automatic payments are no longer made after the current subscription period ends. Customers can use the subscription until the end of the current subscription period.
Immediately cancel the subscription and reimburse the most recent payment for the subscription corresponding to the given purchaseId.
When a subscription is revoked, customers instantly lose the ability to use the subscription, even if the current subscription period has not ended. And, automatic payments are no longer made after the current subscription period ends.
NoteSee URL path parameters for more information about the <packageName> and <purchaseId> parameters.
Body parameter
Name
Type
Description
action
string
Required. The task to perform. Must be one of the following:
cancel: End the subscription. When a subscription is cancelled, the customer can still access the subscription until the end of the current subscription period. After the current subscription period ends, access to the subscription should be blocked.
refund: Reimburse the most recent payment to the subscriber. The subscriber can still use the subscription. Use this if there is a service error or you want to issue a complimentary coupon.
revoke: Immediately cancel the subscription and immediately refund the most recent payment. When a subscription is cancelled, the customer instantly loses the ability to use the subscription, even if the current subscription period has not ended. Access to the subscription should be blocked immediately.
Date and time of the subscription's initial purchase and payment transaction (YYYY-MM-DD HH:mm:ss GMT)
subscriptionEndDate
String
Date and time when the subscription expires (YYYY-MM-DD HH:mm:ss GMT)
subscriptionStatus
String
Current status of the subscription "ACTIVE" The subscription is current and in effect. "CANCEL" The user canceled the subscription. Check the subscriptionEndDate to see if the subscription period has ended (as the canceled subscription is still valid until the current suscription period has ended).
subscriptionFirstPurchaseID
String
Unique identifier of the initial purchase of the subscription
countryCode
String
Country code (3 alphabetic characters) of the purchaser's location (for example, KOR, USA)
price[].localCurrencyCode
String
Currency code (3 alphabetic characters) of the purchaser's local currency paid for the subscription (for example, EUR, GBP, USD)
price[].localPrice
double
Cost (in the user's local currency) that the user paid for the subscription
price[].supplyPrice
double
Total amount of the subscription price plus the applied tax
itemID
String
Unique identifier of the subscription registered in Seller Portal
freeTrial
String
Whether or not the subscription is currently in a free trial period: "Y" Free trial period "T"Tiered (lower/introductory) price period "N" Regular price period
realMode
String
For regular purchases, whether the actual payment was made when the user purchased the subscription. "Y" Samsung IAP was set to production mode. The actual payment was made. "N" Samsung IAP was set to Test Mode. The actual payment was NOT made.
latestOrderId
String
Identifier (19 alphanumeric characters) of the most recent payment. it can be an initial payment or a renewal payment. Order IDs are displayed in the user's renewal receipt.
totalNumberOfTieredPayment
String
Total number of tiered price payments
currentPaymentPlan
String
Current period the subscription is in: "F" : Free trial period "R" : Regular price period "T" : Tiered (lower) price period
totalNumberOfRenewalPayment
String
Total number of payments made for initial and renewal subscriptions
cancelSubscriptionDate
String
Date and time the subscription was stopped (YYYY-MM-DD HH:mm:ss GMT)
cancelSubscriptionReason
String
Cause of the subscription stoppage: "1" User canceled the subscripton. "2" System canceled the subscription (for example, renewal test was finished). "3" Billing error (for example, user payment information was no longer valid). "4" Subscription is not available for purchase at the time of renewal. "5" Unknown errors
gracePeriodYN
String
Whether or not the subscription is currently in a grace period: "Y" The subscription is in a grace period "N" The subscription is not in a grace period
gracePeriodEndDate
String
The end date and time of the grace period (YYYY-MM-DD HH:mm:ss GMT) If the subscription is not in a grace period (gracePeriodYN = "N"), this value is set to NULL.
priceChange[].priceChangeMode
String
The mode of the price change: "1" Price increase which requires the user’s consent "2" Price increase which does not require the user’s consent "3" Price decrease, which does not require the user’s consent
priceChange[].priceChangeStatus
String
The status of the price change: "WAITING" Waiting for the subscriber to answer "CONFIRMED" The price change is acknowledged by the subscriber (either the subscriber consented or did not consent to the increase in price) "APPLIED" The subscriber is charged the new price
priceChange[].priceChangeConsentDate
String
Date and time the subscriber consented (YYYY-MM-DD HH:mm:ss GMT)
priceChange[].expectedNewPriceChargeDate
String
Date and time the new price will affect the subscriber (YYYY-MM-DD HH:mm:ss GMT)
priceChange[].newPrice[].localCurrencyCode
String
Local currency code (3 alphabetic characters) of the changed price (for example, EUR, GBP, USD)
priceChange[].newPrice[].localPrice
double
Cost (in the user's local currency) that the user paid for the subscription
SLR_4008: Failed to verify gateway server authorization
404 Not Found
SLR_4006: Application ID does not exist
406 Not Acceptable
SLR_4019: The purchase ID has already been suspended and will not be renewed
SLR_4020: The purchase ID has already been refunded
SLR_4021: Failed to cancel the subscription for an unknown reason
SLR_4022: Failed to refund the subscription for an unknown reason
SLR_4023: Failed to revoke the subscription for an unknown reason
Manage Your Cookies
We use cookies to improve your experience on our website and to show you relevant
advertising. Manage you settings for our cookies below.
Essential Cookies
These cookies are essential as they enable you to move around the website. This
category cannot be disabled.
Company
Domain
Samsung Electronics
.samsungdeveloperconference.com
Analytical/Performance Cookies
These cookies collect information about how you use our website. for example which
pages you visit most often. All information these cookies collect is used to improve
how the website works.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Functionality Cookies
These cookies allow our website to remember choices you make (such as your user name, language or the region your are in) and
tailor the website to provide enhanced features and content for you.
Company
Domain
LinkedIn
.ads.linkedin.com, .linkedin.com
Advertising Cookies
These cookies gather information about your browser habits. They remember that
you've visited our website and share this information with other organizations such
as advertisers.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Preferences Submitted
You have successfully updated your cookie preferences.