Coder Social home page Coder Social logo

payments-sample-app's Introduction

A Sample Payments Application

Here you will find a sample web application that demonstrates some of the features of the Circle Payments API.

Circle API Documentation Portal

For full details on what you can do with Circle's APIs and how to use them, please check the API documentation portal.

Clone and configure the sample app

You can manually clone the sample app by running:

$ git clone https://github.com/circlefin/payments-sample-app.git

Install the dependencies

Run the following to install the dependencies:

$ yarn install

Run the sample app locally

Run the following to run the sample app locally:

$ yarn dev

The sample app is now running at: http://localhost:3011/.

After you generate an API key for the sandbox environment, enter it on the settings tab on the top right corner of the sample app.

You are now ready to use the sample app and test some payments flows. In a production environment these payments would settle in the USDC stablecoin.

Test Card Numbers

To automatically trigger certain responses from the Circle Payments API, you can use some pre-defined test card numbers that exercise specific behaviors.

Change API base url

By default the API base url will be set to https://api-sandbox.circle.com.

If you would like to point to another API base url you need to create a .env file in the project's root folder and configure it as follows:

$ echo BASE_URL=https://[base-url.com] > .env

Nuxt

This sample app was written with Nuxt. For a more detailed explanation of how Nuxt works, check the Nuxt.js docs.

Tests

The sample app uses jest for testing. You can find the tests in the test folder.

To run the tests:

$ yarn test

To watch the tests:

$ yarn test:watch

payments-sample-app's People

Contributors

kristinfritsch avatar tarunkumar2 avatar jcantwell avatar timmy-circle avatar dependabot[bot] avatar alandn-circle avatar masterxen avatar olegz-circle avatar mcinar-circle avatar tsuikm avatar grantmike avatar pkennedy-circle avatar wcai-circle avatar belljustin avatar reginatto avatar dflorness-circle avatar mboorstin-circle avatar phalski avatar tbrandt-circle avatar svohra-circle 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.