- Clone the project
- Install dependencies:
$ npm install
-
Create secret and publishable API keys
- Add your secret API key to the
tilledSecretApiKey
variable inapp.js
- Add your publishable API Key to the
pk_PUBLISHABLE_KEY
variable inindex.html
- Add your secret API key to the
-
View your list of connected accounts and either use the auto-created
Shovel Shop (demo)
account or create your own connected account. Note: Prefix the name of the account with an asterisk (ex. '*The Surf Shop') to bypass needing to submit an onboarding form.- Add an active connected Account ID to the
account_id
variable inindex.html
- Add an active connected Account ID to the
-
Run the sample server:
$ node app.js
- Navigate to http://localhost:5000 in your browser, enter
4037111111000000
as the test card number with a valid expiration date and123
as the CVV Code and click Pay - Optional: Look in the browser's developer console to see payment intent creation logs
- Go here to see your payment
- In the browser, check the save payment checkbox, fill in the additional fields and click Save.
- View the paymentMethod.id in the alert or the console.
You can try out attaching payment methods to customers, adding metadata, including platform fees on payment intents and much, much more via the Tilled API.