import com.fyatu.Fyatu
import com.fyatu.models.*
val fyatu = Fyatu(
appId = "your_app_id",
secretKey = "your_secret_key"
)
// Create a collection
val collection = fyatu.collections.create(
CreateCollectionParams(
amount = 10.00,
currency = "USD",
reference = "order_123",
description = "Payment for Order #123",
customer = Customer(
email = "[email protected]",
name = "John Doe"
),
redirectUrl = "https://yoursite.com/payment/success",
webhookUrl = "https://yoursite.com/webhooks/fyatu"
)
)
println(collection.checkoutUrl)