Skip to main content
Question

Assistance Needed with Payment Details in RevenueCat API Responses

  • 1 July 2024
  • 1 reply
  • 8 views

Hello,

I hope you are doing well. I am currently working on integrating RevenueCat into our application and I am encountering difficulties obtaining some crucial information during the payment status check via the API.

Specifically, I am using the following API endpoint: https://api.revenuecat.com/v1/subscribers/{$userId}. However, I am unable to find the payment ID, payment status, and the amount paid by the user in the API responses. These details are essential for our payment tracking and subscription management.

Could you please provide guidance or examples on how to obtain these pieces of information from this API? Any help or suggestions would be greatly appreciated.

Thank you in advance for your assistance.

Best regards,

 

This post has been closed for comments

1 reply

Userlevel 4
Badge +8

Hi,

That info would be in the subscriptions or non-subscriptions object in the response. Here’s an example response:

{

  • "request_date": "2019-07-26T17:40:10Z",

  • "request_date_ms": 1564162810884,

  • "subscriber":{
    • "entitlements":{},

    • "first_seen": "2019-02-21T00:08:41Z",

    • "management_url": "https://apps.apple.com/account/subscriptions",

    • "non_subscriptions":{},

    • "original_app_user_id": "XXX-XXXXX-XXXXX-XX",

    • "original_application_version": "1.0",

    • "original_purchase_date": "2019-01-30T23:54:10Z",

    • "other_purchases": { },

    • "subscriptions":{
      • "annual":{
        • "auto_resume_date": null,

        • "billing_issues_detected_at": null,

        • "expires_date": "2019-08-14T21:07:40Z",

        • "grace_period_expires_date": null,

        • "is_sandbox": true,

        • "original_purchase_date": "2019-02-21T00:42:05Z",

        • "ownership_type": "PURCHASED",

        • "period_type": "normal",

        • "purchase_date": "2019-07-14T20:07:40Z",

        • "refunded_at": null,

        • "store": "app_store",

        • "unsubscribe_detected_at": "2019-07-17T22:48:38Z"

        },
      • "onemonth":{},

      • "rc_promo_pro_cat_monthly":{}

      }
    }

}

 

The store-specific transaction isn’t included here, but it is included in our webhooks. And we only give responses for successful transactions. There is also info about billing issues and grace periods, and the expires_date is in the past, then the status is expired for that transaction.