name file | size | edit | permission | action |
---|---|---|---|---|
.env | 2733 KB | December 22 2024 06:20:07 | 0644 | |
404.html | 58370 KB | November 20 2024 15:32:22 | 0644 | |
502.html | 58368 KB | November 20 2024 15:32:22 | 0644 | |
Modules | - | December 11 2024 21:02:56 | 0755 | |
README.md | 4158 KB | February 14 2023 12:31:56 | 0644 | |
app | - | December 11 2024 17:57:48 | 0755 | |
artisan | 1686 KB | February 14 2023 12:31:56 | 0644 | |
bootstrap | - | December 11 2024 20:23:36 | 0755 | |
composer.json | 3761 KB | December 11 2024 22:15:00 | 0644 | |
composer.lock | 512048 KB | December 11 2024 22:13:28 | 0644 | |
config | - | June 15 2025 02:09:36 | 0755 | |
database | - | December 05 2024 20:18:12 | 0755 | |
dfsdf dfds fd fds findex.html | 1420 KB | November 20 2024 15:32:24 | 0644 | |
error_log | 20967764 KB | July 18 2025 21:15:21 | 0644 | |
firoz | - | December 23 2024 13:24:46 | 0755 | |
index.php | 1667 KB | December 14 2024 05:20:36 | 0644 | |
lang | - | December 11 2024 21:02:48 | 0755 | |
modules_statuses.json | 472 KB | November 20 2024 15:32:24 | 0644 | |
mpos | - | March 31 2025 02:36:31 | 0755 | |
package.json | 226 KB | February 14 2023 12:31:56 | 0644 | |
phpunit.xml | 1146 KB | February 14 2023 12:31:56 | 0644 | |
public | - | March 31 2025 02:36:31 | 0755 | |
resources | - | December 11 2024 21:10:22 | 0755 | |
routes | - | June 15 2025 02:09:31 | 0755 | |
storage | - | December 11 2024 21:12:44 | 0755 | |
tests | - | December 05 2024 20:18:12 | 0755 | |
vendor | - | December 11 2024 22:13:30 | 0755 | |
vite.config.js | 263 KB | February 14 2023 12:31:56 | 0644 |
week
intervals, the day of month for month
and year
intervals, and the month of year for year
intervals. The timestamp is in UTC format.
* @property null|\Stripe\StripeObject $billing_cycle_anchor_config The fixed values used to calculate the billing_cycle_anchor
.
* @property null|\Stripe\StripeObject $billing_thresholds Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
* @property null|int $cancel_at A date in the future at which the subscription will automatically get canceled
* @property bool $cancel_at_period_end Whether this subscription will (if status=active
) or did (if status=canceled
) cancel at the end of the current billing period.
* @property null|int $canceled_at If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with cancel_at_period_end
, canceled_at
will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.
* @property null|\Stripe\StripeObject $cancellation_details Details about why this subscription was cancelled
* @property string $collection_method Either charge_automatically
, or send_invoice
. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as active
.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
* @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
* @property int $current_period_end End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.
* @property int $current_period_start Start of the current period that the subscription has been invoiced for.
* @property string|\Stripe\Customer $customer ID of the customer who owns the subscription.
* @property null|int $days_until_due Number of days a customer has to pay invoices generated by this subscription. This value will be null
for subscriptions where collection_method=charge_automatically
.
* @property null|string|\Stripe\PaymentMethod $default_payment_method ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over default_source
. If neither are set, invoices will use the customer's invoice_settings.default_payment_method or default_source.
* @property null|string|\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source $default_source ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If default_payment_method
is also set, default_payment_method
will take precedence. If neither are set, invoices will use the customer's invoice_settings.default_payment_method or default_source.
* @property null|\Stripe\TaxRate[] $default_tax_rates The tax rates that will apply to any subscription item that does not have tax_rates
set. Invoices created will have their default_tax_rates
populated from the subscription.
* @property null|string $description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
* @property null|\Stripe\Discount $discount Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. This field has been deprecated and will be removed in a future API version. Use discounts
instead.
* @property (string|\Stripe\Discount)[] $discounts The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use expand[]=discounts
to expand each discount.
* @property null|int $ended_at If the subscription has ended, the date the subscription ended.
* @property \Stripe\StripeObject $invoice_settings
* @property \Stripe\Collection<\Stripe\SubscriptionItem> $items List of subscription items, each with an attached price.
* @property null|string|\Stripe\Invoice $latest_invoice The most recent invoice this subscription has generated.
* @property bool $livemode Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
* @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* @property null|int $next_pending_invoice_item_invoice Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at pending_invoice_item_interval
.
* @property null|string|\Stripe\Account $on_behalf_of The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details.
* @property null|\Stripe\StripeObject $pause_collection If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to paused
. Learn more about pausing collection.
* @property null|\Stripe\StripeObject $payment_settings Payment settings passed on to invoices created by the subscription.
* @property null|\Stripe\StripeObject $pending_invoice_item_interval Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling Create an invoice for the given subscription at the specified interval.
* @property null|string|\Stripe\SetupIntent $pending_setup_intent You can use this SetupIntent to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the SCA Migration Guide.
* @property null|\Stripe\StripeObject $pending_update If specified, pending updates that will be applied to the subscription once the latest_invoice
has been paid.
* @property null|string|\Stripe\SubscriptionSchedule $schedule The schedule attached to the subscription
* @property int $start_date Date when the subscription was first created. The date might differ from the created
date due to backdating.
* @property string $status Possible values are incomplete
, incomplete_expired
, trialing
, active
, past_due
, canceled
, unpaid
, or paused
.
For collection_method=charge_automatically
a subscription moves into incomplete
if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an active
status. If the first invoice is not paid within 23 hours, the subscription transitions to incomplete_expired
. This is a terminal status, the open invoice will be voided and no further invoices will be generated.
A subscription that is currently in a trial period is trialing
and moves to active
when the trial period is over.
A subscription can only enter a paused
status when a trial ends without a payment method. A paused
subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The paused
status is different from pausing collection, which still generates invoices and leaves the subscription's status unchanged.
If subscription collection_method=charge_automatically
, it becomes past_due
when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become canceled
or unpaid
(depending on your subscriptions settings).
If subscription collection_method=send_invoice
it becomes past_due
when its invoice is not paid by the due date, and canceled
or unpaid
if it is still not paid by an additional deadline after that. Note that when a subscription has a status of unpaid
, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.
collection_method=charge_automatically
, the first invoice is
* finalized as part of the request. The payment_behavior
parameter
* determines the exact behavior of the initial payment.
*
* To start subscriptions where the first invoice always begins in a
* draft
status, use subscription
* schedules instead. Schedules provide the flexibility to model more complex
* billing configurations that change over time.
*
* @param null|array $params
* @param null|array|string $options
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Subscription the created resource
*/
public static function create($params = null, $options = null)
{
self::_validateParams($params);
$url = static::classUrl();
list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
}
/**
* By default, returns a list of subscriptions that have not been canceled. In
* order to list canceled subscriptions, specify status=canceled
.
*
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Collection<\Stripe\Subscription> of ApiResources
*/
public static function all($params = null, $opts = null)
{
$url = static::classUrl();
return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
}
/**
* Retrieves the subscription with the given ID.
*
* @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Subscription
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
}
/**
* Updates an existing subscription to match the specified parameters. When
* changing prices or quantities, we optionally prorate the price we charge next
* month to make up for any price changes. To preview how the proration is
* calculated, use the create
* preview endpoint.
*
* By default, we prorate subscription changes. For example, if a customer signs up
* on May 1 for a proration_behavior
as always_invoice
to create
* prorations, automatically invoice the customer for those proration adjustments,
* and attempt to collect payment. If you pass create_prorations
, the
* prorations are created but not automatically invoiced. If you want to bill the
* customer for the prorations before the subscription’s renewal date, you need to
* manually invoice the customer.
*
* If you don’t want to prorate, set the proration_behavior
option to
* none
. With this option, the customer is billed
* proration_behavior
to none
when
* switching between different billing intervals (for example, from monthly to
* yearly), we don’t generate any credits for the old subscription’s unused time.
* We still reset the billing date and bill immediately for the new subscription.
*
* Updating the quantity on a subscription many times in an hour may result in rate limiting. If you need to bill for a frequently
* changing quantity, consider integrating usage-based billing instead.
*
* @param string $id the ID of the resource to update
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Subscription the updated resource
*/
public static function update($id, $params = null, $opts = null)
{
self::_validateParams($params);
$url = static::resourceUrl($id);
list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
$obj->setLastResponse($response);
return $obj;
}
use ApiOperations\Delete {
delete as protected _delete;
}
public static function getSavedNestedResources()
{
static $savedNestedResources = null;
if (null === $savedNestedResources) {
$savedNestedResources = new Util\Set([
'source',
]);
}
return $savedNestedResources;
}
/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Subscription the updated subscription
*/
public function deleteDiscount($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/discount';
list($response, $opts) = $this->_request('delete', $url, $params, $opts);
$this->refreshFrom(['discount' => null], $opts, true);
return $this;
}
const PAYMENT_BEHAVIOR_ALLOW_INCOMPLETE = 'allow_incomplete';
const PAYMENT_BEHAVIOR_DEFAULT_INCOMPLETE = 'default_incomplete';
const PAYMENT_BEHAVIOR_ERROR_IF_INCOMPLETE = 'error_if_incomplete';
const PAYMENT_BEHAVIOR_PENDING_IF_INCOMPLETE = 'pending_if_incomplete';
const PRORATION_BEHAVIOR_ALWAYS_INVOICE = 'always_invoice';
const PRORATION_BEHAVIOR_CREATE_PRORATIONS = 'create_prorations';
const PRORATION_BEHAVIOR_NONE = 'none';
/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Subscription the canceled subscription
*/
public function cancel($params = null, $opts = null)
{
$url = $this->instanceUrl();
list($response, $opts) = $this->_request('delete', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
}
/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Subscription the resumed subscription
*/
public function resume($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/resume';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);
return $this;
}
/**
* @param null|array $params
* @param null|array|string $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\SearchResult<\Stripe\Subscription> the subscription search results
*/
public static function search($params = null, $opts = null)
{
$url = '/v1/subscriptions/search';
return static::_requestPage($url, \Stripe\SearchResult::class, $params, $opts);
}
}