Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Airwallex Payment Demo - Node Server

This directory contains a simple example of a Node server integrated with the Airwallex Payment API. The server demonstrates how to create and retrieve payment intents.

Prerequisites

  • node.js
  • npm or yarn package manager

Installation and Development

  1. Clone the root airwallex-payment-demo project to your local machine
git clone https://github.com/airwallex/airwallex-payment-demo
  1. Navigate into the react directory with cd node

  2. Install the package with yarn install or npm install

  3. Copy the contents of .env_copy into a .env file by running cp .env_copy .env

  4. Run the project in development mode with npm start or yarn start. See the project at localhost:3002

Configuration

You must change your application keys in the .env file to create/retrieve payment intents.

Your CLIENT_ID and API_KEY can be found on the Airwallex Webapp Platform under Account Settings > Developer. Do not share these keys because they allow access to your payments.

Usage

For demo purposes, both routes below can be accessed with a GET request. Be sure to change the create route to a POST request in production to protect your keys and payment details.

Find more details about the Airwallex API here!

Author

Shirly Chen