I am using Stripe
as a payment gateway. Now there's a big problem bothers me.
I used code below to create a subscription:
<?php
require_once('lib/Stripe.php');
Stripe::setApiKey(API_KEY);
$token = $_POST['stripeToken'];
$customer = Stripe_Customer::create(array(
"card" => $token,
"plan" => $_POST['plan'],
"email" => "fakeuser@gmail.com",
));
This works fine, but I can not get Charge ID
from $customer
, and I found out there's no way in Stripe API
to get it.
How to get it when creating a subscription? I really need Charge ID
.