In my opinion different courses should have different product_ids, why did you put the same product_id to them?
In an app or a game, everything shown to be purchasable generally have different product_ids.
Post
Replies
Boosts
Views
Activity
once there was verifyReceipt endpoint, which was deprecated.
But I think your flow seems right. The thing is there is no information in JWSTransactionDecodedPayload about whether the client has ended the transaction or not as far as I see. Additionally this is for consumables, check for also subscriptions and notifications inside the APIs.