---
title: Purchase
slug: purchase
docTags: 
createdAt: 2025-05-20T11:25:58.613Z
---

# Starting a purchase

Once a device has been selected, you can start a transaction using the `startTransaction` method on your `ToroClient` instance:

```swift
toro.startTransaction(
    amount: 1000, // £10.00
    type: .purchase,
    currency: .gbp,
    metadata: nil,
    onCompleted: { receipt in
        // Called when a receipt has been generated for a transaction
        print("Transaction Completed: \(receipt)")
    },
    onCancelled: { cancellationType in
        // Called when the transaction was cancelled by the attendant or customer
        print("Transaction Cancelled: \(cancellationType)")
    },
    onError: { error in
        // Called when an error has occured during a transaction
        print("Transaction Error: \(error)")
    },
    onGratuityConfirmed: { amount, percentage in
        print("Customer confirmed a gratuity of \(amount) (\(percentage)%)")
    }
)
```

