Skip to content
⌘K
InboxAsk a human

iOS Quick Start

Updated by Lukas Dumskis

Get started with Volume in less than 5 minutes and start accepting payments seamlessly within your iOS app.

The Volume xcframework provides a ready-to-use UI component that integrates the Volume checkout directly into your app, enabling a fast setup and frictionless payment flow for your customers.


1. Getting Started

Install the Volume xcframework via CocoaPods

Add the following to your Podfile:

platform :ios, '14.0' source 'https://github.com/CocoaPods/Specs.git' source 'https://' + ENV['GIT_AUTHORIZATION'] + '@github.com/getvolume/VolumePods.git' target 'SampleApp' do use_frameworks! pod 'Alamofire' pod 'VolumePayComponent', '2.7.1' end

Here, GIT_AUTHORIZATION is an environment variable containing your GitHub user and token in the format:

volume-public:<token>

The token is provided by Volume. Example:

volume-public:github_pat_72A4HWM8I0LwB3_T0kenProv1dedByV0lume__V3o9ZRvFBM5cmENW8vf8ES365KNJ7b6u7gY1

Set the environment variable in your terminal:

export GIT_AUTHORIZATION=volume-public:github_pat_72A4HWM8I0LwB3_T0kenProv1dedByV0lume__V3o9ZRvFBM5cmENW8vf8ES365KNJ7b6u7gY1

⚠️ This will only work in the current terminal session. For a permanent setup, add it to your .bashrc or .zshrc.

Troubleshooting:
If you encounter the Cocoapods runtime error

RuntimeError - [Xcodeproj] Unknown object version (56).

see the solution on StackOverflow.


2. Setting Up the Volume Provider

The VolumeProvider must be placed at the root of your application. It handles global configuration for the SDK.

Once initialized, you can add a VolumeButtonComponent to your app screen.

import VolumePayComponent @main struct ExampleApp: App { init() { do { try volumeProvider.initialize( volumeSetup: VolumeSetup( applicationId: "", // Provided by Volume volumeEnvironment: "sandbox", volumeEventListener: DefaultVolumeEventListener { message in debugPrint(message) }, showSandboxBanks: true, maxPaymentAmount: 15000, minPaymentAmount: 1, volumeTranslations: [ "DE": VolumeTranslations( buttonText: "Bezahlen mit", headingText: "Bezahlen Sie mit Ihrer Banking-App", modalTitleText: "Bank-App auswählen", modalSubtitleText: "Ihre Zahlung ist durch die Sicherheit Ihrer Bank geschützt", moreBanksText: "+ mehr", selectBankButtonText: "Wählen Sie zum Bezahlen die Bank-App aus", payerDetailsText: "Bitte geben Sie Ihre Daten ein:", accountHolderNameText: "Vorname und Nachname", ibanText: "IBAN", continueInBankText: "Weiter in der Bank-App" ) ] ) ) } catch { debugPrint(error) } } var body: some Scene { WindowGroup { ExampleAppView() } } }

3. Adding the Volume Button

In your SwiftUI view, add the VolumeButtonComponent with payment details and event listeners:

struct ExampleAppView: View { @State private var currency: String = "EUR" @State private var country: String = "DE" @State private var language: LanguageCode = "EN" @State private var merchantPaymentId: String = generateMerchantPaymentId() var body: some View { let volumeButtonEventListener = DefaultVolumeButtonEventListener { event in switch event { case .navigateToPaymentConsent: self.merchantPaymentId = generateMerchantPaymentId() default: break } } return VStack { VolumeButtonComponent( amount: 0.1, reference: "Example Reference", currency: $currency, country: $country, merchantPaymentId: merchantPaymentId, isEnabled: true, language: $language, volumeButtonEventListener: volumeButtonEventListener, metadata: [ "type": "shirt", "color": "black", "owner": [ "position": "CTO", "description": "A tall guy", "details": [ "name": "John", "surname": "Doe", ], ], "relatedItems": [ [ "itemName": "trousers", "color": "blue"], [ "itemName": "shoes", "color": "white"], ] ], merchantProvidedPayerDetails: MerchantProvidedPayerDetails( email: "john.doe@example.com", name: "John Doe", phone: "+44 20 7946 0958", account: PayerAccount( holderName: "John Doe", accountNumber: "12345678", sortCode: "123456", iban: "DE89370400440532013000" ), address: PayerAddress( addressLine1: "123 Main Street", addressLine2: "Apt 4B", countryCode: "GB", town: "London", postCode: "SW1A 1AA" ), useForUxFlowOptimisation: true ) ) .padding(.horizontal, 15.0) .padding(.vertical, 50) } } } func generateMerchantPaymentId() -> String { "This should be unique value" // TODO: Fetch from backend }

Supported Countries

Country

Code

Currency

United Kingdom

GB

GBP

Germany

DE

EUR

France

FR

EUR

Netherlands

NL

EUR

Spain

ES

EUR

Belgium

BE

EUR


Key Properties

The SDK exposes properties for configuration, customization, and event handling. Expand the sections in the official documentation to see:

  • VolumeProvider: global app configuration

  • VolumePaymentView: payment setup parameters (amount, currency, reference, etc.)

  • MerchantProvidedPayerDetails: pre-fill user details to optimize the flow

⚠️ When using IBAN, ensure the country parameter matches the IBAN country.


4. Bank Detection Setup (Info.plist)

Apple requires you to declare supported banking apps in your app’s Info.plist. Add them under:

<key>LSApplicationQueriesSchemes</key> <array> <string>BMBGB</string> <string>revolut</string> <string>natwestbank</string> <string>monzo</string> <string>santanderretail</string> <string>rbs</string> <string>lloyds-retail</string> <string>ukcomhsbcmobilebanking</string> <string>zappcfi437759</string> <string>hsbc-pwnwguti5z</string> <string>zapp</string> <string>launchAIB</string> <string>ie.aib.mobilebanking</string> <string>BOIOneAPP</string> <string>halifax-retail</string> <string>starlingbank</string> <string>tescobank</string> <string>tsbmobile</string> <string>sparda-app</string> <string>bankingappspardaproduktion</string> <string>secureappspardaproduktion</string> <string>sapp-pushtan</string> <string>sapp-invest</string> <string>de.sparda.securego</string> <string>bos-retail</string> <string>launchbca</string> <string>comfirstdirectbankingonthego</string> <string>cs-com.virginmoney.uk.mobile.ios</string> <string>transferwise</string> <string>ybssavings</string> <string>chase-international</string> </array>

This allows Volume to detect installed banking apps and display only relevant banks.


5 Testing

  • Always start with the sandbox environment before going live.

  • In sandbox, banking apps won’t open directly; instead, payments simulate via browser-based flows.

  • Each bank may behave differently during testing.

👉 Check the Sandbox Bank Credentials for accounts you can use during testing.

For support, contact support@getvolume.com.

Volume Events

The Volume iOS SDK emits events to help you track and handle the different stages of the payment flow. Below is a list of all supported events and their meanings.


PaymentInitiated

'PaymentInitiated'

Emitted when a payment is first initiated.


'NavigateToPaymentConsent'

Triggered when the payment consent is prepared and the user is redirected to their banking app for approval.


PaymentError

'PaymentError'

Emitted when an initiated payment fails.

  • Typically caused by bank-specific rules or errors.

  • Contains a message and an optional exception object for debugging.


GenericError

'GenericError'

Emitted when a general SDK-related error occurs.

  • For example, if the list of supported banks cannot be retrieved from the Volume server.

  • Contains an EventError object with both message and Error.


PaymentAmountTooSmall

'PaymentAmountTooSmall'

Emitted when the provided payment amount is below the allowed minimum.


PaymentAmountTooLarge

'PaymentAmountTooLarge'

Emitted when the provided payment amount exceeds the allowed maximum.