create_customer | R Documentation |
Create a new customer on Stripe.
create_customer(
account_balance = NULL,
business_vat_id = NULL,
description = NULL,
email = NULL,
plan = NULL,
quantity = NULL,
tax_percent = NULL,
trial_end = NULL,
source = NULL,
coupon = NULL,
metadata = list(),
ship_name = NULL,
ship_city = NULL,
ship_country = NULL,
ship_line1 = NULL,
ship_line2 = NULL,
ship_state = NULL,
ship_zip = NULL,
ship_phone = NULL,
card_token = NULL,
exp_month = NULL,
exp_year = NULL,
number = NULL,
cvc = NULL,
name = NULL,
address_city = NULL,
address_country = NULL,
address_line1 = NULL,
address_line2 = NULL,
address_state = NULL,
address_zip = NULL,
currency = NULL,
default_for_currency = NULL,
card_metadata = list()
)
account_balance |
An integer amount in cents that is the starting account balance for your customer. A negative amount represents a credit that will be used before attempting any charges to the customer's card; a positive amount will be added to the next invoice. |
business_vat_id |
The customer's VAT identification number. If you are
using Relay, this field gets passed to tax provider you are using for your
orders. This can be unset by updating the value to |
description |
An arbitrary string that you can attach to a customer
object. It is displayed alongside the customer in the dashboard. This can be
unset by updating the value to |
email |
Customer's email address. It's displayed alongside the customer
in your dashboard and can be useful for searching and tracking. This can be
unset by updating the value to |
plan |
The identifier of the plan to subscribe the customer to. If provided, the returned customer object will have a list of subscriptions that the customer is currently subscribed to. If you subscribe a customer to a plan without a free trial, the customer must have a valid card as well. |
quantity |
The quantity you'd like to apply to the subscription you're creating (if you pass in a plan). For example, if your plan is 10 cents/user/month, and your customer has 5 users, you could pass 5 as the quantity to have the customer charged 50 cents (5 x 10 cents) monthly. Defaults to 1 if not set. Only applies when the plan parameter is also provided. |
tax_percent |
A positive decimal (with at most four decimal places) between 1 and 100. This represents the percentage of the subscription invoice subtotal that will be calculated and added as tax to the final amount each billing period. For example, a plan which charges $10/month with a tax_percent of 20.0 will charge $12 per invoice. Can only be used if a plan is provided |
trial_end |
Unix timestamp representing the end of the trial period the customer will get before being charged. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value now can be provided to end the customer's trial immediately. Only applies when the plan parameter is also provided. |
coupon |
If you provide a coupon code, the customer will have a discount applied on all recurring charges. Charges you create through the API will not have the discount. |
metadata |
A set of key/value pairs that you can attach to a customer
object. It can be useful for storing additional information about the customer
in a structured format. This can be unset by updating the value to |
ship_name |
Name on shipping address |
ship_city |
City of shipping address |
ship_country |
Country of shipping address |
ship_line1 |
Address line 1 of shipping address |
ship_line2 |
Address line 2 of shipping address |
ship_state |
State/Region/Territory of shipping address |
ship_zip |
Zip/Postal Code of shipping address |
ship_phone |
Phone number associated with shipping address |
card_token |
Token ID of card token representing the customer's credit card details. You can pass credit card details if you don't have a token created yet. |
exp_month |
Two digit number representing the card's expiration month. |
exp_year |
Two or four digit number representing the card's expiration year. |
number |
The card number, as a string without any separators. |
cvc |
Card security code. |
name |
Cardholder's full name |
address_city |
City of billing address |
address_country |
Country of billing address |
address_line1 |
Address line 1 of billing address |
address_line2 |
Address line 2 of billing address |
address_state |
State of billing address |
address_zip |
Zip/Postal Code of billing address |
currency |
Required when adding a card to an account (not applicable to customers or recipients). The card (which must be a debit card) can be used as a transfer destination for funds in this currency. Currently, the only supported currency for debit card transfers is usd. |
default_for_currency |
Only applicable on accounts (not customers or recipients). If you set this to true (or if this is the first external account being added in this currency) this card will become the default external account for its currency. |
card_metadata |
set of key/value pairs that you can attach to a card object. It can be useful for storing additional information about the card in a structured format. |
A stripe_customer
object representing the created customer.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.