/credits

Here are some examples on how you can use the API

curl -X POST 'https://api.watsi.org/v1/credits' \
-H 'Authorization: Token token="my_token", email="my_email"' \
--data-urlencode '[email protected]' \
--data-urlencode 'customer_name=name' \
--data-urlencode 'donation_amount=1000'
require 'uri'
require 'net/http'
require 'net/https'

charges_url = 'https://api.watsi.org/v1/charges'
params = {
  customer_email: '[email protected]',
  customer_name: 'Oscar Sanchez',
  donation_amount: 1000
}
headers = {
  'Content-Type' => 'application/json',
  'Authorization' => 'Token token="my_token", email="my_email"'
}

uri = URI.parse(charges_url)
https = Net::HTTP.new(uri.host, uri.port)
#https.use_ssl = true
req = Net::HTTP::Post.new(uri.path, initheader = headers)
req.set_form_data(params)

response = https.request(req)
puts response.body
Language
Authorization
Header
Click Try It! to start a request and see the response here!