Learn R Programming

RStripe (version 0.1)

stripe_create_charge: Create a charge.

Description

Create a new charge for a customer or standalone on card.

Usage

stripe_create_charge(api_key, args)

Arguments

api_key
Your Stripe API Key
args
A list of arguments
amount
required Amount for transfer.

currency
required The 3-letter currency.

customer
optional Either customer or card required.

card
optional Either customer or card required.

description
optional The description of the transfer.

capture
optional True/false to capture charge later.

recipient_email
optional The email to send receipt to.

metadata
optional A list which can contain anything to further describe.

statement_description
optional 15 character description to appear on statement.

application_fee
optional A fee in cents applied to charge.

Value

A data frame with the new charge info if successful.

Examples

Run this code
## Not run: stripe_create_charge("sk_test_BQokikJOvBiI2HlWgH4olfQ2",
# list(card="tok_14SsjM2eZvKYlo2CCtdx2AvO", amount=3000, currency="usd",
# metadata=list(order_id="12545")))## End(Not run)

Run the code above in your browser using DataLab