Git Product home page Git Product logo

simple-payment-example's Introduction

Dependencies

Get started

  • Clone the project
  • Install dependencies:
    $ npm install
    

Create a sandbox account and add your configuration values

  • Register a sandbox account

  • Create secret and publishable API keys

    • Add your secret API key to the tilledSecretApiKey variable in app.js
    • Add your publishable API Key to the pk_PUBLISHABLE_KEY variable in index.html
  • 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 in index.html
  • Run the sample server:

    $ node app.js
    

Process your first payment

Example

  • Navigate to http://localhost:5000 in your browser, enter 4037111111000000 as the test card number with a valid expiration date and 123 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

Manually create payment methods

Example

  • 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.

What's Next?

API Docs

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.

simple-payment-example's People

Contributors

dependabot[bot] avatar dpatton1992 avatar mcook08 avatar myiahm avatar petr0sec avatar tposch avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.