package main
import (
"context"
"fmt"
"log"
"github.com/fyatu/fyatu-go"
)
func main() {
client := fyatu.NewClient(
fyatu.WithCredentials("your_app_id", "your_secret_key"),
)
// Create a collection
collection, err := client.Collections.Create(context.Background(), &fyatu.CreateCollectionParams{
Amount: 10.00,
Currency: "USD",
Reference: "order_123",
Description: "Payment for Order #123",
Customer: &fyatu.Customer{
Email: "customer@example.com",
Name: "Alice Example",
},
RedirectURL: "https://yoursite.com/payment/success",
WebhookURL: "https://yoursite.com/webhooks/fyatu",
})
if err != nil {
log.Fatal(err)
}
fmt.Println(collection.CheckoutURL)
}