Question

Where can I find original transaction id issued by apple when a user makes a non renewable subscription purchase?

  • 12 July 2022
  • 5 replies
  • 1019 views

Badge +1

I am using the flutter SDK to integrate IAP to my app and i am using the non renewable subscription model. I want to get a unique transaction ID issued by apple to send to my server to store it if the user wants to refund his purchase in the future.


5 replies

Userlevel 1
Badge +2

Hi Tamreena, thanks for reaching out. Are you looking to access the original transaction ID from the SDK or from your server?

From the SDK, you may not always be able to, because there are cases where the original transaction ID coming from Apple might be null -- more info on that here.

If you have RevenueCat webhooks setup, though, in the NON_RENEWING_PURCHASE event that you’d receive for a non-renewable subscription purchase there will be an original_transaction_id property that you can check and track if you want to proactively monitor whether such a purchase has been refunded, which you’d also receive notice of through the CANCELLATION event (with cancellation_reason CUSTOMER_SUPPORT to note a refund).

If that doesn’t satisfy the use case you had in mind, though, feel free to follow up and I’ll see if there’s a different way to address it. Thanks!

Badge +1

Hi @Dan Pannasch  thanks for your reply,

Our case the user subscribes to a certain non-renewable package to have full access to the application features for a certain amount of time. After subscribing the app sends to the server that this user have subscribed and we are looking for a unique identifier for the payment such as (original transaction Id) in order to use it in case the user decided to cancel/refund subscription from apple.

Note: we are aware of the weebhooks option but we are looking for a free solution. Thanks!  

Userlevel 1
Badge +2

Ah, I understand. In that case, if you’re not looking to use webhooks, we would recommend doing this through S2S notifications from Apple. They have both a v1 and v2 API for this, but either would work.

  1. In v1, original_transaction_id will be accessible in the latest_receipt_info. (more info here)
  2. In v2, originalTransactionId will be accessible in the decoded JWSTransactionPayload.

Let me know if that works for you. If you take this approach, we also recommend forwarding these notifications to RevenueCat, which you can learn about here.

Badge +1

The problem is that we are using non renewable subscriptions which apple doesn’t send a notification when a purchase occurs.

Userlevel 1
Badge +2

Hey Tamreena -- I apologize I’m just getting back to this now! If you’re still struggling with a good solution here, at this point I’d recommend reaching out to our Support Team directly who might be able to recommend some other specific solutions to that case that I might not be thinking of.

If you click on Account → Contact Us from the Dashboard you’ll be able to get in touch, and feel free to drop a link to this community post so they’ve got all the context.

Reply