All guides

SDK guide

Build crypto payment flows with the MakePay Swift SDK

The MakePay Swift SDK is for Swift teams that want Swift Package Manager support for payment links, settings, checkout URLs, and webhook verification.

Swift SDK7 min readUpdated 2026-05-14

Swift backends, Vapor services, internal tools, and Apple-platform teams often need one shared package for creating MakePay payment links and verifying signed webhook events.

Use the SDK from trusted backend code. API keys and webhook secrets should stay on the server, while mobile apps should call your backend or open public MakePay checkout links.

Where the SDK fits

Use the Swift SDK when Swift owns the backend workflow: creating links, building hosted checkout URLs, reading settings, and reconciling signed webhook events.

Do not embed MakePay API key secrets in iOS, macOS, tvOS, or watchOS applications. Apps should call a backend route or open a public payment link generated by trusted infrastructure.

Swift Package Manager distribution

The SDK is distributed as a Swift package with a Package.swift manifest, semantic version tags, and a public GitHub repository that Swift Package Index can crawl.

The package imports as MakePay and uses Swift Crypto for HMAC webhook verification across Apple platforms and server-side Swift environments.

Webhook safety

Webhook verification is a core SDK responsibility. Verify the x-makepay-signature header against the exact raw body before changing an order, entitlement, invoice, or subscription state.

Keep handlers idempotent and store MakePay payment-link UIDs so retries and manual resends do not double-fulfill an order.

FAQ

Can the Swift SDK run inside an iOS app?

The URL helpers can run in app code, but API key flows and webhook secrets must stay on trusted backend infrastructure.

Does the package support Swift Package Manager?

Yes. The package is built for Swift Package Manager and public indexing through Swift Package Index.