code
stringlengths
15
9.96M
docstring
stringlengths
1
10.1k
func_name
stringlengths
1
124
language
stringclasses
1 value
repo
stringlengths
7
63
path
stringlengths
6
186
url
stringlengths
50
236
license
stringclasses
4 values
public function cancel($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/refunds/%s/cancel', $id), $params, $opts); }
Cancels a refund with a status of <code>requires_action</code>. You can’t cancel refunds in other states. Only refunds for payment methods that require customer action can enter the <code>requires_action</code> state. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Refund @throws \Stripe\Exception\ApiErrorException if the request fails
cancel
php
stripe/stripe-php
lib/Service/RefundService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/RefundService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/refunds', $params, $opts); }
When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it. Creating a new refund will refund a charge that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged. You can optionally refund only part of a charge. You can do so multiple times, until the entire charge has been refunded. Once entirely refunded, a charge can’t be refunded again. This method will raise an error when called on an already-refunded charge, or when trying to refund more money than is left on a charge. @param null|array{amount?: int, charge?: string, currency?: string, customer?: string, expand?: string[], instructions_email?: string, metadata?: null|\Stripe\StripeObject, origin?: string, payment_intent?: string, reason?: string, refund_application_fee?: bool, reverse_transfer?: bool} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Refund @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/RefundService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/RefundService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/refunds/%s', $id), $params, $opts); }
Retrieves the details of an existing refund. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Refund @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/RefundService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/RefundService.php
MIT
public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/refunds/%s', $id), $params, $opts); }
Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don’t provide remain unchanged. This request only accepts <code>metadata</code> as an argument. @param string $id @param null|array{expand?: string[], metadata?: null|\Stripe\StripeObject} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Refund @throws \Stripe\Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Service/RefundService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/RefundService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/account_sessions', $params, $opts); }
Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access. @param null|array{account: string, components: array{account_management?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, account_onboarding?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, balances?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, documents?: array{enabled: bool, features?: array{}}, financial_account?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool, send_money?: bool, transfer_balance?: bool}}, financial_account_transactions?: array{enabled: bool, features?: array{card_spend_dispute_management?: bool}}, issuing_card?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, spend_control_management?: bool}}, issuing_cards_list?: array{enabled: bool, features?: array{card_management?: bool, card_spend_dispute_management?: bool, cardholder_management?: bool, disable_stripe_user_authentication?: bool, spend_control_management?: bool}}, notification_banner?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, external_account_collection?: bool}}, payment_details?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payments?: array{enabled: bool, features?: array{capture_payments?: bool, destination_on_behalf_of_charge_management?: bool, dispute_management?: bool, refund_management?: bool}}, payouts?: array{enabled: bool, features?: array{disable_stripe_user_authentication?: bool, edit_payout_schedule?: bool, external_account_collection?: bool, instant_payouts?: bool, standard_payouts?: bool}}, payouts_list?: array{enabled: bool, features?: array{}}, tax_registrations?: array{enabled: bool, features?: array{}}, tax_settings?: array{enabled: bool, features?: array{}}}, expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\AccountSession @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/AccountSessionService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountSessionService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/tax_rates', $params, $opts); }
Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first. @param null|array{active?: bool, created?: array|int, ending_before?: string, expand?: string[], inclusive?: bool, limit?: int, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\TaxRate> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/TaxRateService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/TaxRateService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/tax_rates', $params, $opts); }
Creates a new tax rate. @param null|array{active?: bool, country?: string, description?: string, display_name: string, expand?: string[], inclusive: bool, jurisdiction?: string, metadata?: \Stripe\StripeObject, percentage: float, state?: string, tax_type?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\TaxRate @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/TaxRateService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/TaxRateService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/tax_rates/%s', $id), $params, $opts); }
Retrieves a tax rate with the given ID. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\TaxRate @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/TaxRateService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/TaxRateService.php
MIT
public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/tax_rates/%s', $id), $params, $opts); }
Updates an existing tax rate. @param string $id @param null|array{active?: bool, country?: string, description?: string, display_name?: string, expand?: string[], jurisdiction?: string, metadata?: null|\Stripe\StripeObject, state?: string, tax_type?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\TaxRate @throws \Stripe\Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Service/TaxRateService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/TaxRateService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/prices', $params, $opts); }
Returns a list of your active prices, excluding <a href="/docs/products-prices/pricing-models#inline-pricing">inline prices</a>. For the list of inactive prices, set <code>active</code> to false. @param null|array{active?: bool, created?: array|int, currency?: string, ending_before?: string, expand?: string[], limit?: int, lookup_keys?: string[], product?: string, recurring?: array{interval?: string, meter?: string, usage_type?: string}, starting_after?: string, type?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\Price> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/PriceService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PriceService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/prices', $params, $opts); }
Creates a new <a href="https://docs.stripe.com/api/prices">Price</a> for an existing <a href="https://docs.stripe.com/api/products">Product</a>. The Price can be recurring or one-time. @param null|array{active?: bool, billing_scheme?: string, currency: string, currency_options?: \Stripe\StripeObject, custom_unit_amount?: array{enabled: bool, maximum?: int, minimum?: int, preset?: int}, expand?: string[], lookup_key?: string, metadata?: \Stripe\StripeObject, nickname?: string, product?: string, product_data?: array{active?: bool, id?: string, metadata?: \Stripe\StripeObject, name: string, statement_descriptor?: string, tax_code?: string, unit_label?: string}, recurring?: array{interval: string, interval_count?: int, meter?: string, trial_period_days?: int, usage_type?: string}, tax_behavior?: string, tiers?: (array{flat_amount?: int, flat_amount_decimal?: string, unit_amount?: int, unit_amount_decimal?: string, up_to: array|int|string})[], tiers_mode?: string, transfer_lookup_key?: bool, transform_quantity?: array{divide_by: int, round: string}, unit_amount?: int, unit_amount_decimal?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Price @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/PriceService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PriceService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/prices/%s', $id), $params, $opts); }
Retrieves the price with the given ID. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Price @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/PriceService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PriceService.php
MIT
public function search($params = null, $opts = null) { return $this->requestSearchResult('get', '/v1/prices/search', $params, $opts); }
Search for prices you’ve previously created using Stripe’s <a href="/docs/search#search-query-language">Search Query Language</a>. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India. @param null|array{expand?: string[], limit?: int, page?: string, query: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\SearchResult<\Stripe\Price> @throws \Stripe\Exception\ApiErrorException if the request fails
search
php
stripe/stripe-php
lib/Service/PriceService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PriceService.php
MIT
public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/prices/%s', $id), $params, $opts); }
Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged. @param string $id @param null|array{active?: bool, currency_options?: null|\Stripe\StripeObject, expand?: string[], lookup_key?: string, metadata?: null|\Stripe\StripeObject, nickname?: string, tax_behavior?: string, transfer_lookup_key?: bool} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Price @throws \Stripe\Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Service/PriceService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PriceService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/payment_method_domains', $params, $opts); }
Lists the details of existing payment method domains. @param null|array{domain_name?: string, enabled?: bool, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\PaymentMethodDomain> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/PaymentMethodDomainService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentMethodDomainService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/payment_method_domains', $params, $opts); }
Creates a payment method domain. @param null|array{domain_name: string, enabled?: bool, expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\PaymentMethodDomain @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/PaymentMethodDomainService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentMethodDomainService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/payment_method_domains/%s', $id), $params, $opts); }
Retrieves the details of an existing payment method domain. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\PaymentMethodDomain @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/PaymentMethodDomainService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentMethodDomainService.php
MIT
public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/payment_method_domains/%s', $id), $params, $opts); }
Updates an existing payment method domain. @param string $id @param null|array{enabled?: bool, expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\PaymentMethodDomain @throws \Stripe\Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Service/PaymentMethodDomainService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentMethodDomainService.php
MIT
public function validate($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/payment_method_domains/%s/validate', $id), $params, $opts); }
Some payment methods might require additional steps to register a domain. If the requirements weren’t satisfied when the domain was created, the payment method will be inactive on the domain. The payment method doesn’t appear in Elements or Embedded Checkout for this domain until it is active. To activate a payment method on an existing payment method domain, complete the required registration steps specific to the payment method, and then validate the payment method domain with this endpoint. Related guides: <a href="/docs/payments/payment-methods/pmd-registration">Payment method domains</a>. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\PaymentMethodDomain @throws \Stripe\Exception\ApiErrorException if the request fails
validate
php
stripe/stripe-php
lib/Service/PaymentMethodDomainService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentMethodDomainService.php
MIT
public function getService($name) { $serviceClass = $this->getServiceClass($name); if (null !== $serviceClass) { if (!\array_key_exists($name, $this->services)) { $this->services[$name] = new $serviceClass($this->client); } return $this->services[$name]; } \trigger_error('Undefined property: ' . static::class . '::$' . $name); return null; }
@param string $name @return null|AbstractService|AbstractServiceFactory
getService
php
stripe/stripe-php
lib/Service/ServiceNavigatorTrait.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ServiceNavigatorTrait.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/reviews', $params, $opts); }
Returns a list of <code>Review</code> objects that have <code>open</code> set to <code>true</code>. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @param null|array{created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\Review> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/ReviewService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ReviewService.php
MIT
public function approve($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/reviews/%s/approve', $id), $params, $opts); }
Approves a <code>Review</code> object, closing it and removing it from the list of reviews. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Review @throws \Stripe\Exception\ApiErrorException if the request fails
approve
php
stripe/stripe-php
lib/Service/ReviewService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ReviewService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/reviews/%s', $id), $params, $opts); }
Retrieves a <code>Review</code> object. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Review @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/ReviewService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ReviewService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/subscription_items', $params, $opts); }
Returns a list of your subscription items for a given subscription. @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string, subscription: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\SubscriptionItem> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/SubscriptionItemService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SubscriptionItemService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/subscription_items', $params, $opts); }
Adds a new item to an existing subscription. No existing items will be changed or replaced. @param null|array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], metadata?: \Stripe\StripeObject, payment_behavior?: string, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, proration_behavior?: string, proration_date?: int, quantity?: int, subscription: string, tax_rates?: null|string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\SubscriptionItem @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/SubscriptionItemService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SubscriptionItemService.php
MIT
public function delete($id, $params = null, $opts = null) { return $this->request('delete', $this->buildPath('/v1/subscription_items/%s', $id), $params, $opts); }
Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription. @param string $id @param null|array{clear_usage?: bool, proration_behavior?: string, proration_date?: int} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\SubscriptionItem @throws \Stripe\Exception\ApiErrorException if the request fails
delete
php
stripe/stripe-php
lib/Service/SubscriptionItemService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SubscriptionItemService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/subscription_items/%s', $id), $params, $opts); }
Retrieves the subscription item with the given ID. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\SubscriptionItem @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/SubscriptionItemService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SubscriptionItemService.php
MIT
public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/subscription_items/%s', $id), $params, $opts); }
Updates the plan or quantity of an item on a current subscription. @param string $id @param null|array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], metadata?: null|\Stripe\StripeObject, off_session?: bool, payment_behavior?: string, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, proration_behavior?: string, proration_date?: int, quantity?: int, tax_rates?: null|string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\SubscriptionItem @throws \Stripe\Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Service/SubscriptionItemService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SubscriptionItemService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/file_links', $params, $opts); }
Returns a list of file links. @param null|array{created?: array|int, ending_before?: string, expand?: string[], expired?: bool, file?: string, limit?: int, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\FileLink> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/FileLinkService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/FileLinkService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/file_links', $params, $opts); }
Creates a new file link object. @param null|array{expand?: string[], expires_at?: int, file: string, metadata?: null|\Stripe\StripeObject} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\FileLink @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/FileLinkService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/FileLinkService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/file_links/%s', $id), $params, $opts); }
Retrieves the file link with the given ID. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\FileLink @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/FileLinkService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/FileLinkService.php
MIT
public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/file_links/%s', $id), $params, $opts); }
Updates an existing file link object. Expired links can no longer be updated. @param string $id @param null|array{expand?: string[], expires_at?: null|array|int|string, metadata?: null|\Stripe\StripeObject} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\FileLink @throws \Stripe\Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Service/FileLinkService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/FileLinkService.php
MIT
public function __construct($client) { $this->client = $client; $this->streamingClient = $client; }
Initializes a new instance of the {@link AbstractService} class. @param \Stripe\StripeClientInterface $client
__construct
php
stripe/stripe-php
lib/Service/AbstractService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AbstractService.php
MIT
public function getClient() { return $this->client; }
Gets the client used by this service to send requests. @return \Stripe\StripeClientInterface
getClient
php
stripe/stripe-php
lib/Service/AbstractService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AbstractService.php
MIT
public function getStreamingClient() { return $this->streamingClient; }
Gets the client used by this service to send requests. @return \Stripe\StripeStreamingClientInterface
getStreamingClient
php
stripe/stripe-php
lib/Service/AbstractService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AbstractService.php
MIT
private static function formatParams($params) { if (null === $params) { return null; } \array_walk_recursive($params, static function (&$value, $key) { if (null === $value) { $value = ''; } }); return $params; }
Translate null values to empty strings. For service methods, we interpret null as a request to unset the field, which corresponds to sending an empty string for the field to the API. @param null|array $params
formatParams
php
stripe/stripe-php
lib/Service/AbstractService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AbstractService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/tax_ids', $params, $opts); }
Returns a list of tax IDs. @param null|array{ending_before?: string, expand?: string[], limit?: int, owner?: array{account?: string, customer?: string, type: string}, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\TaxId> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/TaxIdService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/TaxIdService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/tax_ids', $params, $opts); }
Creates a new account or customer <code>tax_id</code> object. @param null|array{expand?: string[], owner?: array{account?: string, customer?: string, type: string}, type: string, value: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\TaxId @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/TaxIdService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/TaxIdService.php
MIT
public function delete($id, $params = null, $opts = null) { return $this->request('delete', $this->buildPath('/v1/tax_ids/%s', $id), $params, $opts); }
Deletes an existing account or customer <code>tax_id</code> object. @param string $id @param null|array $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\TaxId @throws \Stripe\Exception\ApiErrorException if the request fails
delete
php
stripe/stripe-php
lib/Service/TaxIdService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/TaxIdService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/tax_ids/%s', $id), $params, $opts); }
Retrieves an account or customer <code>tax_id</code> object. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\TaxId @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/TaxIdService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/TaxIdService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/mandates/%s', $id), $params, $opts); }
Retrieves a Mandate object. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Mandate @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/MandateService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/MandateService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/webhook_endpoints', $params, $opts); }
Returns a list of your webhook endpoints. @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\WebhookEndpoint> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/WebhookEndpointService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/WebhookEndpointService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/webhook_endpoints', $params, $opts); }
A webhook endpoint must have a <code>url</code> and a list of <code>enabled_events</code>. You may optionally specify the Boolean <code>connect</code> parameter. If set to true, then a Connect webhook endpoint that notifies the specified <code>url</code> about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified <code>url</code> only about events from your account is created. You can also create webhook endpoints in the <a href="https://dashboard.stripe.com/account/webhooks">webhooks settings</a> section of the Dashboard. @param null|array{api_version?: string, connect?: bool, description?: null|string, enabled_events: string[], expand?: string[], metadata?: null|\Stripe\StripeObject, url: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\WebhookEndpoint @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/WebhookEndpointService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/WebhookEndpointService.php
MIT
public function delete($id, $params = null, $opts = null) { return $this->request('delete', $this->buildPath('/v1/webhook_endpoints/%s', $id), $params, $opts); }
You can also delete webhook endpoints via the <a href="https://dashboard.stripe.com/account/webhooks">webhook endpoint management</a> page of the Stripe dashboard. @param string $id @param null|array $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\WebhookEndpoint @throws \Stripe\Exception\ApiErrorException if the request fails
delete
php
stripe/stripe-php
lib/Service/WebhookEndpointService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/WebhookEndpointService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/webhook_endpoints/%s', $id), $params, $opts); }
Retrieves the webhook endpoint with the given ID. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\WebhookEndpoint @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/WebhookEndpointService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/WebhookEndpointService.php
MIT
public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/webhook_endpoints/%s', $id), $params, $opts); }
Updates the webhook endpoint. You may edit the <code>url</code>, the list of <code>enabled_events</code>, and the status of your endpoint. @param string $id @param null|array{description?: null|string, disabled?: bool, enabled_events?: string[], expand?: string[], metadata?: null|\Stripe\StripeObject, url?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\WebhookEndpoint @throws \Stripe\Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Service/WebhookEndpointService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/WebhookEndpointService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/files', $params, $opts); }
Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top. @param null|array{created?: array|int, ending_before?: string, expand?: string[], limit?: int, purpose?: string, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\File> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/FileService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/FileService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/files/%s', $id), $params, $opts); }
Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to <a href="/docs/file-upload#download-file-contents">access file contents</a>. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\File @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/FileService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/FileService.php
MIT
public function create($params = null, $opts = null) { $opts = \Stripe\Util\RequestOptions::parse($opts); if (!isset($opts->apiBase)) { $opts->apiBase = $this->getClient()->getFilesBase(); } // Manually flatten params, otherwise curl's multipart encoder will // choke on nested null|arrays. $flatParams = \array_column(\Stripe\Util\Util::flattenParams($params), 1, 0); return $this->request('post', '/v1/files', $flatParams, $opts); }
Create a file. @param null|array $params @param null|array|\Stripe\Util\RequestOptions $opts @return \Stripe\File
create
php
stripe/stripe-php
lib/Service/FileService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/FileService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/coupons', $params, $opts); }
Returns a list of your coupons. @param null|array{created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\Coupon> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/CouponService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CouponService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/coupons', $params, $opts); }
You can create coupons easily via the <a href="https://dashboard.stripe.com/coupons">coupon management</a> page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly. A coupon has either a <code>percent_off</code> or an <code>amount_off</code> and <code>currency</code>. If you set an <code>amount_off</code>, that amount will be subtracted from any invoice’s subtotal. For example, an invoice with a subtotal of <currency>100</currency> will have a final total of <currency>0</currency> if a coupon with an <code>amount_off</code> of <amount>200</amount> is applied to it and an invoice with a subtotal of <currency>300</currency> will have a final total of <currency>100</currency> if a coupon with an <code>amount_off</code> of <amount>200</amount> is applied to it. @param null|array{amount_off?: int, applies_to?: array{products?: string[]}, currency?: string, currency_options?: \Stripe\StripeObject, duration?: string, duration_in_months?: int, expand?: string[], id?: string, max_redemptions?: int, metadata?: null|\Stripe\StripeObject, name?: string, percent_off?: float, redeem_by?: int} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Coupon @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/CouponService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CouponService.php
MIT
public function delete($id, $params = null, $opts = null) { return $this->request('delete', $this->buildPath('/v1/coupons/%s', $id), $params, $opts); }
You can delete coupons via the <a href="https://dashboard.stripe.com/coupons">coupon management</a> page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. You can also delete coupons via the API. @param string $id @param null|array $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Coupon @throws \Stripe\Exception\ApiErrorException if the request fails
delete
php
stripe/stripe-php
lib/Service/CouponService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CouponService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/coupons/%s', $id), $params, $opts); }
Retrieves the coupon with the given ID. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Coupon @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/CouponService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CouponService.php
MIT
public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/coupons/%s', $id), $params, $opts); }
Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable. @param string $id @param null|array{currency_options?: \Stripe\StripeObject, expand?: string[], metadata?: null|\Stripe\StripeObject, name?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Coupon @throws \Stripe\Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Service/CouponService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CouponService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/customer_sessions', $params, $opts); }
Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources. @param null|array{components: array{buy_button?: array{enabled: bool}, payment_element?: array{enabled: bool, features?: array{payment_method_allow_redisplay_filters?: string[], payment_method_redisplay?: string, payment_method_redisplay_limit?: int, payment_method_remove?: string, payment_method_save?: string, payment_method_save_usage?: string}}, pricing_table?: array{enabled: bool}}, customer: string, expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\CustomerSession @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/CustomerSessionService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerSessionService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/accounts', $params, $opts); }
Returns a list of accounts connected to your platform via <a href="/docs/connect">Connect</a>. If you’re not a platform, the list is empty. @param null|array{created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\Account> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/AccountService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountService.php
MIT
public function allCapabilities($parentId, $params = null, $opts = null) { return $this->requestCollection('get', $this->buildPath('/v1/accounts/%s/capabilities', $parentId), $params, $opts); }
Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first. @param string $parentId @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\Capability> @throws \Stripe\Exception\ApiErrorException if the request fails
allCapabilities
php
stripe/stripe-php
lib/Service/AccountService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountService.php
MIT
public function allExternalAccounts($parentId, $params = null, $opts = null) { return $this->requestCollection('get', $this->buildPath('/v1/accounts/%s/external_accounts', $parentId), $params, $opts); }
List external accounts for an account. @param string $parentId @param null|array{ending_before?: string, expand?: string[], limit?: int, object?: string, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\BankAccount|\Stripe\Card> @throws \Stripe\Exception\ApiErrorException if the request fails
allExternalAccounts
php
stripe/stripe-php
lib/Service/AccountService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountService.php
MIT
public function allPersons($parentId, $params = null, $opts = null) { return $this->requestCollection('get', $this->buildPath('/v1/accounts/%s/persons', $parentId), $params, $opts); }
Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first. @param string $parentId @param null|array{ending_before?: string, expand?: string[], limit?: int, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, representative?: bool}, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\Person> @throws \Stripe\Exception\ApiErrorException if the request fails
allPersons
php
stripe/stripe-php
lib/Service/AccountService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/accounts', $params, $opts); }
With <a href="/docs/connect">Connect</a>, you can create Stripe accounts for your users. To do this, you’ll first need to <a href="https://dashboard.stripe.com/account/applications/settings">register your platform</a>. If you’ve already collected information for your connected accounts, you <a href="/docs/connect/best-practices#onboarding">can prefill that information</a> when creating the account. Connect Onboarding won’t ask for the prefilled information during account onboarding. You can prefill any information on the account. @param null|array{account_token?: string, business_profile?: array{annual_revenue?: array{amount: int, currency: string, fiscal_year_end: string}, estimated_worker_count?: int, mcc?: string, minority_owned_business_designation?: string[], monthly_estimated_revenue?: array{amount: int, currency: string}, name?: string, product_description?: string, support_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, support_email?: string, support_phone?: string, support_url?: null|string, url?: string}, business_type?: string, capabilities?: array{acss_debit_payments?: array{requested?: bool}, affirm_payments?: array{requested?: bool}, afterpay_clearpay_payments?: array{requested?: bool}, alma_payments?: array{requested?: bool}, amazon_pay_payments?: array{requested?: bool}, au_becs_debit_payments?: array{requested?: bool}, bacs_debit_payments?: array{requested?: bool}, bancontact_payments?: array{requested?: bool}, bank_transfer_payments?: array{requested?: bool}, billie_payments?: array{requested?: bool}, blik_payments?: array{requested?: bool}, boleto_payments?: array{requested?: bool}, card_issuing?: array{requested?: bool}, card_payments?: array{requested?: bool}, cartes_bancaires_payments?: array{requested?: bool}, cashapp_payments?: array{requested?: bool}, eps_payments?: array{requested?: bool}, fpx_payments?: array{requested?: bool}, gb_bank_transfer_payments?: array{requested?: bool}, giropay_payments?: array{requested?: bool}, grabpay_payments?: array{requested?: bool}, ideal_payments?: array{requested?: bool}, india_international_payments?: array{requested?: bool}, jcb_payments?: array{requested?: bool}, jp_bank_transfer_payments?: array{requested?: bool}, kakao_pay_payments?: array{requested?: bool}, klarna_payments?: array{requested?: bool}, konbini_payments?: array{requested?: bool}, kr_card_payments?: array{requested?: bool}, legacy_payments?: array{requested?: bool}, link_payments?: array{requested?: bool}, mobilepay_payments?: array{requested?: bool}, multibanco_payments?: array{requested?: bool}, mx_bank_transfer_payments?: array{requested?: bool}, naver_pay_payments?: array{requested?: bool}, nz_bank_account_becs_debit_payments?: array{requested?: bool}, oxxo_payments?: array{requested?: bool}, p24_payments?: array{requested?: bool}, pay_by_bank_payments?: array{requested?: bool}, payco_payments?: array{requested?: bool}, paynow_payments?: array{requested?: bool}, promptpay_payments?: array{requested?: bool}, revolut_pay_payments?: array{requested?: bool}, samsung_pay_payments?: array{requested?: bool}, satispay_payments?: array{requested?: bool}, sepa_bank_transfer_payments?: array{requested?: bool}, sepa_debit_payments?: array{requested?: bool}, sofort_payments?: array{requested?: bool}, swish_payments?: array{requested?: bool}, tax_reporting_us_1099_k?: array{requested?: bool}, tax_reporting_us_1099_misc?: array{requested?: bool}, transfers?: array{requested?: bool}, treasury?: array{requested?: bool}, twint_payments?: array{requested?: bool}, us_bank_account_ach_payments?: array{requested?: bool}, us_bank_transfer_payments?: array{requested?: bool}, zip_payments?: array{requested?: bool}}, company?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, directors_provided?: bool, directorship_declaration?: array{date?: int, ip?: string, user_agent?: string}, executives_provided?: bool, export_license_id?: string, export_purpose_code?: string, name?: string, name_kana?: string, name_kanji?: string, owners_provided?: bool, ownership_declaration?: array{date?: int, ip?: string, user_agent?: string}, ownership_exemption_reason?: null|string, phone?: string, registration_date?: null|array{day: int, month: int, year: int}, registration_number?: string, structure?: null|string, tax_id?: string, tax_id_registrar?: string, vat_id?: string, verification?: array{document?: array{back?: string, front?: string}}}, controller?: array{fees?: array{payer?: string}, losses?: array{payments?: string}, requirement_collection?: string, stripe_dashboard?: array{type?: string}}, country?: string, default_currency?: string, documents?: array{bank_account_ownership_verification?: array{files?: string[]}, company_license?: array{files?: string[]}, company_memorandum_of_association?: array{files?: string[]}, company_ministerial_decree?: array{files?: string[]}, company_registration_verification?: array{files?: string[]}, company_tax_id_verification?: array{files?: string[]}, proof_of_registration?: array{files?: string[]}, proof_of_ultimate_beneficial_ownership?: array{files?: string[]}}, email?: string, expand?: string[], external_account?: array|string, groups?: array{payments_pricing?: null|string}, individual?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|\Stripe\StripeObject, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: null|float, title?: string}, ssn_last_4?: string, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, metadata?: null|\Stripe\StripeObject, settings?: array{bacs_debit_payments?: array{display_name?: string}, branding?: array{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}, card_issuing?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, card_payments?: array{decline_on?: array{avs_failure?: bool, cvc_failure?: bool}, statement_descriptor_prefix?: string, statement_descriptor_prefix_kana?: null|string, statement_descriptor_prefix_kanji?: null|string}, invoices?: array{hosted_payment_method_save?: string}, payments?: array{statement_descriptor?: string, statement_descriptor_kana?: string, statement_descriptor_kanji?: string}, payouts?: array{debit_negative_balances?: bool, schedule?: array{delay_days?: array|int|string, interval?: string, monthly_anchor?: int, weekly_anchor?: string}, statement_descriptor?: string}, treasury?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}}, tos_acceptance?: array{date?: int, ip?: string, service_agreement?: string, user_agent?: string}, type?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Account @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/AccountService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountService.php
MIT
public function createExternalAccount($parentId, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/accounts/%s/external_accounts', $parentId), $params, $opts); }
Create an external account for a given account. @param string $parentId @param null|array{default_for_currency?: bool, expand?: string[], external_account: array|string, metadata?: \Stripe\StripeObject} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\BankAccount|\Stripe\Card @throws \Stripe\Exception\ApiErrorException if the request fails
createExternalAccount
php
stripe/stripe-php
lib/Service/AccountService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountService.php
MIT
public function createLoginLink($parentId, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/accounts/%s/login_links', $parentId), $params, $opts); }
Creates a login link for a connected account to access the Express Dashboard. <strong>You can only create login links for accounts that use the <a href="/connect/express-dashboard">Express Dashboard</a> and are connected to your platform</strong>. @param string $parentId @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\LoginLink @throws \Stripe\Exception\ApiErrorException if the request fails
createLoginLink
php
stripe/stripe-php
lib/Service/AccountService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountService.php
MIT
public function createPerson($parentId, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/accounts/%s/persons', $parentId), $params, $opts); }
Creates a new person. @param string $parentId @param null|array{additional_tos_acceptances?: array{account?: array{date?: int, ip?: string, user_agent?: null|string}}, address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files?: string[]}, passport?: array{files?: string[]}, visa?: array{files?: string[]}}, email?: string, expand?: string[], first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|\Stripe\StripeObject, nationality?: string, person_token?: string, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: null|float, representative?: bool, title?: string}, ssn_last_4?: string, us_cfpb_data?: array{ethnicity_details?: array{ethnicity?: string[], ethnicity_other?: string}, race_details?: array{race?: string[], race_other?: string}, self_identified_gender?: string}, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Person @throws \Stripe\Exception\ApiErrorException if the request fails
createPerson
php
stripe/stripe-php
lib/Service/AccountService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountService.php
MIT
public function delete($id, $params = null, $opts = null) { return $this->request('delete', $this->buildPath('/v1/accounts/%s', $id), $params, $opts); }
With <a href="/connect">Connect</a>, you can delete accounts you manage. Test-mode accounts can be deleted at any time. Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all <a href="/api/balance/balance_object">balances</a> are zero. If you want to delete your own account, use the <a href="https://dashboard.stripe.com/settings/account">account information tab in your account settings</a> instead. @param string $id @param null|array $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Account @throws \Stripe\Exception\ApiErrorException if the request fails
delete
php
stripe/stripe-php
lib/Service/AccountService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountService.php
MIT
public function deleteExternalAccount($parentId, $id, $params = null, $opts = null) { return $this->request('delete', $this->buildPath('/v1/accounts/%s/external_accounts/%s', $parentId, $id), $params, $opts); }
Delete a specified external account for a given account. @param string $parentId @param string $id @param null|array $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\BankAccount|\Stripe\Card @throws \Stripe\Exception\ApiErrorException if the request fails
deleteExternalAccount
php
stripe/stripe-php
lib/Service/AccountService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountService.php
MIT
public function deletePerson($parentId, $id, $params = null, $opts = null) { return $this->request('delete', $this->buildPath('/v1/accounts/%s/persons/%s', $parentId, $id), $params, $opts); }
Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the <code>account_opener</code>. If your integration is using the <code>executive</code> parameter, you cannot delete the only verified <code>executive</code> on file. @param string $parentId @param string $id @param null|array $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Person @throws \Stripe\Exception\ApiErrorException if the request fails
deletePerson
php
stripe/stripe-php
lib/Service/AccountService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountService.php
MIT
public function reject($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/accounts/%s/reject', $id), $params, $opts); }
With <a href="/connect">Connect</a>, you can reject accounts that you have flagged as suspicious. Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero. @param string $id @param null|array{expand?: string[], reason: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Account @throws \Stripe\Exception\ApiErrorException if the request fails
reject
php
stripe/stripe-php
lib/Service/AccountService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountService.php
MIT
public function retrieveCapability($parentId, $id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/accounts/%s/capabilities/%s', $parentId, $id), $params, $opts); }
Retrieves information about the specified Account Capability. @param string $parentId @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Capability @throws \Stripe\Exception\ApiErrorException if the request fails
retrieveCapability
php
stripe/stripe-php
lib/Service/AccountService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountService.php
MIT
public function retrieveExternalAccount($parentId, $id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/accounts/%s/external_accounts/%s', $parentId, $id), $params, $opts); }
Retrieve a specified external account for a given account. @param string $parentId @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\BankAccount|\Stripe\Card @throws \Stripe\Exception\ApiErrorException if the request fails
retrieveExternalAccount
php
stripe/stripe-php
lib/Service/AccountService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountService.php
MIT
public function retrievePerson($parentId, $id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/accounts/%s/persons/%s', $parentId, $id), $params, $opts); }
Retrieves an existing person. @param string $parentId @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Person @throws \Stripe\Exception\ApiErrorException if the request fails
retrievePerson
php
stripe/stripe-php
lib/Service/AccountService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountService.php
MIT
public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/accounts/%s', $id), $params, $opts); }
Updates a <a href="/connect/accounts">connected account</a> by setting the values of the parameters passed. Any parameters not provided are left unchanged. For accounts where <a href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a> is <code>application</code>, which includes Custom accounts, you can update any information on the account. For accounts where <a href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a> is <code>stripe</code>, which includes Standard and Express accounts, you can update all information until you create an <a href="/api/account_links">Account Link</a> or <a href="/api/account_sessions">Account Session</a> to start Connect onboarding, after which some properties can no longer be updated. To update your own account, use the <a href="https://dashboard.stripe.com/settings/account">Dashboard</a>. Refer to our <a href="/docs/connect/updating-accounts">Connect</a> documentation to learn more about updating accounts. @param string $id @param null|array{account_token?: string, business_profile?: array{annual_revenue?: array{amount: int, currency: string, fiscal_year_end: string}, estimated_worker_count?: int, mcc?: string, minority_owned_business_designation?: string[], monthly_estimated_revenue?: array{amount: int, currency: string}, name?: string, product_description?: string, support_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, support_email?: string, support_phone?: string, support_url?: null|string, url?: string}, business_type?: string, capabilities?: array{acss_debit_payments?: array{requested?: bool}, affirm_payments?: array{requested?: bool}, afterpay_clearpay_payments?: array{requested?: bool}, alma_payments?: array{requested?: bool}, amazon_pay_payments?: array{requested?: bool}, au_becs_debit_payments?: array{requested?: bool}, bacs_debit_payments?: array{requested?: bool}, bancontact_payments?: array{requested?: bool}, bank_transfer_payments?: array{requested?: bool}, billie_payments?: array{requested?: bool}, blik_payments?: array{requested?: bool}, boleto_payments?: array{requested?: bool}, card_issuing?: array{requested?: bool}, card_payments?: array{requested?: bool}, cartes_bancaires_payments?: array{requested?: bool}, cashapp_payments?: array{requested?: bool}, eps_payments?: array{requested?: bool}, fpx_payments?: array{requested?: bool}, gb_bank_transfer_payments?: array{requested?: bool}, giropay_payments?: array{requested?: bool}, grabpay_payments?: array{requested?: bool}, ideal_payments?: array{requested?: bool}, india_international_payments?: array{requested?: bool}, jcb_payments?: array{requested?: bool}, jp_bank_transfer_payments?: array{requested?: bool}, kakao_pay_payments?: array{requested?: bool}, klarna_payments?: array{requested?: bool}, konbini_payments?: array{requested?: bool}, kr_card_payments?: array{requested?: bool}, legacy_payments?: array{requested?: bool}, link_payments?: array{requested?: bool}, mobilepay_payments?: array{requested?: bool}, multibanco_payments?: array{requested?: bool}, mx_bank_transfer_payments?: array{requested?: bool}, naver_pay_payments?: array{requested?: bool}, nz_bank_account_becs_debit_payments?: array{requested?: bool}, oxxo_payments?: array{requested?: bool}, p24_payments?: array{requested?: bool}, pay_by_bank_payments?: array{requested?: bool}, payco_payments?: array{requested?: bool}, paynow_payments?: array{requested?: bool}, promptpay_payments?: array{requested?: bool}, revolut_pay_payments?: array{requested?: bool}, samsung_pay_payments?: array{requested?: bool}, satispay_payments?: array{requested?: bool}, sepa_bank_transfer_payments?: array{requested?: bool}, sepa_debit_payments?: array{requested?: bool}, sofort_payments?: array{requested?: bool}, swish_payments?: array{requested?: bool}, tax_reporting_us_1099_k?: array{requested?: bool}, tax_reporting_us_1099_misc?: array{requested?: bool}, transfers?: array{requested?: bool}, treasury?: array{requested?: bool}, twint_payments?: array{requested?: bool}, us_bank_account_ach_payments?: array{requested?: bool}, us_bank_transfer_payments?: array{requested?: bool}, zip_payments?: array{requested?: bool}}, company?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, directors_provided?: bool, directorship_declaration?: array{date?: int, ip?: string, user_agent?: string}, executives_provided?: bool, export_license_id?: string, export_purpose_code?: string, name?: string, name_kana?: string, name_kanji?: string, owners_provided?: bool, ownership_declaration?: array{date?: int, ip?: string, user_agent?: string}, ownership_exemption_reason?: null|string, phone?: string, registration_date?: null|array{day: int, month: int, year: int}, registration_number?: string, structure?: null|string, tax_id?: string, tax_id_registrar?: string, vat_id?: string, verification?: array{document?: array{back?: string, front?: string}}}, default_currency?: string, documents?: array{bank_account_ownership_verification?: array{files?: string[]}, company_license?: array{files?: string[]}, company_memorandum_of_association?: array{files?: string[]}, company_ministerial_decree?: array{files?: string[]}, company_registration_verification?: array{files?: string[]}, company_tax_id_verification?: array{files?: string[]}, proof_of_registration?: array{files?: string[]}, proof_of_ultimate_beneficial_ownership?: array{files?: string[]}}, email?: string, expand?: string[], external_account?: null|array|string, groups?: array{payments_pricing?: null|string}, individual?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, email?: string, first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|\Stripe\StripeObject, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{director?: bool, executive?: bool, owner?: bool, percent_ownership?: null|float, title?: string}, ssn_last_4?: string, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}}, metadata?: null|\Stripe\StripeObject, settings?: array{bacs_debit_payments?: array{display_name?: string}, branding?: array{icon?: string, logo?: string, primary_color?: string, secondary_color?: string}, card_issuing?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}, card_payments?: array{decline_on?: array{avs_failure?: bool, cvc_failure?: bool}, statement_descriptor_prefix?: string, statement_descriptor_prefix_kana?: null|string, statement_descriptor_prefix_kanji?: null|string}, invoices?: array{default_account_tax_ids?: null|string[], hosted_payment_method_save?: string}, payments?: array{statement_descriptor?: string, statement_descriptor_kana?: string, statement_descriptor_kanji?: string}, payouts?: array{debit_negative_balances?: bool, schedule?: array{delay_days?: array|int|string, interval?: string, monthly_anchor?: int, weekly_anchor?: string}, statement_descriptor?: string}, treasury?: array{tos_acceptance?: array{date?: int, ip?: string, user_agent?: null|string}}}, tos_acceptance?: array{date?: int, ip?: string, service_agreement?: string, user_agent?: string}} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Account @throws \Stripe\Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Service/AccountService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountService.php
MIT
public function updateCapability($parentId, $id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/accounts/%s/capabilities/%s', $parentId, $id), $params, $opts); }
Updates an existing Account Capability. Request or remove a capability by updating its <code>requested</code> parameter. @param string $parentId @param string $id @param null|array{expand?: string[], requested?: bool} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Capability @throws \Stripe\Exception\ApiErrorException if the request fails
updateCapability
php
stripe/stripe-php
lib/Service/AccountService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountService.php
MIT
public function updateExternalAccount($parentId, $id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/accounts/%s/external_accounts/%s', $parentId, $id), $params, $opts); }
Updates the metadata, account holder name, account holder type of a bank account belonging to a connected account and optionally sets it as the default for its currency. Other bank account details are not editable by design. You can only update bank accounts when <a href="/api/accounts/object#account_object-controller-requirement_collection">account.controller.requirement_collection</a> is <code>application</code>, which includes <a href="/connect/custom-accounts">Custom accounts</a>. You can re-enable a disabled bank account by performing an update call without providing any arguments or changes. @param string $parentId @param string $id @param null|array{account_holder_name?: string, account_holder_type?: null|string, account_type?: string, address_city?: string, address_country?: string, address_line1?: string, address_line2?: string, address_state?: string, address_zip?: string, default_for_currency?: bool, documents?: array{bank_account_ownership_verification?: array{files?: string[]}}, exp_month?: string, exp_year?: string, expand?: string[], metadata?: null|\Stripe\StripeObject, name?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\BankAccount|\Stripe\Card @throws \Stripe\Exception\ApiErrorException if the request fails
updateExternalAccount
php
stripe/stripe-php
lib/Service/AccountService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountService.php
MIT
public function updatePerson($parentId, $id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/accounts/%s/persons/%s', $parentId, $id), $params, $opts); }
Updates an existing person. @param string $parentId @param string $id @param null|array{additional_tos_acceptances?: array{account?: array{date?: int, ip?: string, user_agent?: null|string}}, address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, address_kana?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, address_kanji?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string, town?: string}, dob?: null|array{day: int, month: int, year: int}, documents?: array{company_authorization?: array{files?: string[]}, passport?: array{files?: string[]}, visa?: array{files?: string[]}}, email?: string, expand?: string[], first_name?: string, first_name_kana?: string, first_name_kanji?: string, full_name_aliases?: null|string[], gender?: string, id_number?: string, id_number_secondary?: string, last_name?: string, last_name_kana?: string, last_name_kanji?: string, maiden_name?: string, metadata?: null|\Stripe\StripeObject, nationality?: string, person_token?: string, phone?: string, political_exposure?: string, registered_address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, relationship?: array{authorizer?: bool, director?: bool, executive?: bool, legal_guardian?: bool, owner?: bool, percent_ownership?: null|float, representative?: bool, title?: string}, ssn_last_4?: string, us_cfpb_data?: array{ethnicity_details?: array{ethnicity?: string[], ethnicity_other?: string}, race_details?: array{race?: string[], race_other?: string}, self_identified_gender?: string}, verification?: array{additional_document?: array{back?: string, front?: string}, document?: array{back?: string, front?: string}}} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Person @throws \Stripe\Exception\ApiErrorException if the request fails
updatePerson
php
stripe/stripe-php
lib/Service/AccountService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountService.php
MIT
public function retrieve($id = null, $params = null, $opts = null) { if (null === $id) { return $this->request('get', '/v1/account', $params, $opts); } return $this->request('get', $this->buildPath('/v1/accounts/%s', $id), $params, $opts); }
Retrieves the details of an account. @param null|string $id @param null|array $params @param null|array|\Stripe\Util\RequestOptions $opts @return \Stripe\Account @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/AccountService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AccountService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/payment_links', $params, $opts); }
Returns a list of your payment links. @param null|array{active?: bool, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\PaymentLink> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/PaymentLinkService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentLinkService.php
MIT
public function allLineItems($id, $params = null, $opts = null) { return $this->requestCollection('get', $this->buildPath('/v1/payment_links/%s/line_items', $id), $params, $opts); }
When retrieving a payment link, there is an includable <strong>line_items</strong> property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @param string $id @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\LineItem> @throws \Stripe\Exception\ApiErrorException if the request fails
allLineItems
php
stripe/stripe-php
lib/Service/PaymentLinkService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentLinkService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/payment_links', $params, $opts); }
Creates a payment link. @param null|array{after_completion?: array{hosted_confirmation?: array{custom_message?: string}, redirect?: array{url: string}, type: string}, allow_promotion_codes?: bool, application_fee_amount?: int, application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, consent_collection?: array{payment_method_reuse_agreement?: array{position: string}, promotions?: string, terms_of_service?: string}, currency?: string, custom_fields?: array{dropdown?: array{default_value?: string, options: array{label: string, value: string}[]}, key: string, label: array{custom: string, type: string}, numeric?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, optional?: bool, text?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, type: string}[], custom_text?: array{after_submit?: null|array{message: string}, shipping_address?: null|array{message: string}, submit?: null|array{message: string}, terms_of_service_acceptance?: null|array{message: string}}, customer_creation?: string, expand?: string[], inactive_message?: string, invoice_creation?: array{enabled: bool, invoice_data?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|\Stripe\StripeObject, rendering_options?: null|array{amount_tax_display?: null|string}}}, line_items: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price: string, quantity: int}[], metadata?: \Stripe\StripeObject, on_behalf_of?: string, optional_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, price: string, quantity: int}[], payment_intent_data?: array{capture_method?: string, description?: string, metadata?: \Stripe\StripeObject, setup_future_usage?: string, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_group?: string}, payment_method_collection?: string, payment_method_types?: string[], phone_number_collection?: array{enabled: bool}, restrictions?: array{completed_sessions: array{limit: int}}, shipping_address_collection?: array{allowed_countries: string[]}, shipping_options?: array{shipping_rate?: string}[], submit_type?: string, subscription_data?: array{description?: string, invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: \Stripe\StripeObject, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}}, tax_id_collection?: array{enabled: bool, required?: string}, transfer_data?: array{amount?: int, destination: string}} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\PaymentLink @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/PaymentLinkService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentLinkService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/payment_links/%s', $id), $params, $opts); }
Retrieve a payment link. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\PaymentLink @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/PaymentLinkService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentLinkService.php
MIT
public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/payment_links/%s', $id), $params, $opts); }
Updates a payment link. @param string $id @param null|array{active?: bool, after_completion?: array{hosted_confirmation?: array{custom_message?: string}, redirect?: array{url: string}, type: string}, allow_promotion_codes?: bool, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_address_collection?: string, custom_fields?: null|array{dropdown?: array{default_value?: string, options: array{label: string, value: string}[]}, key: string, label: array{custom: string, type: string}, numeric?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, optional?: bool, text?: array{default_value?: string, maximum_length?: int, minimum_length?: int}, type: string}[], custom_text?: array{after_submit?: null|array{message: string}, shipping_address?: null|array{message: string}, submit?: null|array{message: string}, terms_of_service_acceptance?: null|array{message: string}}, customer_creation?: string, expand?: string[], inactive_message?: null|string, invoice_creation?: array{enabled: bool, invoice_data?: array{account_tax_ids?: null|string[], custom_fields?: null|array{name: string, value: string}[], description?: string, footer?: string, issuer?: array{account?: string, type: string}, metadata?: null|\Stripe\StripeObject, rendering_options?: null|array{amount_tax_display?: null|string}}}, line_items?: array{adjustable_quantity?: array{enabled: bool, maximum?: int, minimum?: int}, id: string, quantity?: int}[], metadata?: \Stripe\StripeObject, payment_intent_data?: array{description?: null|string, metadata?: null|\Stripe\StripeObject, statement_descriptor?: null|string, statement_descriptor_suffix?: null|string, transfer_group?: null|string}, payment_method_collection?: string, payment_method_types?: null|string[], phone_number_collection?: array{enabled: bool}, restrictions?: null|array{completed_sessions: array{limit: int}}, shipping_address_collection?: null|array{allowed_countries: string[]}, submit_type?: string, subscription_data?: array{invoice_settings?: array{issuer?: array{account?: string, type: string}}, metadata?: null|\Stripe\StripeObject, trial_period_days?: null|int, trial_settings?: null|array{end_behavior: array{missing_payment_method: string}}}, tax_id_collection?: array{enabled: bool, required?: string}} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\PaymentLink @throws \Stripe\Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Service/PaymentLinkService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentLinkService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/application_fees', $params, $opts); }
Returns a list of application fees you’ve previously collected. The application fees are returned in sorted order, with the most recent fees appearing first. @param null|array{charge?: string, created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\ApplicationFee> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/ApplicationFeeService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ApplicationFeeService.php
MIT
public function allRefunds($parentId, $params = null, $opts = null) { return $this->requestCollection('get', $this->buildPath('/v1/application_fees/%s/refunds', $parentId), $params, $opts); }
You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the <code>limit</code> and <code>starting_after</code> parameters to page through additional refunds. @param string $parentId @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\ApplicationFeeRefund> @throws \Stripe\Exception\ApiErrorException if the request fails
allRefunds
php
stripe/stripe-php
lib/Service/ApplicationFeeService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ApplicationFeeService.php
MIT
public function createRefund($parentId, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/application_fees/%s/refunds', $parentId), $params, $opts); }
Refunds an application fee that has previously been collected but not yet refunded. Funds will be refunded to the Stripe account from which the fee was originally collected. You can optionally refund only part of an application fee. You can do so multiple times, until the entire fee has been refunded. Once entirely refunded, an application fee can’t be refunded again. This method will raise an error when called on an already-refunded application fee, or when trying to refund more money than is left on an application fee. @param string $parentId @param null|array{amount?: int, expand?: string[], metadata?: \Stripe\StripeObject} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\ApplicationFeeRefund @throws \Stripe\Exception\ApiErrorException if the request fails
createRefund
php
stripe/stripe-php
lib/Service/ApplicationFeeService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ApplicationFeeService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/application_fees/%s', $id), $params, $opts); }
Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\ApplicationFee @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/ApplicationFeeService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ApplicationFeeService.php
MIT
public function retrieveRefund($parentId, $id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/application_fees/%s/refunds/%s', $parentId, $id), $params, $opts); }
By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee. @param string $parentId @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\ApplicationFeeRefund @throws \Stripe\Exception\ApiErrorException if the request fails
retrieveRefund
php
stripe/stripe-php
lib/Service/ApplicationFeeService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ApplicationFeeService.php
MIT
public function updateRefund($parentId, $id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/application_fees/%s/refunds/%s', $parentId, $id), $params, $opts); }
Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request only accepts metadata as an argument. @param string $parentId @param string $id @param null|array{expand?: string[], metadata?: null|\Stripe\StripeObject} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\ApplicationFeeRefund @throws \Stripe\Exception\ApiErrorException if the request fails
updateRefund
php
stripe/stripe-php
lib/Service/ApplicationFeeService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ApplicationFeeService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/subscriptions', $params, $opts); }
By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify <code>status=canceled</code>. @param null|array{automatic_tax?: array{enabled: bool}, collection_method?: string, created?: array|int, current_period_end?: array|int, current_period_start?: array|int, customer?: string, ending_before?: string, expand?: string[], limit?: int, plan?: string, price?: string, starting_after?: string, status?: string, test_clock?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\Subscription> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/SubscriptionService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SubscriptionService.php
MIT
public function cancel($id, $params = null, $opts = null) { return $this->request('delete', $this->buildPath('/v1/subscriptions/%s', $id), $params, $opts); }
Cancels a customer’s subscription immediately. The customer won’t be charged again for the subscription. After it’s canceled, you can no longer update the subscription or its <a href="/metadata">metadata</a>. Any pending invoice items that you’ve created are still charged at the end of the period, unless manually <a href="#delete_invoiceitem">deleted</a>. If you’ve set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if <code>invoice_now</code> and <code>prorate</code> are both set to true. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. @param string $id @param null|array{cancellation_details?: array{comment?: null|string, feedback?: null|string}, expand?: string[], invoice_now?: bool, prorate?: bool} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Subscription @throws \Stripe\Exception\ApiErrorException if the request fails
cancel
php
stripe/stripe-php
lib/Service/SubscriptionService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SubscriptionService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/subscriptions', $params, $opts); }
Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions. When you create a subscription with <code>collection_method=charge_automatically</code>, the first invoice is finalized as part of the request. The <code>payment_behavior</code> parameter determines the exact behavior of the initial payment. To start subscriptions where the first invoice always begins in a <code>draft</code> status, use <a href="/docs/billing/subscriptions/subscription-schedules#managing">subscription schedules</a> instead. Schedules provide the flexibility to model more complex billing configurations that change over time. @param null|array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, backdate_start_date?: int, billing_cycle_anchor?: int, billing_cycle_anchor_config?: array{day_of_month: int, hour?: int, minute?: int, month?: int, second?: int}, cancel_at?: int, cancel_at_period_end?: bool, collection_method?: string, currency?: string, customer: string, days_until_due?: int, default_payment_method?: string, default_source?: string, default_tax_rates?: null|string[], description?: string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_settings?: array{account_tax_ids?: null|string[], issuer?: array{account?: string, type: string}}, items?: (array{discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], metadata?: \Stripe\StripeObject, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: null|\Stripe\StripeObject, off_session?: bool, on_behalf_of?: null|string, payment_behavior?: string, payment_settings?: array{payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, card?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string}, network?: string, request_three_d_secure?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, type?: string}, funding_type?: string}, konbini?: null|array{}, sepa_debit?: null|array{}, us_bank_account?: null|array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[]}, verification_method?: string}}, payment_method_types?: null|string[], save_default_payment_method?: string}, pending_invoice_item_interval?: null|array{interval: string, interval_count?: int}, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial_end?: array|int|string, trial_from_plan?: bool, trial_period_days?: int, trial_settings?: array{end_behavior: array{missing_payment_method: string}}} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Subscription @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/SubscriptionService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SubscriptionService.php
MIT
public function deleteDiscount($id, $params = null, $opts = null) { return $this->request('delete', $this->buildPath('/v1/subscriptions/%s/discount', $id), $params, $opts); }
Removes the currently applied discount on a subscription. @param string $id @param null|array $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Discount @throws \Stripe\Exception\ApiErrorException if the request fails
deleteDiscount
php
stripe/stripe-php
lib/Service/SubscriptionService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SubscriptionService.php
MIT
public function resume($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/subscriptions/%s/resume', $id), $params, $opts); }
Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become <code>active</code>, and if payment fails the subscription will be <code>past_due</code>. The resumption invoice will void automatically if not paid by the expiration date. @param string $id @param null|array{billing_cycle_anchor?: string, expand?: string[], proration_behavior?: string, proration_date?: int} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Subscription @throws \Stripe\Exception\ApiErrorException if the request fails
resume
php
stripe/stripe-php
lib/Service/SubscriptionService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SubscriptionService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/subscriptions/%s', $id), $params, $opts); }
Retrieves the subscription with the given ID. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Subscription @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/SubscriptionService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SubscriptionService.php
MIT
public function search($params = null, $opts = null) { return $this->requestSearchResult('get', '/v1/subscriptions/search', $params, $opts); }
Search for subscriptions you’ve previously created using Stripe’s <a href="/docs/search#search-query-language">Search Query Language</a>. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India. @param null|array{expand?: string[], limit?: int, page?: string, query: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\SearchResult<\Stripe\Subscription> @throws \Stripe\Exception\ApiErrorException if the request fails
search
php
stripe/stripe-php
lib/Service/SubscriptionService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SubscriptionService.php
MIT
public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/subscriptions/%s', $id), $params, $opts); }
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 <a href="/docs/api/invoices/create_preview">create preview</a> endpoint. By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a <currency>100</currency> price, they’ll be billed <currency>100</currency> immediately. If on May 15 they switch to a <currency>200</currency> price, then on June 1 they’ll be billed <currency>250</currency> (<currency>200</currency> for a renewal of her subscription, plus a <currency>50</currency> prorating adjustment for half of the previous month’s <currency>100</currency> difference). Similarly, a downgrade generates a credit that is applied to the next invoice. We also prorate when you make quantity changes. Switching prices does not normally change the billing date or generate an immediate charge unless: <ul> <li>The billing interval is changed (for example, from monthly to yearly).</li> <li>The subscription moves from free to paid.</li> <li>A trial starts or ends.</li> </ul> In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how <a href="/docs/billing/subscriptions/upgrade-downgrade#immediate-payment">Stripe immediately attempts payment for subscription changes</a>. If you want to charge for an upgrade immediately, pass <code>proration_behavior</code> as <code>always_invoice</code> to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass <code>create_prorations</code>, 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 <a href="/docs/api/invoices/create">invoice the customer</a>. If you don’t want to prorate, set the <code>proration_behavior</code> option to <code>none</code>. With this option, the customer is billed <currency>100</currency> on May 1 and <currency>200</currency> on June 1. Similarly, if you set <code>proration_behavior</code> to <code>none</code> 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 <a href="/docs/rate-limits">rate limiting</a>. If you need to bill for a frequently changing quantity, consider integrating <a href="/docs/billing/subscriptions/usage-based">usage-based billing</a> instead. @param string $id @param null|array{add_invoice_items?: (array{discounts?: array{coupon?: string, discount?: string, promotion_code?: string}[], price?: string, price_data?: array{currency: string, product: string, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], application_fee_percent?: null|float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, cancel_at?: null|int, cancel_at_period_end?: bool, cancellation_details?: array{comment?: null|string, feedback?: null|string}, collection_method?: string, days_until_due?: int, default_payment_method?: string, default_source?: null|string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], expand?: string[], invoice_settings?: array{account_tax_ids?: null|string[], issuer?: array{account?: string, type: string}}, items?: (array{clear_usage?: bool, deleted?: bool, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], id?: string, metadata?: null|\Stripe\StripeObject, plan?: string, price?: string, price_data?: array{currency: string, product: string, recurring: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, quantity?: int, tax_rates?: null|string[]})[], metadata?: null|\Stripe\StripeObject, off_session?: bool, on_behalf_of?: null|string, pause_collection?: null|array{behavior: string, resumes_at?: int}, payment_behavior?: string, payment_settings?: array{payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{transaction_type?: string}, verification_method?: string}, bancontact?: null|array{preferred_language?: string}, card?: null|array{mandate_options?: array{amount?: int, amount_type?: string, description?: string}, network?: string, request_three_d_secure?: string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, type?: string}, funding_type?: string}, konbini?: null|array{}, sepa_debit?: null|array{}, us_bank_account?: null|array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[]}, verification_method?: string}}, payment_method_types?: null|string[], save_default_payment_method?: string}, pending_invoice_item_interval?: null|array{interval: string, interval_count?: int}, proration_behavior?: string, proration_date?: int, transfer_data?: null|array{amount_percent?: float, destination: string}, trial_end?: array|int|string, trial_from_plan?: bool, trial_settings?: array{end_behavior: array{missing_payment_method: string}}} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Subscription @throws \Stripe\Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Service/SubscriptionService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SubscriptionService.php
MIT
public function allSourceTransactions($id, $params = null, $opts = null) { return $this->requestCollection('get', $this->buildPath('/v1/sources/%s/source_transactions', $id), $params, $opts); }
List source transactions for a given source. @param string $id @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\SourceTransaction> @throws \Stripe\Exception\ApiErrorException if the request fails
allSourceTransactions
php
stripe/stripe-php
lib/Service/SourceService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SourceService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/sources', $params, $opts); }
Creates a new source object. @param null|array{amount?: int, currency?: string, customer?: string, expand?: string[], flow?: string, mandate?: array{acceptance?: array{date?: int, ip?: string, offline?: array{contact_email: string}, online?: array{date?: int, ip?: string, user_agent?: string}, status: string, type?: string, user_agent?: string}, amount?: null|int, currency?: string, interval?: string, notification_method?: string}, metadata?: \Stripe\StripeObject, original_source?: string, owner?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: string, name?: string, phone?: string}, receiver?: array{refund_attributes_method?: string}, redirect?: array{return_url: string}, source_order?: array{items?: array{amount?: int, currency?: string, description?: string, parent?: string, quantity?: int, type?: string}[], shipping?: array{address: array{city?: string, country?: string, line1: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name?: string, phone?: string, tracking_number?: string}}, statement_descriptor?: string, token?: string, type?: string, usage?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Source @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/SourceService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SourceService.php
MIT
public function detach($parentId, $id, $params = null, $opts = null) { return $this->request('delete', $this->buildPath('/v1/customers/%s/sources/%s', $parentId, $id), $params, $opts); }
Delete a specified source for a given customer. @param string $parentId @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source @throws \Stripe\Exception\ApiErrorException if the request fails
detach
php
stripe/stripe-php
lib/Service/SourceService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SourceService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/sources/%s', $id), $params, $opts); }
Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information. @param string $id @param null|array{client_secret?: string, expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Source @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/SourceService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SourceService.php
MIT
public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/sources/%s', $id), $params, $opts); }
Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request accepts the <code>metadata</code> and <code>owner</code> as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our <a href="/docs/sources">payment method guides</a> for more detail. @param string $id @param null|array{amount?: int, expand?: string[], mandate?: array{acceptance?: array{date?: int, ip?: string, offline?: array{contact_email: string}, online?: array{date?: int, ip?: string, user_agent?: string}, status: string, type?: string, user_agent?: string}, amount?: null|int, currency?: string, interval?: string, notification_method?: string}, metadata?: null|\Stripe\StripeObject, owner?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: string, name?: string, phone?: string}, source_order?: array{items?: array{amount?: int, currency?: string, description?: string, parent?: string, quantity?: int, type?: string}[], shipping?: array{address: array{city?: string, country?: string, line1: string, line2?: string, postal_code?: string, state?: string}, carrier?: string, name?: string, phone?: string, tracking_number?: string}}} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Source @throws \Stripe\Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Service/SourceService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SourceService.php
MIT
public function verify($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/sources/%s/verify', $id), $params, $opts); }
Verify a given source. @param string $id @param null|array{expand?: string[], values: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Source @throws \Stripe\Exception\ApiErrorException if the request fails
verify
php
stripe/stripe-php
lib/Service/SourceService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SourceService.php
MIT