{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["json-schema"]},"type":"markdown"},"seo":{"title":"Start Payment","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":["openapi"],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"start-payment","__idx":0},"children":["Start Payment"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"taptopaysdkstartpaymenttransactiondetail-transactiondetail-async-throws","__idx":1},"children":["tapToPaySdk.startPayment(transactionDetail: TransactionDetail) async throws"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransactionDetail"]}," and invoke ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tapToPaySdk.startTransaction()"]}," function to start a payment."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/in-person-payments/tap-to-pay/ios/sdk/transaction-detail"},"children":["TransactionDetail"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"public func startPayment(transactionDetail: TyroTapToPaySDK.TransactionDetail) async throws -> TyroTapToPaySDK.TransactionOutcome\n","lang":"swift"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters","__idx":2},"children":["Parameters"]},{"$$mdtype":"Tag","name":"JsonSchema","attributes":{"schema":{"type":"object","properties":{"transactionDetail":{"type":"TransactionDetail","description":"The request parameters for the transaction"}},"required":["transactionDetail"]},"options":{"schemaExpansionLevel":1},"schemaResolved":{"openapi":"3.1.0","components":{"schemas":{"__root":{"type":"object","properties":{"transactionDetail":{"type":"TransactionDetail","description":"The request parameters for the transaction"}},"required":["transactionDetail"]}}}},"schemaResolvedErrors":[]},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns","__idx":3},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransactionOutcome"]}," containing detailed information about the result of the refund transaction."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/in-person-payments/tap-to-pay/ios/sdk/transaction-outcome"},"children":["TransactionOutcome"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"throws","__idx":4},"children":["Throws"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["It is strongly recommended to handle errors thrown by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tapToPaySDK.startPayment()"]}," otherwise your App will crash."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"taptopaysdkerrortransactionerrorerrormessage-string","__idx":5},"children":["TapToPaySDKError.transactionError(errorMessage: String)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Throws ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TapToPaySDKError.transactionError"]}," when there was an issue with the transaction."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/in-person-payments/tap-to-pay/ios/sdk/errors"},"children":["TapToPaySDKError"]}," for more details on errors thrown."]}]},"headings":[{"value":"Start Payment","id":"start-payment","depth":1},{"value":"tapToPaySdk.startPayment(transactionDetail: TransactionDetail) async throws","id":"taptopaysdkstartpaymenttransactiondetail-transactiondetail-async-throws","depth":2},{"value":"Parameters","id":"parameters","depth":3},{"value":"Returns","id":"returns","depth":3},{"value":"Throws","id":"throws","depth":3},{"value":"TapToPaySDKError.transactionError(errorMessage: String)","id":"taptopaysdkerrortransactionerrorerrormessage-string","depth":4}],"frontmatter":{"title":"Start Payment","seo":{"title":"Start Payment"}},"lastModified":"2026-09-02T01:02:13.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/in-person-payments/tap-to-pay/ios/sdk/start-payment","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}