Ios
The In-App Purchase functionality allows you to enable seamless payments within your iOS application. Follow these steps to integrate and verify in-app purchases effectively
Last updated
The In-App Purchase functionality allows you to enable seamless payments within your iOS application. Follow these steps to integrate and verify in-app purchases effectively
Last updated
Action: In-app Purchase
Purpose: Triggers the iOS payment dialog so the user can make an in-app purchase.
Instructions:
In your Workflow, add the In-app Purchase action.
Configure the following property:
Product ID: Enter the unique identifier for the product to be purchased. This ID should match the one configured in your Apple Developer account.
Outcome:
After successful payment, the transactionId
will be stored in the init-webtonative's element states. The name of the state is "Transaction ID".
Additional Workflow Step:
After the In-app Purchase action successfully runs, apply a 1-second delay.
Then, trigger a custom event named "init payment verification" to handle payment verification.
Action: Verifying IAP Transaction
Purpose: Validate the transaction with Apple servers to ensure it is genuine and completed.
Instructions:
In the custom event "init payment verification", add the Verifying IAP Transaction action.
Configure the following properties:
Private Key: Enter your private key for Apple’s API.
Transaction ID: Use the transactionId
stored in the "Transaction ID" element state.
Key ID: Provide the unique key identifier from your Apple Developer account.
Issuer ID: Enter your issuer ID from Apple.
Build ID: Specify the build ID for your app.
Outcome:
This action will validate the transaction with Apple and return detailed transactionData
.
Purpose: After successful verification, the returned transactionData
can be used to update your backend, unlock content, or manage user entitlements.
Next Steps:
Use the transactionData
in your app logic (e.g., granting access to premium features or delivering purchased content).
Optionally, store the transactionData
in your database for future reference.