stripeSubscription.import API: FAQ/help: How to use?
Looking for help with this API. Specifically, I wonder if this API will help me in this situation:
We're moving data into CiviCRM from a 3rd-party CRM system which has been creating recurring contributions through Stripe. We plan to discontinue this 3rd-party CRM, but want to preserve the recurring contributions in Stripe; thus we want Stripe to start reporting subscription payments to CiviCRM.
We're able to exporting some data from the 3rd-party CRM, but not all. But we can export from Stripe, including SubscriptionId, CustomerId, amount, interval, etc.
We can add the CiviCRM webhook to the existing Stripe account, so Stripe will start sending notifications on future events (I believe), but still, we'll need to make sure CiviCRM is aware of all the subscriptions so it knows what to do with those notifications. (Note: none of these subscriptions are related to membership.)
So, my questions:
- Will this API help us import Stripe subscription data to accomplish the above goals?
- What's a set of steps we could take to import a single non-membership subscription from Stripe data? Is it enough to have the following params, or is more needed?
$result = civicrm_api3('StripeSubscription', 'import', [
'subscription_id' => "sub_1234567890",
'contact_id' => 12345,
'payment_processor_id' => 1, // my 'stripe' payment processor in CiviCRM
]);
Thanks for any input you can provide.