Skip to content

Repository files navigation

Machine payments

This repository demonstrates how to implement machine-to-machine payments using different protocols:

  • MPP — The Machine Payments Protocol using both Shared Payment Tokens for card payments as well as on-chain crypto payments
  • x402 — The x402 HTTP payment protocol using on-chain crypto payments

Prerequisites

Getting Started

  1. Clone this repository:
git clone https://github.com/stripe-samples/machine-payments
cd machine-payments
  1. Copy the environment template:
cp .env.template .env
# Edit .env with your credentials
  1. Install dependencies for all samples:
make install
  1. Common repository-wide commands:
  • make install — install dependencies for every sample in the repo
  • make lint — run each sample's linter and formatting checks
  • make format — apply automatic formatting fixes in each sample
  • make typecheck — run type checking or build validation for each sample
  • make test — run the automated test suite for each sample
  • make ci — run the full per-sample CI command (install, lint, typecheck, and test)
make install
make lint
make format
make typecheck
make test
make ci
  1. Follow the README in your chosen integration directory for the sample-specific make run command and test request:

Support

License

MIT

Releases

Packages

Used by

Contributors

Languages