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 all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/topups', $params, $opts); }
Returns a list of top-ups. @param null|array{amount?: array|int, created?: array|int, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, status?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\Topup> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/TopupService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/TopupService.php
MIT
public function cancel($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/topups/%s/cancel', $id), $params, $opts); }
Cancels a top-up. Only pending top-ups can be canceled. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Topup @throws \Stripe\Exception\ApiErrorException if the request fails
cancel
php
stripe/stripe-php
lib/Service/TopupService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/TopupService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/topups', $params, $opts); }
Top up the balance of an account. @param null|array{amount: int, currency: string, description?: string, expand?: string[], metadata?: null|\Stripe\StripeObject, source?: string, statement_descriptor?: string, transfer_group?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Topup @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/TopupService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/TopupService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/topups/%s', $id), $params, $opts); }
Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Topup @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/TopupService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/TopupService.php
MIT
public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/topups/%s', $id), $params, $opts); }
Updates the metadata of a top-up. Other top-up details are not editable by design. @param string $id @param null|array{description?: string, expand?: string[], metadata?: null|\Stripe\StripeObject} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Topup @throws \Stripe\Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Service/TopupService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/TopupService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/products', $params, $opts); }
Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first. @param null|array{active?: bool, created?: array|int, ending_before?: string, expand?: string[], ids?: string[], limit?: int, shippable?: bool, starting_after?: string, type?: string, url?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\Product> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/ProductService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ProductService.php
MIT
public function allFeatures($parentId, $params = null, $opts = null) { return $this->requestCollection('get', $this->buildPath('/v1/products/%s/features', $parentId), $params, $opts); }
Retrieve a list of features for a product. @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\ProductFeature> @throws \Stripe\Exception\ApiErrorException if the request fails
allFeatures
php
stripe/stripe-php
lib/Service/ProductService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ProductService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/products', $params, $opts); }
Creates a new product object. @param null|array{active?: bool, default_price_data?: array{currency: string, currency_options?: \Stripe\StripeObject, custom_unit_amount?: array{enabled: bool, maximum?: int, minimum?: int, preset?: int}, metadata?: \Stripe\StripeObject, recurring?: array{interval: string, interval_count?: int}, tax_behavior?: string, unit_amount?: int, unit_amount_decimal?: string}, description?: string, expand?: string[], id?: string, images?: string[], marketing_features?: array{name: string}[], metadata?: \Stripe\StripeObject, name: string, package_dimensions?: array{height: float, length: float, weight: float, width: float}, shippable?: bool, statement_descriptor?: string, tax_code?: string, type?: string, unit_label?: string, url?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Product @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/ProductService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ProductService.php
MIT
public function createFeature($parentId, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/products/%s/features', $parentId), $params, $opts); }
Creates a product_feature, which represents a feature attachment to a product. @param string $parentId @param null|array{entitlement_feature: string, expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\ProductFeature @throws \Stripe\Exception\ApiErrorException if the request fails
createFeature
php
stripe/stripe-php
lib/Service/ProductService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ProductService.php
MIT
public function delete($id, $params = null, $opts = null) { return $this->request('delete', $this->buildPath('/v1/products/%s', $id), $params, $opts); }
Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with <code>type=good</code> is only possible if it has no SKUs associated with it. @param string $id @param null|array $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Product @throws \Stripe\Exception\ApiErrorException if the request fails
delete
php
stripe/stripe-php
lib/Service/ProductService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ProductService.php
MIT
public function deleteFeature($parentId, $id, $params = null, $opts = null) { return $this->request('delete', $this->buildPath('/v1/products/%s/features/%s', $parentId, $id), $params, $opts); }
Deletes the feature attachment to a product. @param string $parentId @param string $id @param null|array $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\ProductFeature @throws \Stripe\Exception\ApiErrorException if the request fails
deleteFeature
php
stripe/stripe-php
lib/Service/ProductService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ProductService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/products/%s', $id), $params, $opts); }
Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Product @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/ProductService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ProductService.php
MIT
public function retrieveFeature($parentId, $id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/products/%s/features/%s', $parentId, $id), $params, $opts); }
Retrieves a product_feature, which represents a feature attachment to a product. @param string $parentId @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\ProductFeature @throws \Stripe\Exception\ApiErrorException if the request fails
retrieveFeature
php
stripe/stripe-php
lib/Service/ProductService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ProductService.php
MIT
public function search($params = null, $opts = null) { return $this->requestSearchResult('get', '/v1/products/search', $params, $opts); }
Search for products 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\Product> @throws \Stripe\Exception\ApiErrorException if the request fails
search
php
stripe/stripe-php
lib/Service/ProductService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ProductService.php
MIT
public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/products/%s', $id), $params, $opts); }
Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @param string $id @param null|array{active?: bool, default_price?: string, description?: null|string, expand?: string[], images?: null|string[], marketing_features?: null|array{name: string}[], metadata?: null|\Stripe\StripeObject, name?: string, package_dimensions?: null|array{height: float, length: float, weight: float, width: float}, shippable?: bool, statement_descriptor?: string, tax_code?: null|string, unit_label?: null|string, url?: null|string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Product @throws \Stripe\Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Service/ProductService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ProductService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/country_specs', $params, $opts); }
Lists all Country Spec objects available in the API. @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\CountrySpec> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/CountrySpecService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CountrySpecService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/country_specs/%s', $id), $params, $opts); }
Returns a Country Spec for a given Country code. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\CountrySpec @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/CountrySpecService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CountrySpecService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/payment_method_configurations', $params, $opts); }
List payment method configurations. @param null|array{application?: null|string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\PaymentMethodConfiguration> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/PaymentMethodConfigurationService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentMethodConfigurationService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/payment_method_configurations', $params, $opts); }
Creates a payment method configuration. @param null|array{acss_debit?: array{display_preference?: array{preference?: string}}, affirm?: array{display_preference?: array{preference?: string}}, afterpay_clearpay?: array{display_preference?: array{preference?: string}}, alipay?: array{display_preference?: array{preference?: string}}, alma?: array{display_preference?: array{preference?: string}}, amazon_pay?: array{display_preference?: array{preference?: string}}, apple_pay?: array{display_preference?: array{preference?: string}}, apple_pay_later?: array{display_preference?: array{preference?: string}}, au_becs_debit?: array{display_preference?: array{preference?: string}}, bacs_debit?: array{display_preference?: array{preference?: string}}, bancontact?: array{display_preference?: array{preference?: string}}, billie?: array{display_preference?: array{preference?: string}}, blik?: array{display_preference?: array{preference?: string}}, boleto?: array{display_preference?: array{preference?: string}}, card?: array{display_preference?: array{preference?: string}}, cartes_bancaires?: array{display_preference?: array{preference?: string}}, cashapp?: array{display_preference?: array{preference?: string}}, customer_balance?: array{display_preference?: array{preference?: string}}, eps?: array{display_preference?: array{preference?: string}}, expand?: string[], fpx?: array{display_preference?: array{preference?: string}}, giropay?: array{display_preference?: array{preference?: string}}, google_pay?: array{display_preference?: array{preference?: string}}, grabpay?: array{display_preference?: array{preference?: string}}, ideal?: array{display_preference?: array{preference?: string}}, jcb?: array{display_preference?: array{preference?: string}}, klarna?: array{display_preference?: array{preference?: string}}, konbini?: array{display_preference?: array{preference?: string}}, link?: array{display_preference?: array{preference?: string}}, mobilepay?: array{display_preference?: array{preference?: string}}, multibanco?: array{display_preference?: array{preference?: string}}, name?: string, nz_bank_account?: array{display_preference?: array{preference?: string}}, oxxo?: array{display_preference?: array{preference?: string}}, p24?: array{display_preference?: array{preference?: string}}, parent?: string, pay_by_bank?: array{display_preference?: array{preference?: string}}, paynow?: array{display_preference?: array{preference?: string}}, paypal?: array{display_preference?: array{preference?: string}}, pix?: array{display_preference?: array{preference?: string}}, promptpay?: array{display_preference?: array{preference?: string}}, revolut_pay?: array{display_preference?: array{preference?: string}}, satispay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, us_bank_account?: array{display_preference?: array{preference?: string}}, wechat_pay?: array{display_preference?: array{preference?: string}}, zip?: array{display_preference?: array{preference?: string}}} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\PaymentMethodConfiguration @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/PaymentMethodConfigurationService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentMethodConfigurationService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/payment_method_configurations/%s', $id), $params, $opts); }
Retrieve payment method configuration. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\PaymentMethodConfiguration @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/PaymentMethodConfigurationService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentMethodConfigurationService.php
MIT
public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/payment_method_configurations/%s', $id), $params, $opts); }
Update payment method configuration. @param string $id @param null|array{acss_debit?: array{display_preference?: array{preference?: string}}, active?: bool, affirm?: array{display_preference?: array{preference?: string}}, afterpay_clearpay?: array{display_preference?: array{preference?: string}}, alipay?: array{display_preference?: array{preference?: string}}, alma?: array{display_preference?: array{preference?: string}}, amazon_pay?: array{display_preference?: array{preference?: string}}, apple_pay?: array{display_preference?: array{preference?: string}}, apple_pay_later?: array{display_preference?: array{preference?: string}}, au_becs_debit?: array{display_preference?: array{preference?: string}}, bacs_debit?: array{display_preference?: array{preference?: string}}, bancontact?: array{display_preference?: array{preference?: string}}, billie?: array{display_preference?: array{preference?: string}}, blik?: array{display_preference?: array{preference?: string}}, boleto?: array{display_preference?: array{preference?: string}}, card?: array{display_preference?: array{preference?: string}}, cartes_bancaires?: array{display_preference?: array{preference?: string}}, cashapp?: array{display_preference?: array{preference?: string}}, customer_balance?: array{display_preference?: array{preference?: string}}, eps?: array{display_preference?: array{preference?: string}}, expand?: string[], fpx?: array{display_preference?: array{preference?: string}}, giropay?: array{display_preference?: array{preference?: string}}, google_pay?: array{display_preference?: array{preference?: string}}, grabpay?: array{display_preference?: array{preference?: string}}, ideal?: array{display_preference?: array{preference?: string}}, jcb?: array{display_preference?: array{preference?: string}}, klarna?: array{display_preference?: array{preference?: string}}, konbini?: array{display_preference?: array{preference?: string}}, link?: array{display_preference?: array{preference?: string}}, mobilepay?: array{display_preference?: array{preference?: string}}, multibanco?: array{display_preference?: array{preference?: string}}, name?: string, nz_bank_account?: array{display_preference?: array{preference?: string}}, oxxo?: array{display_preference?: array{preference?: string}}, p24?: array{display_preference?: array{preference?: string}}, pay_by_bank?: array{display_preference?: array{preference?: string}}, paynow?: array{display_preference?: array{preference?: string}}, paypal?: array{display_preference?: array{preference?: string}}, pix?: array{display_preference?: array{preference?: string}}, promptpay?: array{display_preference?: array{preference?: string}}, revolut_pay?: array{display_preference?: array{preference?: string}}, satispay?: array{display_preference?: array{preference?: string}}, sepa_debit?: array{display_preference?: array{preference?: string}}, sofort?: array{display_preference?: array{preference?: string}}, swish?: array{display_preference?: array{preference?: string}}, twint?: array{display_preference?: array{preference?: string}}, us_bank_account?: array{display_preference?: array{preference?: string}}, wechat_pay?: array{display_preference?: array{preference?: string}}, zip?: array{display_preference?: array{preference?: string}}} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\PaymentMethodConfiguration @throws \Stripe\Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Service/PaymentMethodConfigurationService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentMethodConfigurationService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/payouts', $params, $opts); }
Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first. @param null|array{arrival_date?: array|int, created?: array|int, destination?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, status?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\Payout> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/PayoutService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PayoutService.php
MIT
public function cancel($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/payouts/%s/cancel', $id), $params, $opts); }
You can cancel a previously created payout if its status is <code>pending</code>. Stripe refunds the funds to your available balance. You can’t cancel automatic Stripe payouts. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Payout @throws \Stripe\Exception\ApiErrorException if the request fails
cancel
php
stripe/stripe-php
lib/Service/PayoutService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PayoutService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/payouts', $params, $opts); }
To send funds to your own bank account, create a new payout object. Your <a href="#balance">Stripe balance</a> must cover the payout amount. If it doesn’t, you receive an “Insufficient Funds” error. If your API key is in test mode, money won’t actually be sent, though every other action occurs as if you’re in live mode. If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The <a href="#balance_object">balance object</a> details available and pending amounts by source type. @param null|array{amount: int, currency: string, description?: string, destination?: string, expand?: string[], metadata?: \Stripe\StripeObject, method?: string, source_type?: string, statement_descriptor?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Payout @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/PayoutService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PayoutService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/payouts/%s', $id), $params, $opts); }
Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list. Stripe returns the corresponding payout information. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Payout @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/PayoutService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PayoutService.php
MIT
public function reverse($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/payouts/%s/reverse', $id), $params, $opts); }
Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the <code>pending</code> status, use <code>/v1/payouts/:id/cancel</code> instead. By requesting a reversal through <code>/v1/payouts/:id/reverse</code>, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required. @param string $id @param null|array{expand?: string[], metadata?: \Stripe\StripeObject} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Payout @throws \Stripe\Exception\ApiErrorException if the request fails
reverse
php
stripe/stripe-php
lib/Service/PayoutService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PayoutService.php
MIT
public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/payouts/%s', $id), $params, $opts); }
Updates the specified payout by setting the values of the parameters you pass. We don’t change parameters that you don’t provide. This request only accepts the metadata as arguments. @param string $id @param null|array{expand?: string[], metadata?: null|\Stripe\StripeObject} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Payout @throws \Stripe\Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Service/PayoutService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PayoutService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/subscription_schedules', $params, $opts); }
Retrieves the list of your subscription schedules. @param null|array{canceled_at?: array|int, completed_at?: array|int, created?: array|int, customer?: string, ending_before?: string, expand?: string[], limit?: int, released_at?: array|int, scheduled?: bool, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\SubscriptionSchedule> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/SubscriptionScheduleService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SubscriptionScheduleService.php
MIT
public function cancel($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/subscription_schedules/%s/cancel', $id), $params, $opts); }
Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is <code>not_started</code> or <code>active</code>. @param string $id @param null|array{expand?: string[], invoice_now?: bool, prorate?: bool} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\SubscriptionSchedule @throws \Stripe\Exception\ApiErrorException if the request fails
cancel
php
stripe/stripe-php
lib/Service/SubscriptionScheduleService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SubscriptionScheduleService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/subscription_schedules', $params, $opts); }
Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions. @param null|array{customer?: string, default_settings?: array{application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, collection_method?: string, default_payment_method?: string, description?: null|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, on_behalf_of?: null|string, transfer_data?: null|array{amount_percent?: float, destination: string}}, end_behavior?: string, expand?: string[], from_subscription?: string, metadata?: null|\Stripe\StripeObject, phases?: (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?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], end_date?: int, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, 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[]})[], iterations?: int, metadata?: \Stripe\StripeObject, on_behalf_of?: string, proration_behavior?: string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: int})[], start_date?: array|int|string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\SubscriptionSchedule @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/SubscriptionScheduleService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SubscriptionScheduleService.php
MIT
public function release($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/subscription_schedules/%s/release', $id), $params, $opts); }
Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is <code>not_started</code> or <code>active</code>. If the subscription schedule is currently associated with a subscription, releasing it will remove its <code>subscription</code> property and set the subscription’s ID to the <code>released_subscription</code> property. @param string $id @param null|array{expand?: string[], preserve_cancel_date?: bool} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\SubscriptionSchedule @throws \Stripe\Exception\ApiErrorException if the request fails
release
php
stripe/stripe-php
lib/Service/SubscriptionScheduleService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SubscriptionScheduleService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/subscription_schedules/%s', $id), $params, $opts); }
Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\SubscriptionSchedule @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/SubscriptionScheduleService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SubscriptionScheduleService.php
MIT
public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/subscription_schedules/%s', $id), $params, $opts); }
Updates an existing subscription schedule. @param string $id @param null|array{default_settings?: array{application_fee_percent?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, collection_method?: string, default_payment_method?: string, description?: null|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, issuer?: array{account?: string, type: string}}, on_behalf_of?: null|string, transfer_data?: null|array{amount_percent?: float, destination: string}}, end_behavior?: string, expand?: string[], metadata?: null|\Stripe\StripeObject, phases?: (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?: float, automatic_tax?: array{enabled: bool, liability?: array{account?: string, type: string}}, billing_cycle_anchor?: string, collection_method?: string, currency?: string, default_payment_method?: string, default_tax_rates?: null|string[], description?: null|string, discounts?: null|array{coupon?: string, discount?: string, promotion_code?: string}[], end_date?: array|int|string, invoice_settings?: array{account_tax_ids?: null|string[], days_until_due?: int, 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[]})[], iterations?: int, metadata?: \Stripe\StripeObject, on_behalf_of?: string, proration_behavior?: string, start_date?: array|int|string, transfer_data?: array{amount_percent?: float, destination: string}, trial?: bool, trial_end?: array|int|string})[], proration_behavior?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\SubscriptionSchedule @throws \Stripe\Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Service/SubscriptionScheduleService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/SubscriptionScheduleService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/apple_pay/domains', $params, $opts); }
List apple pay domains. @param null|array{domain_name?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\ApplePayDomain> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/ApplePayDomainService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ApplePayDomainService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/apple_pay/domains', $params, $opts); }
Create an apple pay domain. @param null|array{domain_name: string, expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\ApplePayDomain @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/ApplePayDomainService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ApplePayDomainService.php
MIT
public function delete($id, $params = null, $opts = null) { return $this->request('delete', $this->buildPath('/v1/apple_pay/domains/%s', $id), $params, $opts); }
Delete an apple pay domain. @param string $id @param null|array $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\ApplePayDomain @throws \Stripe\Exception\ApiErrorException if the request fails
delete
php
stripe/stripe-php
lib/Service/ApplePayDomainService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ApplePayDomainService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/apple_pay/domains/%s', $id), $params, $opts); }
Retrieve an apple pay domain. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\ApplePayDomain @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/ApplePayDomainService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ApplePayDomainService.php
MIT
public function delete($id, $params = null, $opts = null) { return $this->request('delete', $this->buildPath('/v1/ephemeral_keys/%s', $id), $params, $opts); }
Invalidates a short-lived API key for a given resource. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\EphemeralKey @throws \Stripe\Exception\ApiErrorException if the request fails
delete
php
stripe/stripe-php
lib/Service/EphemeralKeyService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/EphemeralKeyService.php
MIT
public function create($params = null, $opts = null) { if (!$opts || !isset($opts['stripe_version'])) { throw new \Stripe\Exception\InvalidArgumentException('stripe_version must be specified to create an ephemeral key'); } return $this->request('post', '/v1/ephemeral_keys', $params, $opts); }
Creates a short-lived API key for a given resource. @param null|array $params @param null|array|\Stripe\Util\RequestOptions $opts @return \Stripe\EphemeralKey @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/EphemeralKeyService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/EphemeralKeyService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/invoice_payments', $params, $opts); }
When retrieving an invoice, there is an includable payments property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of payments. @param null|array{ending_before?: string, expand?: string[], invoice?: string, limit?: int, payment?: array{payment_intent?: string, type: string}, starting_after?: string, status?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\InvoicePayment> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/InvoicePaymentService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/InvoicePaymentService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/invoice_payments/%s', $id), $params, $opts); }
Retrieves the invoice payment with the given ID. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\InvoicePayment @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/InvoicePaymentService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/InvoicePaymentService.php
MIT
protected function requestConnect($method, $path, $params, $opts) { $opts = $this->_parseOpts($opts); $opts->apiBase = $this->_getBase($opts); return $this->request($method, $path, $params, $opts); }
Sends a request to Stripe's Connect API. @param 'delete'|'get'|'post' $method the HTTP method @param string $path the path of the request @param array $params the parameters of the request @param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request @return \Stripe\StripeObject the object returned by Stripe's Connect API
requestConnect
php
stripe/stripe-php
lib/Service/OAuthService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/OAuthService.php
MIT
public function authorizeUrl($params = null, $opts = null) { $params = $params ?: []; $opts = $this->_parseOpts($opts); $base = $this->_getBase($opts); $params['client_id'] = $this->_getClientId($params); if (!\array_key_exists('response_type', $params)) { $params['response_type'] = 'code'; } $query = \Stripe\Util\Util::encodeParameters($params); return $base . '/oauth/authorize?' . $query; }
Generates a URL to Stripe's OAuth form. @param null|array $params @param null|array $opts @return string the URL to Stripe's OAuth form
authorizeUrl
php
stripe/stripe-php
lib/Service/OAuthService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/OAuthService.php
MIT
public function token($params = null, $opts = null) { $params = $params ?: []; $params['client_secret'] = $this->_getClientSecret($params); return $this->requestConnect('post', '/oauth/token', $params, $opts); }
Use an authoriztion code to connect an account to your platform and fetch the user's credentials. @param null|array $params @param null|array $opts @return \Stripe\StripeObject object containing the response from the API @throws \Stripe\Exception\OAuth\OAuthErrorException if the request fails
token
php
stripe/stripe-php
lib/Service/OAuthService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/OAuthService.php
MIT
public function deauthorize($params = null, $opts = null) { $params = $params ?: []; $params['client_id'] = $this->_getClientId($params); return $this->requestConnect('post', '/oauth/deauthorize', $params, $opts); }
Disconnects an account from your platform. @param null|array $params @param null|array $opts @return \Stripe\StripeObject object containing the response from the API @throws \Stripe\Exception\OAuth\OAuthErrorException if the request fails
deauthorize
php
stripe/stripe-php
lib/Service/OAuthService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/OAuthService.php
MIT
private function _parseOpts($opts) { if (\is_array($opts)) { if (\array_key_exists('connect_base', $opts)) { // Throw an exception for the convenience of anybody migrating to // \Stripe\Service\OAuthService from \Stripe\OAuth, where `connect_base` // was the name of the parameter that behaves as `api_base` does here. throw new \Stripe\Exception\InvalidArgumentException('Use `api_base`, not `connect_base`'); } } return \Stripe\Util\RequestOptions::parse($opts); }
@param array|\Stripe\Util\RequestOptions $opts the special modifiers of the request @return \Stripe\Util\RequestOptions @throws \Stripe\Exception\InvalidArgumentException
_parseOpts
php
stripe/stripe-php
lib/Service/OAuthService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/OAuthService.php
MIT
private function _getBase($opts) { return isset($opts->apiBase) ? $opts->apiBase : $this->client->getConnectBase(); }
@param \Stripe\Util\RequestOptions $opts @return string
_getBase
php
stripe/stripe-php
lib/Service/OAuthService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/OAuthService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/customers', $params, $opts); }
Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first. @param null|array{created?: array|int, email?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, test_clock?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\Customer> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function allBalanceTransactions($parentId, $params = null, $opts = null) { return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/balance_transactions', $parentId), $params, $opts); }
Returns a list of transactions that updated the customer’s <a href="/docs/billing/customer/balance">balances</a>. @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\CustomerBalanceTransaction> @throws \Stripe\Exception\ApiErrorException if the request fails
allBalanceTransactions
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function allCashBalanceTransactions($parentId, $params = null, $opts = null) { return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/cash_balance_transactions', $parentId), $params, $opts); }
Returns a list of transactions that modified the customer’s <a href="/docs/payments/customer-balance">cash balance</a>. @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\CustomerCashBalanceTransaction> @throws \Stripe\Exception\ApiErrorException if the request fails
allCashBalanceTransactions
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function allPaymentMethods($id, $params = null, $opts = null) { return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/payment_methods', $id), $params, $opts); }
Returns a list of PaymentMethods for a given Customer. @param string $id @param null|array{allow_redisplay?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string, type?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\PaymentMethod> @throws \Stripe\Exception\ApiErrorException if the request fails
allPaymentMethods
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function allSources($parentId, $params = null, $opts = null) { return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/sources', $parentId), $params, $opts); }
List sources for a specified customer. @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\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source> @throws \Stripe\Exception\ApiErrorException if the request fails
allSources
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function allTaxIds($parentId, $params = null, $opts = null) { return $this->requestCollection('get', $this->buildPath('/v1/customers/%s/tax_ids', $parentId), $params, $opts); }
Returns a list of tax IDs for a customer. @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\TaxId> @throws \Stripe\Exception\ApiErrorException if the request fails
allTaxIds
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/customers', $params, $opts); }
Creates a new customer object. @param null|array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, balance?: int, cash_balance?: array{settings?: array{reconciliation_mode?: string}}, description?: string, email?: string, expand?: string[], invoice_prefix?: string, invoice_settings?: array{custom_fields?: null|array{name: string, value: string}[], default_payment_method?: string, footer?: string, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}, metadata?: null|\Stripe\StripeObject, name?: string, next_invoice_sequence?: int, payment_method?: string, phone?: string, preferred_locales?: string[], shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: string}, source?: string, tax?: array{ip_address?: null|string, validate_location?: string}, tax_exempt?: null|string, tax_id_data?: array{type: string, value: string}[], test_clock?: string, validate?: bool} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Customer @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function createBalanceTransaction($parentId, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/customers/%s/balance_transactions', $parentId), $params, $opts); }
Creates an immutable transaction that updates the customer’s credit <a href="/docs/billing/customer/balance">balance</a>. @param string $parentId @param null|array{amount: int, currency: string, description?: string, expand?: string[], metadata?: null|\Stripe\StripeObject} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\CustomerBalanceTransaction @throws \Stripe\Exception\ApiErrorException if the request fails
createBalanceTransaction
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function createFundingInstructions($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/customers/%s/funding_instructions', $id), $params, $opts); }
Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new funding instructions will be created. If funding instructions have already been created for a given customer, the same funding instructions will be retrieved. In other words, we will return the same funding instructions each time. @param string $id @param null|array{bank_transfer: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, currency: string, expand?: string[], funding_type: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\FundingInstructions @throws \Stripe\Exception\ApiErrorException if the request fails
createFundingInstructions
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function createSource($parentId, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/customers/%s/sources', $parentId), $params, $opts); }
When you create a new credit card, you must specify a customer or recipient on which to create it. If the card’s owner has no default card, then the new card will become the default. However, if the owner already has a default, then it will not change. To change the default, you should <a href="/docs/api#update_customer">update the customer</a> to have a new <code>default_source</code>. @param string $parentId @param null|array{expand?: string[], metadata?: \Stripe\StripeObject, source: string, validate?: bool} $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
createSource
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function createTaxId($parentId, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/customers/%s/tax_ids', $parentId), $params, $opts); }
Creates a new <code>tax_id</code> object for a customer. @param string $parentId @param null|array{expand?: string[], type: string, value: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\TaxId @throws \Stripe\Exception\ApiErrorException if the request fails
createTaxId
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function delete($id, $params = null, $opts = null) { return $this->request('delete', $this->buildPath('/v1/customers/%s', $id), $params, $opts); }
Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. @param string $id @param null|array $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Customer @throws \Stripe\Exception\ApiErrorException if the request fails
delete
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function deleteDiscount($id, $params = null, $opts = null) { return $this->request('delete', $this->buildPath('/v1/customers/%s/discount', $id), $params, $opts); }
Removes the currently applied discount on a customer. @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/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function deleteSource($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
deleteSource
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function deleteTaxId($parentId, $id, $params = null, $opts = null) { return $this->request('delete', $this->buildPath('/v1/customers/%s/tax_ids/%s', $parentId, $id), $params, $opts); }
Deletes an existing <code>tax_id</code> object. @param string $parentId @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
deleteTaxId
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/customers/%s', $id), $params, $opts); }
Retrieves a Customer object. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Customer @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function retrieveBalanceTransaction($parentId, $id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/customers/%s/balance_transactions/%s', $parentId, $id), $params, $opts); }
Retrieves a specific customer balance transaction that updated the customer’s <a href="/docs/billing/customer/balance">balances</a>. @param string $parentId @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\CustomerBalanceTransaction @throws \Stripe\Exception\ApiErrorException if the request fails
retrieveBalanceTransaction
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function retrieveCashBalance($parentId, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/customers/%s/cash_balance', $parentId), $params, $opts); }
Retrieves a customer’s cash balance. @param string $parentId @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\CashBalance @throws \Stripe\Exception\ApiErrorException if the request fails
retrieveCashBalance
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function retrieveCashBalanceTransaction($parentId, $id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/customers/%s/cash_balance_transactions/%s', $parentId, $id), $params, $opts); }
Retrieves a specific cash balance transaction, which updated the customer’s <a href="/docs/payments/customer-balance">cash balance</a>. @param string $parentId @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\CustomerCashBalanceTransaction @throws \Stripe\Exception\ApiErrorException if the request fails
retrieveCashBalanceTransaction
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function retrievePaymentMethod($parentId, $id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/customers/%s/payment_methods/%s', $parentId, $id), $params, $opts); }
Retrieves a PaymentMethod object 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\PaymentMethod @throws \Stripe\Exception\ApiErrorException if the request fails
retrievePaymentMethod
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function retrieveSource($parentId, $id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/customers/%s/sources/%s', $parentId, $id), $params, $opts); }
Retrieve 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
retrieveSource
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function retrieveTaxId($parentId, $id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/customers/%s/tax_ids/%s', $parentId, $id), $params, $opts); }
Retrieves the <code>tax_id</code> object with the given identifier. @param string $parentId @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
retrieveTaxId
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function search($params = null, $opts = null) { return $this->requestSearchResult('get', '/v1/customers/search', $params, $opts); }
Search for customers 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\Customer> @throws \Stripe\Exception\ApiErrorException if the request fails
search
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/customers/%s', $id), $params, $opts); }
Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the <strong>source</strong> parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the <strong>source</strong> parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in the <code>past_due</code> state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the <strong>default_source</strong> for a customer will not trigger this behavior. This request accepts mostly the same arguments as the customer creation call. @param string $id @param null|array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, balance?: int, cash_balance?: array{settings?: array{reconciliation_mode?: string}}, default_source?: string, description?: string, email?: string, expand?: string[], invoice_prefix?: string, invoice_settings?: array{custom_fields?: null|array{name: string, value: string}[], default_payment_method?: string, footer?: string, rendering_options?: null|array{amount_tax_display?: null|string, template?: string}}, metadata?: null|\Stripe\StripeObject, name?: string, next_invoice_sequence?: int, phone?: string, preferred_locales?: string[], shipping?: null|array{address: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, name: string, phone?: string}, source?: string, tax?: array{ip_address?: null|string, validate_location?: string}, tax_exempt?: null|string, validate?: bool} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Customer @throws \Stripe\Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function updateBalanceTransaction($parentId, $id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/customers/%s/balance_transactions/%s', $parentId, $id), $params, $opts); }
Most credit balance transaction fields are immutable, but you may update its <code>description</code> and <code>metadata</code>. @param string $parentId @param string $id @param null|array{description?: string, expand?: string[], metadata?: null|\Stripe\StripeObject} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\CustomerBalanceTransaction @throws \Stripe\Exception\ApiErrorException if the request fails
updateBalanceTransaction
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function updateCashBalance($parentId, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/customers/%s/cash_balance', $parentId), $params, $opts); }
Changes the settings on a customer’s cash balance. @param string $parentId @param null|array{expand?: string[], settings?: array{reconciliation_mode?: string}} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\CashBalance @throws \Stripe\Exception\ApiErrorException if the request fails
updateCashBalance
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function updateSource($parentId, $id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/customers/%s/sources/%s', $parentId, $id), $params, $opts); }
Update a specified source for a given customer. @param string $parentId @param string $id @param null|array{account_holder_name?: string, account_holder_type?: string, address_city?: string, address_country?: string, address_line1?: string, address_line2?: string, address_state?: string, address_zip?: string, exp_month?: string, exp_year?: string, expand?: string[], metadata?: null|\Stripe\StripeObject, name?: string, owner?: array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: string, name?: string, phone?: 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
updateSource
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function verifySource($parentId, $id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/customers/%s/sources/%s/verify', $parentId, $id), $params, $opts); }
Verify a specified bank account for a given customer. @param string $parentId @param string $id @param null|array{amounts?: int[], 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
verifySource
php
stripe/stripe-php
lib/Service/CustomerService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/CustomerService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/payment_intents', $params, $opts); }
Returns a list of PaymentIntents. @param null|array{created?: array|int, customer?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\PaymentIntent> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/PaymentIntentService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentIntentService.php
MIT
public function applyCustomerBalance($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/payment_intents/%s/apply_customer_balance', $id), $params, $opts); }
Manually reconcile the remaining amount for a <code>customer_balance</code> PaymentIntent. @param string $id @param null|array{amount?: int, currency?: string, expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\PaymentIntent @throws \Stripe\Exception\ApiErrorException if the request fails
applyCustomerBalance
php
stripe/stripe-php
lib/Service/PaymentIntentService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentIntentService.php
MIT
public function cancel($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/payment_intents/%s/cancel', $id), $params, $opts); }
You can cancel a PaymentIntent object when it’s in one of these statuses: <code>requires_payment_method</code>, <code>requires_capture</code>, <code>requires_confirmation</code>, <code>requires_action</code> or, <a href="/docs/payments/intents">in rare cases</a>, <code>processing</code>. After it’s canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a <code>status</code> of <code>requires_capture</code>, the remaining <code>amount_capturable</code> is automatically refunded. You can’t cancel the PaymentIntent for a Checkout Session. <a href="/docs/api/checkout/sessions/expire">Expire the Checkout Session</a> instead. @param string $id @param null|array{cancellation_reason?: string, expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\PaymentIntent @throws \Stripe\Exception\ApiErrorException if the request fails
cancel
php
stripe/stripe-php
lib/Service/PaymentIntentService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentIntentService.php
MIT
public function capture($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/payment_intents/%s/capture', $id), $params, $opts); }
Capture the funds of an existing uncaptured PaymentIntent when its status is <code>requires_capture</code>. Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation. Learn more about <a href="/docs/payments/capture-later">separate authorization and capture</a>. @param string $id @param null|array{amount_to_capture?: int, application_fee_amount?: int, expand?: string[], final_capture?: bool, metadata?: null|\Stripe\StripeObject, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int}} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\PaymentIntent @throws \Stripe\Exception\ApiErrorException if the request fails
capture
php
stripe/stripe-php
lib/Service/PaymentIntentService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentIntentService.php
MIT
public function confirm($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/payment_intents/%s/confirm', $id), $params, $opts); }
Confirm that your customer intends to pay with current or provided payment method. Upon confirmation, the PaymentIntent will attempt to initiate a payment. If the selected payment method requires additional authentication steps, the PaymentIntent will transition to the <code>requires_action</code> status and suggest additional actions via <code>next_action</code>. If payment fails, the PaymentIntent transitions to the <code>requires_payment_method</code> status or the <code>canceled</code> status if the confirmation limit is reached. If payment succeeds, the PaymentIntent will transition to the <code>succeeded</code> status (or <code>requires_capture</code>, if <code>capture_method</code> is set to <code>manual</code>). If the <code>confirmation_method</code> is <code>automatic</code>, payment may be attempted using our <a href="/docs/stripe-js/reference#stripe-handle-card-payment">client SDKs</a> and the PaymentIntent’s <a href="#payment_intent_object-client_secret">client_secret</a>. After <code>next_action</code>s are handled by the client, no additional confirmation is required to complete the payment. If the <code>confirmation_method</code> is <code>manual</code>, all payment attempts must be initiated using a secret key. If any actions are required for the payment, the PaymentIntent will return to the <code>requires_confirmation</code> state after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. There is a variable upper limit on how many times a PaymentIntent can be confirmed. After this limit is reached, any further calls to this endpoint will transition the PaymentIntent to the <code>canceled</code> state. @param string $id @param null|array{capture_method?: string, confirmation_token?: string, error_on_requires_action?: bool, expand?: string[], mandate?: string, mandate_data?: null|array{customer_acceptance?: array{accepted_at?: int, offline?: array{}, online?: array{ip_address?: string, user_agent?: string}, type: string}}, off_session?: array|bool|string, payment_method?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: \Stripe\StripeObject, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{custom_mandate_url?: null|string, interval_description?: string, payment_schedule?: string, transaction_type?: string}, setup_future_usage?: null|string, target_date?: string, verification_method?: string}, affirm?: null|array{capture_method?: null|string, preferred_locale?: string, setup_future_usage?: string}, afterpay_clearpay?: null|array{capture_method?: null|string, reference?: string, setup_future_usage?: string}, alipay?: null|array{setup_future_usage?: null|string}, alma?: null|array{capture_method?: null|string}, amazon_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, au_becs_debit?: null|array{setup_future_usage?: null|string, target_date?: string}, bacs_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, bancontact?: null|array{preferred_language?: string, setup_future_usage?: null|string}, billie?: null|array{capture_method?: null|string}, blik?: null|array{code?: string, setup_future_usage?: null|string}, boleto?: null|array{expires_after_days?: int, setup_future_usage?: null|string}, card?: null|array{capture_method?: null|string, cvc_token?: string, installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, mandate_options?: array{amount: int, amount_type: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, require_cvc_recollection?: bool, setup_future_usage?: null|string, statement_descriptor_suffix_kana?: null|string, statement_descriptor_suffix_kanji?: null|string, three_d_secure?: array{ares_trans_status?: string, cryptogram: string, electronic_commerce_indicator?: string, exemption_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id: string, version: string}}, card_present?: null|array{request_extended_authorization?: bool, request_incremental_authorization_support?: bool, routing?: array{requested_priority?: string}}, cashapp?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, eps?: null|array{setup_future_usage?: string}, fpx?: null|array{setup_future_usage?: string}, giropay?: null|array{setup_future_usage?: string}, grabpay?: null|array{setup_future_usage?: string}, ideal?: null|array{setup_future_usage?: null|string}, interac_present?: null|array{}, kakao_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, klarna?: null|array{capture_method?: null|string, preferred_locale?: string, setup_future_usage?: string}, konbini?: null|array{confirmation_number?: null|string, expires_after_days?: null|int, expires_at?: null|int, product_description?: null|string, setup_future_usage?: string}, kr_card?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, link?: null|array{capture_method?: null|string, persistent_token?: string, setup_future_usage?: null|string}, mobilepay?: null|array{capture_method?: null|string, setup_future_usage?: string}, multibanco?: null|array{setup_future_usage?: string}, naver_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, nz_bank_account?: null|array{setup_future_usage?: null|string, target_date?: string}, oxxo?: null|array{expires_after_days?: int, setup_future_usage?: string}, p24?: null|array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: null|array{}, payco?: null|array{capture_method?: null|string}, paynow?: null|array{setup_future_usage?: string}, paypal?: null|array{capture_method?: null|string, preferred_locale?: string, reference?: string, risk_correlation_id?: string, setup_future_usage?: null|string}, pix?: null|array{expires_after_seconds?: int, expires_at?: int, setup_future_usage?: string}, promptpay?: null|array{setup_future_usage?: string}, revolut_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, samsung_pay?: null|array{capture_method?: null|string}, sepa_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, sofort?: null|array{preferred_language?: null|string, setup_future_usage?: null|string}, swish?: null|array{reference?: null|string, setup_future_usage?: string}, twint?: null|array{setup_future_usage?: string}, us_bank_account?: null|array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, preferred_settlement_speed?: null|string, setup_future_usage?: null|string, target_date?: string, verification_method?: string}, wechat_pay?: null|array{app_id?: string, client?: string, setup_future_usage?: string}, zip?: null|array{setup_future_usage?: string}}, payment_method_types?: string[], radar_options?: array{session?: string}, receipt_email?: null|string, return_url?: string, setup_future_usage?: null|string, shipping?: null|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}, use_stripe_sdk?: bool} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\PaymentIntent @throws \Stripe\Exception\ApiErrorException if the request fails
confirm
php
stripe/stripe-php
lib/Service/PaymentIntentService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentIntentService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/payment_intents', $params, $opts); }
Creates a PaymentIntent object. After the PaymentIntent is created, attach a payment method and <a href="/docs/api/payment_intents/confirm">confirm</a> to continue the payment. Learn more about <a href="/docs/payments/payment-intents">the available payment flows with the Payment Intents API</a>. When you use <code>confirm=true</code> during creation, it’s equivalent to creating and confirming the PaymentIntent in the same call. You can use any parameters available in the <a href="/docs/api/payment_intents/confirm">confirm API</a> when you supply <code>confirm=true</code>. @param null|array{amount: int, application_fee_amount?: int, automatic_payment_methods?: array{allow_redirects?: string, enabled: bool}, capture_method?: string, confirm?: bool, confirmation_method?: string, confirmation_token?: string, currency: string, customer?: string, description?: string, error_on_requires_action?: bool, expand?: string[], mandate?: string, mandate_data?: null|array{customer_acceptance: array{accepted_at?: int, offline?: array{}, online?: array{ip_address: string, user_agent: string}, type: string}}, metadata?: \Stripe\StripeObject, off_session?: array|bool|string, on_behalf_of?: string, payment_method?: string, payment_method_configuration?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: \Stripe\StripeObject, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{custom_mandate_url?: null|string, interval_description?: string, payment_schedule?: string, transaction_type?: string}, setup_future_usage?: null|string, target_date?: string, verification_method?: string}, affirm?: null|array{capture_method?: null|string, preferred_locale?: string, setup_future_usage?: string}, afterpay_clearpay?: null|array{capture_method?: null|string, reference?: string, setup_future_usage?: string}, alipay?: null|array{setup_future_usage?: null|string}, alma?: null|array{capture_method?: null|string}, amazon_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, au_becs_debit?: null|array{setup_future_usage?: null|string, target_date?: string}, bacs_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, bancontact?: null|array{preferred_language?: string, setup_future_usage?: null|string}, billie?: null|array{capture_method?: null|string}, blik?: null|array{code?: string, setup_future_usage?: null|string}, boleto?: null|array{expires_after_days?: int, setup_future_usage?: null|string}, card?: null|array{capture_method?: null|string, cvc_token?: string, installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, mandate_options?: array{amount: int, amount_type: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, require_cvc_recollection?: bool, setup_future_usage?: null|string, statement_descriptor_suffix_kana?: null|string, statement_descriptor_suffix_kanji?: null|string, three_d_secure?: array{ares_trans_status?: string, cryptogram: string, electronic_commerce_indicator?: string, exemption_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id: string, version: string}}, card_present?: null|array{request_extended_authorization?: bool, request_incremental_authorization_support?: bool, routing?: array{requested_priority?: string}}, cashapp?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, eps?: null|array{setup_future_usage?: string}, fpx?: null|array{setup_future_usage?: string}, giropay?: null|array{setup_future_usage?: string}, grabpay?: null|array{setup_future_usage?: string}, ideal?: null|array{setup_future_usage?: null|string}, interac_present?: null|array{}, kakao_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, klarna?: null|array{capture_method?: null|string, preferred_locale?: string, setup_future_usage?: string}, konbini?: null|array{confirmation_number?: null|string, expires_after_days?: null|int, expires_at?: null|int, product_description?: null|string, setup_future_usage?: string}, kr_card?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, link?: null|array{capture_method?: null|string, persistent_token?: string, setup_future_usage?: null|string}, mobilepay?: null|array{capture_method?: null|string, setup_future_usage?: string}, multibanco?: null|array{setup_future_usage?: string}, naver_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, nz_bank_account?: null|array{setup_future_usage?: null|string, target_date?: string}, oxxo?: null|array{expires_after_days?: int, setup_future_usage?: string}, p24?: null|array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: null|array{}, payco?: null|array{capture_method?: null|string}, paynow?: null|array{setup_future_usage?: string}, paypal?: null|array{capture_method?: null|string, preferred_locale?: string, reference?: string, risk_correlation_id?: string, setup_future_usage?: null|string}, pix?: null|array{expires_after_seconds?: int, expires_at?: int, setup_future_usage?: string}, promptpay?: null|array{setup_future_usage?: string}, revolut_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, samsung_pay?: null|array{capture_method?: null|string}, sepa_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, sofort?: null|array{preferred_language?: null|string, setup_future_usage?: null|string}, swish?: null|array{reference?: null|string, setup_future_usage?: string}, twint?: null|array{setup_future_usage?: string}, us_bank_account?: null|array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, preferred_settlement_speed?: null|string, setup_future_usage?: null|string, target_date?: string, verification_method?: string}, wechat_pay?: null|array{app_id?: string, client?: string, setup_future_usage?: string}, zip?: null|array{setup_future_usage?: string}}, payment_method_types?: string[], radar_options?: array{session?: string}, receipt_email?: string, return_url?: string, setup_future_usage?: 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, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, destination: string}, transfer_group?: string, use_stripe_sdk?: bool} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\PaymentIntent @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/PaymentIntentService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentIntentService.php
MIT
public function incrementAuthorization($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/payment_intents/%s/increment_authorization', $id), $params, $opts); }
Perform an incremental authorization on an eligible <a href="/docs/api/payment_intents/object">PaymentIntent</a>. To be eligible, the PaymentIntent’s status must be <code>requires_capture</code> and <a href="/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported">incremental_authorization_supported</a> must be <code>true</code>. Incremental authorizations attempt to increase the authorized amount on your customer’s card to the new, higher <code>amount</code> provided. Similar to the initial authorization, incremental authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to further increase the authorized amount. If the incremental authorization succeeds, the PaymentIntent object returns with the updated <a href="/docs/api/payment_intents/object#payment_intent_object-amount">amount</a>. If the incremental authorization fails, a <a href="/docs/error-codes#card-declined">card_declined</a> error returns, and no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains capturable for the previously authorized amount. Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. After it’s captured, a PaymentIntent can no longer be incremented. Learn more about <a href="/docs/terminal/features/incremental-authorizations">incremental authorizations</a>. @param string $id @param null|array{amount: int, application_fee_amount?: int, description?: string, expand?: string[], metadata?: \Stripe\StripeObject, statement_descriptor?: string, transfer_data?: array{amount?: int}} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\PaymentIntent @throws \Stripe\Exception\ApiErrorException if the request fails
incrementAuthorization
php
stripe/stripe-php
lib/Service/PaymentIntentService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentIntentService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/payment_intents/%s', $id), $params, $opts); }
Retrieves the details of a PaymentIntent that has previously been created. You can retrieve a PaymentIntent client-side using a publishable key when the <code>client_secret</code> is in the query string. If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the <a href="#payment_intent_object">payment intent</a> object reference for more details. @param string $id @param null|array{client_secret?: string, expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\PaymentIntent @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/PaymentIntentService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentIntentService.php
MIT
public function search($params = null, $opts = null) { return $this->requestSearchResult('get', '/v1/payment_intents/search', $params, $opts); }
Search for PaymentIntents 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\PaymentIntent> @throws \Stripe\Exception\ApiErrorException if the request fails
search
php
stripe/stripe-php
lib/Service/PaymentIntentService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentIntentService.php
MIT
public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/payment_intents/%s', $id), $params, $opts); }
Updates properties on a PaymentIntent object without confirming. Depending on which properties you update, you might need to confirm the PaymentIntent again. For example, updating the <code>payment_method</code> always requires you to confirm the PaymentIntent again. If you prefer to update and confirm at the same time, we recommend updating properties through the <a href="/docs/api/payment_intents/confirm">confirm API</a> instead. @param string $id @param null|array{amount?: int, application_fee_amount?: null|int, capture_method?: string, currency?: string, customer?: string, description?: string, expand?: string[], metadata?: null|\Stripe\StripeObject, payment_method?: string, payment_method_configuration?: string, payment_method_data?: array{acss_debit?: array{account_number: string, institution_number: string, transit_number: string}, affirm?: array{}, afterpay_clearpay?: array{}, alipay?: array{}, allow_redisplay?: string, alma?: array{}, amazon_pay?: array{}, au_becs_debit?: array{account_number: string, bsb_number: string}, bacs_debit?: array{account_number?: string, sort_code?: string}, bancontact?: array{}, billie?: array{}, billing_details?: array{address?: null|array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, email?: null|string, name?: null|string, phone?: null|string, tax_id?: string}, blik?: array{}, boleto?: array{tax_id: string}, cashapp?: array{}, customer_balance?: array{}, eps?: array{bank?: string}, fpx?: array{account_holder_type?: string, bank: string}, giropay?: array{}, grabpay?: array{}, ideal?: array{bank?: string}, interac_present?: array{}, kakao_pay?: array{}, klarna?: array{dob?: array{day: int, month: int, year: int}}, konbini?: array{}, kr_card?: array{}, link?: array{}, metadata?: \Stripe\StripeObject, mobilepay?: array{}, multibanco?: array{}, naver_pay?: array{funding?: string}, nz_bank_account?: array{account_holder_name?: string, account_number: string, bank_code: string, branch_code: string, reference?: string, suffix: string}, oxxo?: array{}, p24?: array{bank?: string}, pay_by_bank?: array{}, payco?: array{}, paynow?: array{}, paypal?: array{}, pix?: array{}, promptpay?: array{}, radar_options?: array{session?: string}, revolut_pay?: array{}, samsung_pay?: array{}, satispay?: array{}, sepa_debit?: array{iban: string}, sofort?: array{country: string}, swish?: array{}, twint?: array{}, type: string, us_bank_account?: array{account_holder_type?: string, account_number?: string, account_type?: string, financial_connections_account?: string, routing_number?: string}, wechat_pay?: array{}, zip?: array{}}, payment_method_options?: array{acss_debit?: null|array{mandate_options?: array{custom_mandate_url?: null|string, interval_description?: string, payment_schedule?: string, transaction_type?: string}, setup_future_usage?: null|string, target_date?: string, verification_method?: string}, affirm?: null|array{capture_method?: null|string, preferred_locale?: string, setup_future_usage?: string}, afterpay_clearpay?: null|array{capture_method?: null|string, reference?: string, setup_future_usage?: string}, alipay?: null|array{setup_future_usage?: null|string}, alma?: null|array{capture_method?: null|string}, amazon_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, au_becs_debit?: null|array{setup_future_usage?: null|string, target_date?: string}, bacs_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, bancontact?: null|array{preferred_language?: string, setup_future_usage?: null|string}, billie?: null|array{capture_method?: null|string}, blik?: null|array{code?: string, setup_future_usage?: null|string}, boleto?: null|array{expires_after_days?: int, setup_future_usage?: null|string}, card?: null|array{capture_method?: null|string, cvc_token?: string, installments?: array{enabled?: bool, plan?: null|array{count?: int, interval?: string, type: string}}, mandate_options?: array{amount: int, amount_type: string, description?: string, end_date?: int, interval: string, interval_count?: int, reference: string, start_date: int, supported_types?: string[]}, moto?: bool, network?: string, request_extended_authorization?: string, request_incremental_authorization?: string, request_multicapture?: string, request_overcapture?: string, request_three_d_secure?: string, require_cvc_recollection?: bool, setup_future_usage?: null|string, statement_descriptor_suffix_kana?: null|string, statement_descriptor_suffix_kanji?: null|string, three_d_secure?: array{ares_trans_status?: string, cryptogram: string, electronic_commerce_indicator?: string, exemption_indicator?: string, network_options?: array{cartes_bancaires?: array{cb_avalgo: string, cb_exemption?: string, cb_score?: int}}, requestor_challenge_indicator?: string, transaction_id: string, version: string}}, card_present?: null|array{request_extended_authorization?: bool, request_incremental_authorization_support?: bool, routing?: array{requested_priority?: string}}, cashapp?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, customer_balance?: null|array{bank_transfer?: array{eu_bank_transfer?: array{country: string}, requested_address_types?: string[], type: string}, funding_type?: string, setup_future_usage?: string}, eps?: null|array{setup_future_usage?: string}, fpx?: null|array{setup_future_usage?: string}, giropay?: null|array{setup_future_usage?: string}, grabpay?: null|array{setup_future_usage?: string}, ideal?: null|array{setup_future_usage?: null|string}, interac_present?: null|array{}, kakao_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, klarna?: null|array{capture_method?: null|string, preferred_locale?: string, setup_future_usage?: string}, konbini?: null|array{confirmation_number?: null|string, expires_after_days?: null|int, expires_at?: null|int, product_description?: null|string, setup_future_usage?: string}, kr_card?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, link?: null|array{capture_method?: null|string, persistent_token?: string, setup_future_usage?: null|string}, mobilepay?: null|array{capture_method?: null|string, setup_future_usage?: string}, multibanco?: null|array{setup_future_usage?: string}, naver_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, nz_bank_account?: null|array{setup_future_usage?: null|string, target_date?: string}, oxxo?: null|array{expires_after_days?: int, setup_future_usage?: string}, p24?: null|array{setup_future_usage?: string, tos_shown_and_accepted?: bool}, pay_by_bank?: null|array{}, payco?: null|array{capture_method?: null|string}, paynow?: null|array{setup_future_usage?: string}, paypal?: null|array{capture_method?: null|string, preferred_locale?: string, reference?: string, risk_correlation_id?: string, setup_future_usage?: null|string}, pix?: null|array{expires_after_seconds?: int, expires_at?: int, setup_future_usage?: string}, promptpay?: null|array{setup_future_usage?: string}, revolut_pay?: null|array{capture_method?: null|string, setup_future_usage?: null|string}, samsung_pay?: null|array{capture_method?: null|string}, sepa_debit?: null|array{mandate_options?: array{reference_prefix?: null|string}, setup_future_usage?: null|string, target_date?: string}, sofort?: null|array{preferred_language?: null|string, setup_future_usage?: null|string}, swish?: null|array{reference?: null|string, setup_future_usage?: string}, twint?: null|array{setup_future_usage?: string}, us_bank_account?: null|array{financial_connections?: array{filters?: array{account_subcategories?: string[]}, permissions?: string[], prefetch?: string[], return_url?: string}, mandate_options?: array{collection_method?: null|string}, networks?: array{requested?: string[]}, preferred_settlement_speed?: null|string, setup_future_usage?: null|string, target_date?: string, verification_method?: string}, wechat_pay?: null|array{app_id?: string, client?: string, setup_future_usage?: string}, zip?: null|array{setup_future_usage?: string}}, payment_method_types?: string[], receipt_email?: null|string, setup_future_usage?: null|string, shipping?: null|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, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int}, transfer_group?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\PaymentIntent @throws \Stripe\Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Service/PaymentIntentService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentIntentService.php
MIT
public function verifyMicrodeposits($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/payment_intents/%s/verify_microdeposits', $id), $params, $opts); }
Verifies microdeposits on a PaymentIntent object. @param string $id @param null|array{amounts?: int[], descriptor_code?: string, expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\PaymentIntent @throws \Stripe\Exception\ApiErrorException if the request fails
verifyMicrodeposits
php
stripe/stripe-php
lib/Service/PaymentIntentService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/PaymentIntentService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/tokens', $params, $opts); }
Creates a single-use token that represents a bank account’s details. You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a <a href="#accounts">connected account</a> where <a href="/api/accounts/object#account_object-controller-requirement_collection">controller.requirement_collection</a> is <code>application</code>, which includes Custom accounts. @param null|array{account?: array{business_type?: string, 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_declaration_shown_and_signed?: bool, 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}}}, 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}}}, tos_shown_and_accepted?: bool}, bank_account?: array{account_holder_name?: string, account_holder_type?: string, account_number: string, account_type?: string, country: string, currency?: string, payment_method?: string, routing_number?: string}, card?: array|string, customer?: string, cvc_update?: array{cvc: string}, expand?: string[], person?: 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, 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, 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}}}, pii?: array{id_number?: string}} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Token @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/TokenService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/TokenService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/tokens/%s', $id), $params, $opts); }
Retrieves the token with the given ID. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Token @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/TokenService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/TokenService.php
MIT
public function retrieve($params = null, $opts = null) { return $this->request('get', '/v1/balance', $params, $opts); }
Retrieves the current account balance, based on the authentication that was used to make the request. For a sample request, see <a href="/docs/connect/account-balances#accounting-for-negative-balances">Accounting for negative balances</a>. @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Balance @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/BalanceService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/BalanceService.php
MIT
public function __construct($client) { $this->client = $client; }
@param \Stripe\StripeClientInterface $client
__construct
php
stripe/stripe-php
lib/Service/AbstractServiceFactory.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/AbstractServiceFactory.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/shipping_rates', $params, $opts); }
Returns a list of your shipping rates. @param null|array{active?: bool, created?: array|int, currency?: string, ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\ShippingRate> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/ShippingRateService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ShippingRateService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/shipping_rates', $params, $opts); }
Creates a new shipping rate object. @param null|array{delivery_estimate?: array{maximum?: array{unit: string, value: int}, minimum?: array{unit: string, value: int}}, display_name: string, expand?: string[], fixed_amount?: array{amount: int, currency: string, currency_options?: \Stripe\StripeObject}, metadata?: \Stripe\StripeObject, tax_behavior?: string, tax_code?: string, type?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\ShippingRate @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/ShippingRateService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ShippingRateService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/shipping_rates/%s', $id), $params, $opts); }
Returns the shipping rate object with the given ID. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\ShippingRate @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/ShippingRateService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ShippingRateService.php
MIT
public function update($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/shipping_rates/%s', $id), $params, $opts); }
Updates an existing shipping rate object. @param string $id @param null|array{active?: bool, expand?: string[], fixed_amount?: array{currency_options?: \Stripe\StripeObject}, metadata?: null|\Stripe\StripeObject, tax_behavior?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\ShippingRate @throws \Stripe\Exception\ApiErrorException if the request fails
update
php
stripe/stripe-php
lib/Service/ShippingRateService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ShippingRateService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/confirmation_tokens/%s', $id), $params, $opts); }
Retrieves an existing ConfirmationToken object. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\ConfirmationToken @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/ConfirmationTokenService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ConfirmationTokenService.php
MIT
public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/charges', $params, $opts); }
Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first. @param null|array{created?: array|int, customer?: string, ending_before?: string, expand?: string[], limit?: int, payment_intent?: string, starting_after?: string, transfer_group?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Collection<\Stripe\Charge> @throws \Stripe\Exception\ApiErrorException if the request fails
all
php
stripe/stripe-php
lib/Service/ChargeService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ChargeService.php
MIT
public function capture($id, $params = null, $opts = null) { return $this->request('post', $this->buildPath('/v1/charges/%s/capture', $id), $params, $opts); }
Capture the payment of an existing, uncaptured charge that was created with the <code>capture</code> option set to false. Uncaptured payments expire a set number of days after they are created (<a href="/docs/charges/placing-a-hold">7 by default</a>), after which they are marked as refunded and capture attempts will fail. Don’t use this method to capture a PaymentIntent-initiated charge. Use <a href="/docs/api/payment_intents/capture">Capture a PaymentIntent</a>. @param string $id @param null|array{amount?: int, application_fee?: int, application_fee_amount?: int, expand?: string[], receipt_email?: string, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int}, transfer_group?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Charge @throws \Stripe\Exception\ApiErrorException if the request fails
capture
php
stripe/stripe-php
lib/Service/ChargeService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ChargeService.php
MIT
public function create($params = null, $opts = null) { return $this->request('post', '/v1/charges', $params, $opts); }
This method is no longer recommended—use the <a href="/docs/api/payment_intents">Payment Intents API</a> to initiate a new payment instead. Confirmation of the PaymentIntent creates the <code>Charge</code> object used to request payment. @param null|array{amount?: int, application_fee?: int, application_fee_amount?: int, capture?: bool, currency?: string, customer?: string, description?: string, destination?: array{account: string, amount?: int}, expand?: string[], metadata?: null|\Stripe\StripeObject, on_behalf_of?: string, radar_options?: array{session?: string}, receipt_email?: 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}, source?: string, statement_descriptor?: string, statement_descriptor_suffix?: string, transfer_data?: array{amount?: int, destination: string}, transfer_group?: string} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Charge @throws \Stripe\Exception\ApiErrorException if the request fails
create
php
stripe/stripe-php
lib/Service/ChargeService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ChargeService.php
MIT
public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/charges/%s', $id), $params, $opts); }
Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge. @param string $id @param null|array{expand?: string[]} $params @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts @return \Stripe\Charge @throws \Stripe\Exception\ApiErrorException if the request fails
retrieve
php
stripe/stripe-php
lib/Service/ChargeService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ChargeService.php
MIT
public function search($params = null, $opts = null) { return $this->requestSearchResult('get', '/v1/charges/search', $params, $opts); }
Search for charges 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\Charge> @throws \Stripe\Exception\ApiErrorException if the request fails
search
php
stripe/stripe-php
lib/Service/ChargeService.php
https://github.com/stripe/stripe-php/blob/master/lib/Service/ChargeService.php
MIT