var redirectFlowResponse = await client.RedirectFlows.CreateAsync(new RedirectFlowCreateRequest()
{
Description = "Cider Barrels",
SessionToken = "dummy_session_token",
SuccessRedirectUrl = "https://developer.gocardless.com/example-redirect-uri/",
// Optionally, prefill customer details on the payment page
PrefilledCustomer = new RedirectFlowCreateRequest.RedirectFlowPrefilledCustomer()
{
GivenName = "Tim",
FamilyName = "Rogers",
Email = "tim@gocardless.com",
AddressLine1 = "338-346 Goswell Road",
City = "London",
PostalCode = "EC1V 7LQ"
}
}); var redirectFlow = redirectFlowResponse.RedirectFlow; // Hold on to this ID - you'll need it when you
// "confirm" the redirect flow later
Console.WriteLine(redirectFlow.Id);
Console.WriteLine(redirectFlow.RedirectUrl);