{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-ios/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Credentials & Environments | iOS Tap to Pay on iPhone SDK Reference","description":"The Finix API credentials, merchant details, and Device ID the Tap to Pay on iPhone SDK needs, and how Sandbox and Production environments work.","siteUrl":"https://docs.finix.com/","llmstxt":{"hide":false,"sections":[{"title":"Getting Started","includeFiles":["guides/getting-started/**/*.md"],"excludeFiles":[]},{"title":"Online Payments","includeFiles":["guides/online-payments/**/*.md"],"excludeFiles":["guides/online-payments/payment-features/fsa-hsa-non-healthcare-mcc.md"]},{"title":"In-Person Payments","includeFiles":["guides/in-person-payments/**/*.md"],"excludeFiles":[]},{"title":"Subscriptions","includeFiles":["guides/subscriptions/**/*.md"],"excludeFiles":[]},{"title":"After the Payment","includeFiles":["guides/after-the-payment/**/*.md"],"excludeFiles":[]},{"title":"Managing Operations","includeFiles":["guides/managing-operations/**/*.md"],"excludeFiles":[]},{"title":"Platform Payments","includeFiles":["guides/platform-payments/**/*.md"],"excludeFiles":[]},{"title":"Payouts","includeFiles":["guides/payouts/**/*.md"],"excludeFiles":[]},{"title":"Low-Code / No-Code","includeFiles":["low-code-no-code/**/*.md"],"excludeFiles":[]},{"title":"Developers","includeFiles":["additional-resources/developers/**/*.md"],"excludeFiles":[]},{"title":"Plugins","includeFiles":["additional-resources/plugins/**/*.md"],"excludeFiles":[]},{"title":"Industry Considerations","includeFiles":["guides/industry-considerations/**/*.md"],"excludeFiles":[]},{"title":"Regional Considerations","includeFiles":["guides/regional-considerations/**/*.md"],"excludeFiles":[]},{"title":"Release Notes","includeFiles":["release-notes/**/*.md"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"credentials-and-environments","__idx":0},"children":["Credentials and environments"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"what-you-need","__idx":1},"children":["What you need"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK needs five values. Collect them before you initialize:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Example"},"children":["Example"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Where to find it"},"children":["Where to find it"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["API username"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["USxxxxxxxxxxxxx"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Finix Dashboard. Your API credential pair for the target environment."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["API password"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{your_api_secret}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Issued with the username. Treat it as a secret."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Merchant ID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MUxxxxxxxxxxxxx"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The Finix Merchant the payments settle to."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Merchant MID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["123456789012345"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The merchant's processing MID, shown on the merchant's profile."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Device ID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DVxxxxxxxxxxxxx"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Created in ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/device-setup"},"children":["Set up a Device"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You also pass the merchant's display name; Apple shows it to the Buyer on the tap screen."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"environments","__idx":2},"children":["Environments"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An environment is a pairing of ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Finix"]}," and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Apple"]}," environments, and the two must match on the test device:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Finix"]},": Sandbox and Production are completely separate, and each has its own credentials and merchants. In the SDK, the environment is explicit: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".sandbox"]}," is for integration and testing (all examples in this guide run against Sandbox); ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".production"]}," is for live payments. A configuration's credentials, merchant, and Device must all belong to the same environment; mixing environments is a common cause of authentication and token errors."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Apple"]},": the Apple Account signed in on the iPhone determines which Apple environment handles the Terms and Conditions flow and card reads. Sandbox testing requires a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sandbox Apple Account"]}," (created in App Store Connect) signed in as the device's primary Apple Account; see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/testing#set-up-the-iphone-for-sandbox-testing"},"children":["Set up the iPhone for sandbox testing"]}," for the setup steps. In Production, the merchant's iPhone is signed in with their regular Apple Account."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A complete Sandbox test setup uses a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".sandbox"]}," configuration with Sandbox credentials, merchant, and Device, on an iPhone signed in with a Sandbox Apple Account. For Production validation, use a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".production"]}," configuration with Production credentials, merchant, and Device, on an iPhone signed in with a regular Apple Account."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Going live"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When you switch to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".production"]},", swap in Production API credentials, a Production merchant, and a Device created against the Production API (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://finix.live-payments-api.com"]},"), and validate on an iPhone signed in with a regular Apple Account instead of a Sandbox tester. The rest of your integration stays the same."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"keep-credentials-off-the-client-where-you-can","__idx":3},"children":["Keep credentials off the client where you can"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["API credentials embedded in an app binary can be extracted. Instead of compiling them in, have your backend deliver the credential pair, merchant details, and Device ID to the app at session start, scoped to the signed-in merchant. The SDK holds them in memory and only uses them over TLS connections to Finix."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/device-setup"},"children":["Set up a Device"]},"."]}]},"headings":[{"value":"Credentials and environments","id":"credentials-and-environments","depth":1},{"value":"What you need","id":"what-you-need","depth":2},{"value":"Environments","id":"environments","depth":2},{"value":"Keep credentials off the client where you can","id":"keep-credentials-off-the-client-where-you-can","depth":2}],"frontmatter":{"seo":{"title":"Credentials & Environments | iOS Tap to Pay on iPhone SDK Reference","description":"The Finix API credentials, merchant details, and Device ID the Tap to Pay on iPhone SDK needs, and how Sandbox and Production environments work."}},"lastModified":"2026-08-11T19:49:07.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ios/tap-to-pay/credentials","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}