{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Tilia iOS SDK","description":"Tilia Wallet Developer Documentation","siteUrl":"https://thunes-tilia-docs.redocly.app/","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"tilia-ios-sdk","__idx":0},"children":["Tilia iOS SDK"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Tilia iOS SDK makes it easy to add payments natively within mobile apps."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"use-cases","__idx":1},"children":["Use Cases"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The iOS SDK v1.0 supports token-only invoices in both standard and escrow transaction flows. Refer to ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/guides/escrow-transaction"},"children":["Escrow transactions"]}," to learn more about if escrow transactions are the right fit for your business."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"prerequisites","__idx":2},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tilia SDKs are meant to be used in concert with your own api server which will communicate with Tilia APIs to retrieve things such as temporary access tokens for your authenticated users and any other data the Tilia SDK may need."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To test integrating with the Tilia SDK, instead of setting up your own server you can use a rest client to simulate the calls that your server will make to Tilia APIs (we reccommend ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://www.postman.com/product/rest-client/"},"children":["Postman"]},")."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In order to get started testing your integration with Tilia you will need access to our staging environment. To request access, please ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://www.tilia.io/sales"},"children":["contact our Sales Team"]},". Once set up on staging, you will receive this information:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Your client ID and client secret (these will be used by your server to communicate with our Tilia APIs.  It's important to keep these credentials secure and to always ensure you are properly authenticating your end users)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A test token ('TOK', unless otherwise specified)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A registered user account_id for testing payments.  This initial test user will have a USD and token wallet preloaded with enough funds to run tests.  Refer to ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://www.tilia.io/openapi/dev/accounts/openapi/other/registeraccounthandler"},"children":["Registering Users"]}," for information on creating user accounts."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"creating-a-client-credentials-access-token","__idx":3},"children":["Creating a 'Client Credentials' Access Token"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The first step of any interaction with the Tilia APIs is to create a 'Client Credentials' access token. With this token you can interact with the requisite Tilia API endpoints to gather the information required by the Tilia SDK."," ","Required token scopes: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["read_invoice"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["write_invoice  "]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["write_payment_method"]},",  ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["read_payment_method"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["write_invoices"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["write_user_tokens"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"curl --location --request POST 'https://auth.staging.tilia-inc.com/token' \\\n--header 'Content-Type: application/x-www-form-urlencoded' \\\n--data-urlencode 'client_id=<YOUR_CLIEND_ID>' \\\n--data-urlencode 'client_secret=<YOUR_CLIEND_SECRET>' \\\n--data-urlencode 'grant_type=client_credentials' \\\n--data-urlencode 'scope=read_invoice,write_invoice,write_payment_method,read_payment_method,write_invoices,write_user_tokens'\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"add-the-sdk-to-your-project","__idx":4},"children":["Add the SDK to your Project"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Using ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://cocoapods.org/"},"children":["CocoaPods"]},", add the following to your Podfile:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"pod 'TiliaSDK'\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["More information on setup can be found on ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/lindenlab/tilia-ios-sdk"},"children":["Github"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"configuration","__idx":5},"children":["Configuration"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/sdks/ios-custom-theme"},"children":["Theme Customization"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"flows","__idx":6},"children":["Flows"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/sdks/ios-tos"},"children":["Terms of Service"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/sdks/ios-checkout"},"children":["Checkout"]}," (includes 'Terms of Service' if user has not signed already)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"helper-methods","__idx":7},"children":["Helper Methods"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/sdks/ios-gettosrequiredbyuser"},"children":["getTosRequiredforUser"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/sdks/ios-getuserbalancebycurrency"},"children":["getUserBalancebyCurrencyCode"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"demo-application","__idx":8},"children":["Demo Application"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Our iOS Demo Application is an easy way to see how the Tilia SDK works. See more ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/sdks/ios-demo-app"},"children":["here"]}]}]},"headings":[{"value":"Tilia iOS SDK","id":"tilia-ios-sdk","depth":1},{"value":"Use Cases","id":"use-cases","depth":3},{"value":"Prerequisites","id":"prerequisites","depth":3},{"value":"Creating a 'Client Credentials' Access Token","id":"creating-a-client-credentials-access-token","depth":4},{"value":"Add the SDK to your Project","id":"add-the-sdk-to-your-project","depth":3},{"value":"Configuration","id":"configuration","depth":3},{"value":"Flows","id":"flows","depth":3},{"value":"Helper Methods","id":"helper-methods","depth":3},{"value":"Demo Application","id":"demo-application","depth":3}],"frontmatter":{"seo":{"title":"Tilia iOS SDK"}},"lastModified":"2026-02-05T18:12:30.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/sdks/ios-sdk","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}