- This topic has 2 replies, 2 voices, and was last updated 2 years, 5 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Stripe payment plugins for your WordPress site
· ·
Home › Forums › Stripe Payments Plugin › asp_stripe_payment_completed data is subscription obj rather than charge obj
I’m using the subscriptions add-on and implementing asp_stripe_payment_completed which according to the documentation provides the $post_data and the $charge object but the $charge object is actually the subscription, can I get the $charge object as well/instead?
$charge is Stripe\Subscription JSON: { “id”: “sub_1LAY1vIypMs78IJNtxP5bPXt”, “object”: “subscription”, “application”: null, …
For subscription payments the charge is processed differently than one time payments. For subscriptions, that subscription object is the main object.
you can make API calls to Stripe API with the Subscription ID (example: sub_1LAY1vIypMs78IJNtxP5bPXt) and retrieve various details that is associated with that subscription.
Coding related customization is beyond the scope of this standard support forum. If you need to hire some developer time, you can contact us for a custom development job.
OK thats great, thanks