var transaction = await client.Transactions.CreateAsync(
transactionCreate: new TransactionCreate()
{
Amount = 1299,
Currency = "USD",
Country = "US",
PaymentMethod =
TransactionCreatePaymentMethod.CreateRedirectPaymentMethodCreate(
new RedirectPaymentMethodCreate()
{
Method = "affirm",
Country = "US",
Currency = "USD",
RedirectUrl = "https://example.com/callback",
}
),
ConnectionOptions = new Dictionary<string, object>()
{
["affirm-affirm"] = new Dictionary<string, object>()
{
["itinerary"] = new Dictionary<string, string>()
{
["type"] = "event",
["sku"] = "ABC123",
["display_name"] = "Bad Bunny at Petco Park",
["venue"] = "Petco Park",
["location"] = "100 Park Blvd, San Diego, CA 92101, US",
["date_start"] = "2022-12-06T03:00:00.000Z UTC"
},
["discounts"] = new Dictionary<string, object>()
{
["RETURN5"] = new Dictionary<string, object>()
{
["discount_amount"] = 500,
["discount_display_name"] = "Returning customer 5% discount"
},
["PRESDAY10"] = new Dictionary<string, object>()
{
["discount_amount"] = 1000,
["discount_display_name"] = "President's Day 10% off"
}
}
}
}
}
);