{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-ios/sidebars.yaml","oas-api/index.yaml":"oas-api/index.yaml"},"props":{"metadata":{"markdoc":{"tagList":["code-walkthrough","step","openapi-code-sample","tabs","tab","code-snippet","json-schema","img"]},"type":"markdown"},"seo":{"title":"Credentials | iOS Card Present SDK Reference","description":"Reference for FinixConfig and APICredentials — the credentials used to initialize the Finix iOS Card Present SDK.","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":["openapi"],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"CodeWalkthrough","attributes":{"__idx":1,"filters":{},"filesets":[{"files":[{"path":"ios/card-present/_filesets/credentials.swift","content":[{"start":0,"condition":{"steps":["finix-config-shape"]},"children":["FinixConfig(","    environment: environment,","    credentials: Finix.APICredentials(username: username, password: password),","    merchantId: merchantId,","    mid: mid,","    deviceType: .Pax,","    deviceId: deviceId,","    serialNumber: serialNumber // optional",")"]},"",{"start":12,"condition":{"steps":["api-credentials"]},"children":["Finix.APICredentials(","    username: \"USxxxxxxxxx\",","    password: \"your_api_secret\"",")"]},"",{"start":19,"condition":{"steps":["environment"]},"children":["// Sandbox","FinixConfig(","    environment: .Sandbox,","    credentials: Finix.APICredentials(username: \"USxxxxxxxxx\", password: \"your_api_secret\"),","    merchantId: \"MUxxxxxx\",","    mid: \"\",","    deviceType: .Pax,","    deviceId: \"\"",")","","// Production","FinixConfig(","    environment: .Production,","    credentials: Finix.APICredentials(username: \"USxxxxxxxxx\", password: \"your_api_secret\"),","    merchantId: \"MUxxxxxx\",","    mid: \"\",","    deviceType: .Pax,","    deviceId: \"\"",")"]},""],"metadata":{"steps":["finix-config-shape","api-credentials","environment"]},"basename":"credentials.swift","language":"swift"}],"downloadAssociatedFiles":[]}],"steps":[{"id":"finix-config-shape","heading":"FinixConfig shape"},{"id":"api-credentials","heading":"Finix.APICredentials shape"},{"id":"role-merchant-credentials","heading":"Create ROLE_MERCHANT credentials"},{"id":"role-partner-credentials","heading":"Create ROLE_PARTNER credentials"},{"id":"environment","heading":"Sandbox and production"}],"inputs":{},"toggles":{}},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"credentials","__idx":0},"children":["Credentials"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FinixConfig"]}," holds the credentials and device configuration used to initialize the SDK. Pass it to the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FinixClient"]}," constructor."]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"finix-config-shape","heading":"FinixConfig shape"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"FinixConfig(\n    environment: Finix.Environment,\n    credentials: Finix.APICredentials,\n    merchantId: String,\n    mid: String,\n    deviceType: DeviceType,\n    deviceId: String,\n    serialNumber: String? = nil\n)\n","lang":"swift"},"children":[]},{"$$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":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["environment"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Finix.Environment"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".Sandbox"]}," for testing, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".Production"]}," for live payments."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["credentials"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Finix.APICredentials"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your Finix API username and password. See ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#apicredentials"},"children":["APICredentials"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchantId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your Finix Merchant ID (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MU..."]},")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mid"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Merchant identifier number. Pass an empty string if not required."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deviceType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DeviceType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".Pax"]}," for the PAX D135."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deviceId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The Finix Device ID (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DV..."]},") created during ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/card-present/device-setup"},"children":["device setup"]},". Pass an empty string on first initialization; update via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["finixClient.update(deviceId:)"]}," after device discovery."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["serialNumber"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional. The physical serial number printed on the PAX D135 device."]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"apicredentials","__idx":1},"children":["APICredentials"]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"api-credentials","heading":"Finix.APICredentials shape"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"Finix.APICredentials(\n    username: String,\n    password: String\n)\n","lang":"swift"},"children":[]},{"$$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":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["username"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your Finix API key."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["password"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your Finix API secret."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The API credentials you use must have the appropriate role:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ROLE_MERCHANT"]}," - for single-merchant devices. Recommended for dedicated point-of-sale hardware."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ROLE_PARTNER"]}," - required for multi-merchant devices and split transactions."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"creating-api-credentials","__idx":2},"children":["Creating API Credentials"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ROLE_MERCHANT"]}," credentials to scope a device to a single merchant. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ROLE_PARTNER"]}," credentials if the device will process payments across multiple merchants. Note that split transactions require ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ROLE_PARTNER"]}," credentials."]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"role-merchant-credentials","heading":"Create ROLE_MERCHANT credentials"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once created, you can use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ROLE_MERCHANT"]}," credentials across multiple devices as long as the devices are associated to the same Merchant."]},{"$$mdtype":"Tag","name":"OpenApiCodeSample","attributes":{"descriptionFile":"oas-api/index.yaml","operationId":"createIdentity","exampleKey":"User - ROLE_MERCHANT","parameters":{},"environments":{}},"children":[]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Example","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"../../api/components/examples/identities/responses/json/createUserRoleMerchant.jsonc","language":"json","title":"User - ROLE_MERCHANT","header":{"title":"User - ROLE_MERCHANT","controls":{"copy":{}}},"lang":"json","source":"{\n  \"id\": \"USoR21bF52KLZpbQCptrexpH\",\n  \"created_at\": \"2025-12-08T18:35:51.41Z\",\n  \"updated_at\": \"2025-12-08T18:35:51.41Z\",\n  \"created_by\": \"USfdccsr1Z5iVbXDyYt7hjZZ\",\n  \"email\": null,\n  \"enabled\": true,\n  \"first_name\": null,\n  \"identity\": \"IDjvxGeXBLKH1V9YnWm1CS4n\",\n  \"last_name\": null,\n  \"last_used_date\": null,\n  \"password\": \"f2fd7118-66c3-495c-8942-8178e0ea9d0c\",\n  \"role\": \"ROLE_MERCHANT\", // [!code highlight]\n  \"tags\": {},\n  \"_links\": {\n    \"self\": {\n      \"href\": \"https://finix.sandbox-payments-api.com/users/USoR21bF52KLZpbQCptrexpH\"\n    },\n    \"applications\": {\n      \"href\": \"https://finix.sandbox-payments-api.com/applications\"\n    },\n    \"application\": {\n      \"href\": \"https://finix.sandbox-payments-api.com/applications/APc9vhYcPsRuTSpKD9KpMtPe\"\n    }\n  }\n}\n"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"API Definition","disable":false},"children":[{"$$mdtype":"Tag","name":"JsonSchema","attributes":{"schema":{"$ref":"../../api/components/schemas/resources/users/user.yaml"},"options":{},"schemaResolved":{"openapi":"3.1.0","components":{"schemas":{"__root":{"$ref":"#/components/schemas/user"},"id":{"type":"string","minLength":1,"description":"The ID of the resource."},"created_at":{"type":"string","format":"date-time","description":"Timestamp of when the object was created."},"updated_at":{"type":"string","format":"date-time","description":"Timestamp of when the object was last updated."},"tags":{"type":"object","title":"tags","additionalProperties":true,"description":"Include up to 50 `key: value` pairs to annotate requests with custom metadata.\n- Maximum character length for individual `keys` is 40.\n- Maximum character length for individual `values` is 500.\n(For example, `order_number: 25`, `item_type: produce`, `department: sales`)","nullable":true},"user":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/id"},"created_at":{"$ref":"#/components/schemas/created_at"},"updated_at":{"$ref":"#/components/schemas/updated_at"},"created_by":{"type":"string","description":"The ID of the application user that created _this_ user."},"email":{"type":"string","minLength":1,"nullable":true,"description":"The email address of the application user (max 100 characters)."},"enabled":{"type":"boolean","description":"Whether the `User` is enabled and active. Set to `false` to disable the `User`."},"first_name":{"type":"string","description":"The first name of the User ID (Max 50 characters).","nullable":true,"maxLength":50},"identity":{"type":"string","example":"IDxxxxxxxxxxxxxxxxxx","description":"ID of the `Identity` that the `User` object was created under.","nullable":true},"last_name":{"type":"string","description":"The last name of the User ID (Max 50 characters).","nullable":true,"maxLength":50},"last_used_date":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp of when the user credentials were last used to make an API call."},"password":{"type":"string","description":"The `password` you'll use to authetnicate requests.","nullable":true},"role":{"enum":["ROLE_PLATFORM","ROLE_PARTNER","ROLE_MERCHANT"],"type":"string","description":"Details the level of access the [`User`](#Users) has available."},"tags":{"$ref":"#/components/schemas/tags"},"_links":{"type":"object","description":"For your convenience, every response includes several URLs which link to resources relevant to the request. You can use these `_links` to make your follow-up requests and quickly access relevant IDs.","properties":{"application":{"type":"object","description":"Link to the `Application` the resource was created under.","properties":{"href":{"type":"string"}}},"applications":{"type":"object","properties":{"href":{"type":"string"}}},"self":{"type":"object","description":"Link to the resource that was used in the request.","properties":{"href":{"type":"string"}}}}}}}}}},"schemaResolvedErrors":[]},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"role-partner-credentials","heading":"Create ROLE_PARTNER credentials"},"children":[{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Log in to the Finix dashboard."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select the environment for which you would like to create API credentials (Sandbox or Live)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In the bottom left corner, select the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Developer"]}," section."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In the API Keys section, select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create API Key"]},"."]}]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/developer-api-keys-create.734cc8d9fcbceaa6500a394d7b7a350bb854b952c502fe5cb57d74ee9792b476.08ff7529.png","alt":"Create API Key","withLightbox":false},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"sandbox-and-production","__idx":3},"children":["Sandbox and Production"]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"environment","heading":"Sandbox and production"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["environment"]}," to match the environment your device is designated for. Devices cannot switch environments after designation."]},{"$$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":"Environment"},"children":["Environment"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".Sandbox"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sandbox"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".Production"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Production"]}]}]}]}]}]}]}]},"headings":[{"value":"Credentials","id":"credentials","depth":1},{"value":"APICredentials","id":"apicredentials","depth":2},{"value":"Creating API Credentials","id":"creating-api-credentials","depth":2},{"value":"Sandbox and Production","id":"sandbox-and-production","depth":2}],"frontmatter":{"seo":{"title":"Credentials | iOS Card Present SDK Reference","description":"Reference for FinixConfig and APICredentials — the credentials used to initialize the Finix iOS Card Present SDK."},"markdown":{"toc":{"hide":true}},"footer":{"hide":true}},"lastModified":"2026-08-28T19:53:05.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ios/card-present/credentials","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}