Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dodo Payments Mobile SDK

Join Discord License: Apache 2.0

Native checkout SDKs for Dodo Payments' hosted checkout, for iOS, Android, React Native, and Flutter.

Each SDK opens the checkout in a system browser surface. SFSafariViewController on iOS, a Custom Tab (androidx.browser.customtabs) on Android.

Install

Swift (iOS)

// Package.swift
.package(url: "https://github.com/dodopayments/dodopayments-mobile-sdk-ios", from: "1.0.0")

Kotlin (Android)

// build.gradle.kts
implementation("com.dodopayments.api:checkout-android:1.0.1")

React Native

npm i @dodopayments/react-native-checkout

Flutter

# pubspec.yaml
dependencies:
  dodopayments_checkout: ^1.0.0

Check each SDK's README (linked below) for setup and usage.

SDKs

Platform Package Docs
iOS (Swift) Swift Package Manager dodopayments-mobile-sdk-ios/README.md
Android (Kotlin) com.dodopayments.api:checkout-android kotlin/README.md
React Native @dodopayments/react-native-checkout react-native/README.md
Flutter dodopayments_checkout flutter/README.md

React Native and Flutter are thin wrappers over the native iOS and Android cores — they carry no checkout logic of their own.

Shared contract

All four SDKs expose the same shape, so integrating one means you already understand the others:

  • One call — start(...) — that returns a CheckoutResult with a status (succeeded / failed / cancelled / pending / expired).
  • The result is a UI hint, not proof of payment. None of these SDKs call the Dodo API or hold an API key; grant access from your backend via webhook or by retrieving the payment with your secret key.
  • An optional onEvent callback for logging (opened / return_received / closed) — never authoritative.
  • A CheckoutError / CheckoutException for misuse or platform failure only (INVALID_CHECKOUT_URL, INVALID_RETURN_URL, ALREADY_IN_PROGRESS, PLATFORM_ERROR). A user cancelling or a declined payment is always a result, never a thrown error.
  • Abandoned-session recovery, for when the app is killed mid-checkout.

See each SDK's README for the exact API and platform setup.

Project structure

dodopayments-mobile-sdk/
├── swift/          # iOS core (Swift Package). Git submodule → dodopayments-mobile-sdk-ios.
├── kotlin/         # Android core (Kotlin/Gradle). Published to Maven Central.
├── react-native/   # Turbo Module wrapper over the iOS/Android cores. Published to npm.
└── flutter/        # Pigeon wrapper over the iOS/Android cores. Published to pub.dev.

License

Apache License 2.0, see LICENSE for details.

About

Native checkout SDKs for Dodo Payments' hosted checkout, for iOS, Android, React Native, and Flutter

Topics

Resources

Stars

Watchers

Forks

Releases

Used by

Contributors

Languages