< back to index

HTTP request

POST https://api.wevoteusa.org/apis/v1/donationWithStripe (Jump to "Try It Now")

Required Parameters

Parameter name Value Description
api_key string (from post, cookie, or get (in that order)) The unique key provided to any organization using the WeVoteServer APIs
voter_device_id string An 88 character unique identifier linked to a voter record on the server
token string A unique identifier linked to a stripe payment made on the client side
email string A unique email linked to a stripe payment made on the client side
donation_amount integer amount to be charged
is_chip_in boolean Is this a "Chip In" for a campaign donation?
is_monthly_donation boolean Is this recurring donation subscription?
is_premium_plan boolean Is this a premium organization subscription?
client_ip string The IP address of the client as reported by Stripe. (The clients IP, as seen from outside of any firewall or NAT)
payment_method_id string The payment method returned by Stripe. It is used to create a subscription from this server, but is not stored in the database

Optional Parameters

Parameter name Value Description
campaignx_we_vote_id string The Campaign We Vote ID, for the Campaigns webapp
coupon_code string Our coupon codes for pricing and features that are looked up in the (premium) OrganizationSubscriptionPlans
premium_plan_type_enum string Type of premium organization plan, or undefined for donations, subscriptions, and chipins

Response

{
  "status": string,
  "success": boolean,
  "token": string,
}

Response Status Codes

Code Description
TOKEN_MISSING Cannot proceed. A valid stripe token was not included.

Try It Now: API Variables

Process stripe payment with stripe client generated token

Parameter name Value  
voter_device_id:
token:
email:
donation_amount:
is_chip_in: True
False
is_monthly_donation: True
False
is_premium_plan: True
False
client_ip:
payment_method_id:
campaignx_we_vote_id:
coupon_code:
premium_plan_type_enum:

(opens in new window)