Skip to content

Instantly share code, notes, and snippets.

@Kendysond
Created December 15, 2016 10:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kendysond/95ed6314b43a429c1f0aa571cd25d173 to your computer and use it in GitHub Desktop.
Save Kendysond/95ed6314b43a429c1f0aa571cd25d173 to your computer and use it in GitHub Desktop.
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