Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
RestSharp Integration for Paystack.
var client = new RestClient("https://api.paystack.co/transaction/initialize");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("authorization", "Bearer SECRET_KEY");
request.AddParameter("application/x-www-form-urlencoded", "email=customer@email.com&amount=10000", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.