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
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 Install the package and its dependencies:For a Dart app, run
dependencies section of your app’s pubspec.yaml:dart pub get instead. See the generated generated/moonpay_api/README.md for imports, API methods, and authentication configuration.