Payment Methods
type | description | example |
---|---|---|
Consumable | Users can purchase different types of consumables, such as lives or gems in a game, to further their progress through an app. Consumable in‑app purchases are used once, are depleted, and can be purchased again. | Coins |
Non‑Consumable | Users can purchase non‑consumable, premium features within an app. Non‑consumables are purchased once and do not expire, such as additional filters in a photo app. Apple can host content associated with your non‑consumable in‑app purchases. | Remove Ads |
Auto‑Renewable Subscriptions | Users can purchase access to services or periodically updated content, such as monthly access to cloud storage or a weekly subscription to a magazine. Users are charged on a recurring basis until they decide to cancel. | Buy Contents Membership VIP |
Non‑Renewing Subscriptions | Users can purchase access to services or content for a limited duration, such as a season pass to streaming content. This type of subscription does not renew automatically, so users need to renew each time. |
Start oberserving the payment queue in the very beginning
private func startObservingPaymentQueue() {
SKPaymentQueue.default().add(self)
}
- Promoted in-app purchases
- Background subscription renewals
- Interrupted purchases
Configurate IAP
Steps | Configrations |
---|---|
1 | Configure in-app purchases in App Store Connect |
2 | Create a sandbox test user account in the App Store Connect. See for details. |
3 | Open the ProductIds.plist file in the sample and update its content with your existing in-app purchases’ product IDs. |
4 | Lets Xcode Signing&Capability supports IAP |
5 | Submit the IAP You need screenshot exactly the size of 640X920 (iOS) |
6 | Apple Server Notification |
Functions need to realize in IAP
Function | Instruction |
---|---|
Configure IAP | |
Show the list of product identifiers fetched from App Store Connect | |
Purchase one item | |
Restore purchases | |
Send the receipt to the server | |
Test (in Xcode, Sandbord, Auto) |
Receipt validation
on-device
Choosing a Receipt Validation Technique