Skip to main content
The MoonPay Developer Platform API is defined using an OpenAPI 3.1 specification. You can use this spec to generate typed clients for any language.

Full specification

The OpenAPI 3.1 specification is served at https://api.moonpay.com/platform/openapi.json. Use this URL in your codegen config or download the file for offline use.

Usage

TypeScript / JavaScript

Use @hey-api/openapi-ts to generate TypeScript types:
openapi-ts.config.ts

Dart / Flutter

Use the OpenAPI Generator CLI with its Dart client generator. Before you start, install Node.js with npm, Java 11 or later, and the Dart or Flutter SDK. Run the following commands from your app’s root directory. Generating the client does not require API credentials.
1

Install the generator

2

Generate the client package

This creates a Dart package named moonpay_api in generated/moonpay_api, including API methods, models, and its own pubspec.yaml.
3

Add the generated package to your app

Add this path dependency to the dependencies section of your app’s pubspec.yaml:
Install the package and its dependencies:
For a Dart app, run dart pub get instead. See the generated generated/moonpay_api/README.md for imports, API methods, and authentication configuration.

Other Languages

Use the OpenAPI Generator CLI to generate clients for 50+ languages:
See the full list of generators.