Skip to main content

Charges

Capture A Single Charge​

Use the same URL whether it is from an app or a website. All together, it looks like this:

https://app.collectforstripe.com/launchApp?action=beginTransaction&amount=[amountString]&description=[descriptionString]&callback=[callbackURL]

Parameters are broken down and explained below.

or

collectforstripe://?action=beginTransaction&amount=[amountString]&description=[descriptionString]&callback=[callbackURL]

Action​

required

Tell the app what type of action to take. In this case, you want to beginTransaction.

action=beginTransaction

Amount​

required

The amount parameter should be in cents, or the equivalent smallest unit of your currency.

Examples: "50" → $0.50, "100" → $1.00, "2500" → €25,00

amount=100

When calculating this total, please note:

  • If tax is set in the Collect for Stripe app, it will be added to this amount. If desired, set tax to 0% inside Collect and calculate your own taxes & fees. The app will simply charge the amount provided.
  • If tipping is enabled in Collect, the option to add that gratuity will be available to customers in addition to the provided amount.

Description​

Describe the charge here. This will translate directly to the description field for this Stripe charge in your Dashboard.

Encode as you would any other URL string.

description=This%20is%20my%20first%20charge

Callback​

Provide any route here and Collect will automatically send customers here after charge completion (or failure) with a result, finalAmount and a chargeId.

callback=https://mywebsite.com/hook

Use the chargeId to look up this new charge in Stripe and get all the details if needed. See Retrieve the Charge for more.

Currency​

At this time, there is no currency parameter during an integrated charge. Collect for Stripe will charge the amount provided in whatever currency is chosen within your settings.


Charge A Customer​

This action works just like that of a single charge, but requires a customerId parameter.

https://app.collectforstripe.com/launchApp?action=chargeCustomer&customerId=[stripeCustomerId]&amount=[amountString]&description=[description]&callback=[callbackURL]

or

collectforstripe://?action=chargeCustomer&customerId=[stripeCustomerId]&amount=[amountString]&description=[description]&callback=[callbackURL]

Action​

required

Tell the app what type of action to take. In this case, you want to chargeCustomer.

action=chargeCustomer

Customer ID​

required

In Stripe, this is the customer_id of the desired existing customer to charge. Find this in your Stripe Dashboard under Customers.

customerId=cus_1234567890

Amount​

See Capture A Single Charge → Amount

Description​

See Capture A Single Charge → Description

Callback​

See Capture A Single Charge → Callback


Retrieve the Charge​

At the end of a charge, Collect will route to your provided callback. The system will automatically append a result parameter so you can confirm success or failure.

https://mywebsite.com/hook?result=[success/fail]

Success​

Check the result parameter to confirm a successful charge. Collect also adds the amount charged after all taxes and/or tip as finalAmount.

https://mywebsite.com/hook?result=success&finalAmount=1.00&chargeId=ch_0123456789

The main parameter for you to retrieve all relevant charge information is chargeId. This is the actual Stripe charge id, which you can use to query Stripe's API and continue in your own app as needed.

Fail​

In the event a triggered charge was declined or canceled, Collect will route to your callback with 'fail' as the result.

https://mywebsite.com/hook?result=fail