We have built a sample web application to demonstrate the use of Circle Payments API. You can clone the Github repository, configure the app and run it locally. The sample web application's source code is available at https://github.com/circlefin/payments-sample-app.
Before you start, you should make sure you have an API key on the sandbox environment. If you haven't yet created a sandbox account, follow the steps on the getting started guide.
Once you have generated your API key, enter it on the settings tab on the top right corner of the sample application.
You can clone the sample payments application Github repository, configure it and run it locally in just a few steps.
# Clone the sample app Github repository git clone https://github.com/circlefin/payments-sample-app.git # Change into the sample app folder cd payments-sample-app # Create a .env file and configure the base url for api calls echo BASE_URL=https://api-sandbox.circle.com > .env # Install the dependencies yarn install
To run the sample application locally, execute the following command.
# Run the sample app locally yarn dev
Take the API key you generated earlier, and enter it on the settings tab on the top right corner of the sample application.
The sample web application has two broad sections, accessible via the left menu. The first one is the
Sample Flows section, where you have example screens for the basic Circle Payments API operations such as creating a card and making a payment.
The second section is the
API Viewer section, where you can quickly input some parameters and inspect the request and response payloads being exchanged with the Circle Payments API. This is typically useful to understand the various endpoints and schemas before you jump straight into coding your own server side integration.
Updated about 2 years ago