#%RAML 0.8 --- title: Stripe REST API version: v1 baseUri: https://api.stripe.com/{version} mediaType: application/json securitySchemes: - basic: description: | Authentication to the API occurs via HTTP Basic Auth. Provide your API key as the basic auth username. You do not need to provide a password. type: Basic Authentication describedBy: headers: Authorization: description: | The Authorization field value consists of credentials containing the authentication information of the user agent for the realm of the resource being requested. type: string securedBy: [ basic ] resourceTypes: - baseResource: usage: | This is base resource type described common request and response headers and error response codes All Stripe resources should use it get?: &common headers: Stripe-Version: description: | When we make backwards-incompatible changes to the API, we release new dated versions. type: string example: 2013-08-13 queryParameters: expand[]: description: | Many objects contain the id of another object in their response properties. Those objects can be expanded in inline with the expand request parameter. Objects that can be expanded are noted in this documentation. This parameter is available on all API requests, and applies to the response of that request only. You can nest expand requests with the dot property. For example, requesting invoice.customer on a charge will expand the invoice property into a full invoice object, and will then expand the customer property on that invoice into a full customer object. You can expand multiple things at once by sending an array. type: string repeat: true example: expand%5B%5D=customer responses: 400: description: | Bad Request - Often missing a required parameter. body: &errorSchemas schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "error": { "type":"object", "id": "http://jsonschema.net/error", "required":true, "properties":{ "code": { "type":"string", "id": "http://jsonschema.net/error/code", "required":false }, "message": { "type":"string", "id": "http://jsonschema.net/error/message", "required":true }, "param": { "type":"string", "id": "http://jsonschema.net/error/param", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/error/type", "required":true } } } } } example: | { "error": { "type": "invalid_request_error", "message": "No such charge: ch_2Vcu103KQjX3Ey", "code": "missing", "param": "id" } } 401: description: | Unauthorized - No valid API key provided. body: *errorSchemas 402: description: | Request Failed - Parameters were valid but request failed. body: *errorSchemas 404: description: | Not Found - The requested item doesn't exist. body: *errorSchemas 500: description: | Server errors - something went wrong on Stripe's end. body: *errorSchemas 502: description: | Server errors - something went wrong on Stripe's end. body: *errorSchemas 503: description: | Server errors - something went wrong on Stripe's end. body: *errorSchemas 504: description: | Server errors - something went wrong on Stripe's end. body: *errorSchemas put?: *common post?: *common delete?: *common /charges: displayName: Charges description: | Charges operations: * Creating a new charge * Retrieving a Charge * Refunding a Charge * Capture a charge * List all Charges type: baseResource post: description: | Creating a new charge (charging a credit card). To charge a credit card, you create a new charge object. If your API key is in test mode, the supplied card won't actually be charged, though everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully). body: application/x-www-form-urlencoded: formParameters: amount: description: | A positive integer in cents representing how much to charge the card. type: integer minimum: 50 required: true currency: description: | 3-letter ISO code for currency. type: string minLength: 3 maxLength: 3 required: true customer: description: | The ID of an existing customer that will be charged in this request. optional, either card or customer is required type: string #TODO: in current version of RAML there is no ability to satisfy requirement from description card: description: | A card to be charged. If you also pass a customer ID, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass a customer ID, the card you provide must either be a token, like the ones returned by Stripe.js, or a dictionary containing a user's credit card details, with the options described below. Although not all information is required, the extra info helps prevent fraud. optional, either card or customer is required type: string #TODO: in current version of RAML there is no ability to satisfy requirement from description description: description: | An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. It's often a good idea to use an email address as a description for tracking later. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the description of the charge(s) that they are describing. type: string capture: description: | Whether or not to immediately capture the charge. When false, the charge issues an authorization (or pre-authorization), and will need to be captured later. Uncaptured charges expire in 7 days. type: string default: true application_fee: description: | A fee in cents that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key in order to take an application fee. type: integer responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "amount_refunded": { "type":"number", "id": "http://jsonschema.net/amount_refunded", "required":false }, "amount": { "type":"number", "id": "http://jsonschema.net/amount", "required":false }, "balance_transaction": { "type":"string", "id": "http://jsonschema.net/balance_transaction", "required":false }, "captured": { "type":"boolean", "id": "http://jsonschema.net/captured", "required":false }, "card": { "type":"object", "id": "http://jsonschema.net/card", "required":false, "properties":{ "address_city": { "type":"null", "id": "http://jsonschema.net/card/address_city", "required":false }, "address_country": { "type":"null", "id": "http://jsonschema.net/card/address_country", "required":false }, "address_line1_check": { "type":"null", "id": "http://jsonschema.net/card/address_line1_check", "required":false }, "address_line1": { "type":"null", "id": "http://jsonschema.net/card/address_line1", "required":false }, "address_line2": { "type":"null", "id": "http://jsonschema.net/card/address_line2", "required":false }, "address_state": { "type":"null", "id": "http://jsonschema.net/card/address_state", "required":false }, "address_zip_check": { "type":"null", "id": "http://jsonschema.net/card/address_zip_check", "required":false }, "address_zip": { "type":"null", "id": "http://jsonschema.net/card/address_zip", "required":false }, "country": { "type":"string", "id": "http://jsonschema.net/card/country", "required":false }, "customer": { "type":"null", "id": "http://jsonschema.net/card/customer", "required":false }, "cvc_check": { "type":"string", "id": "http://jsonschema.net/card/cvc_check", "required":false }, "exp_month": { "type":"number", "id": "http://jsonschema.net/card/exp_month", "required":false }, "exp_year": { "type":"number", "id": "http://jsonschema.net/card/exp_year", "required":false }, "fingerprint": { "type":"string", "id": "http://jsonschema.net/card/fingerprint", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/card/id", "required":false }, "last4": { "type":"string", "id": "http://jsonschema.net/card/last4", "required":false }, "name": { "type":"null", "id": "http://jsonschema.net/card/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/card/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/card/type", "required":false } } }, "created": { "type":"number", "id": "http://jsonschema.net/created", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "customer": { "type":"null", "id": "http://jsonschema.net/customer", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/description", "required":false }, "dispute": { "type":"null", "id": "http://jsonschema.net/dispute", "required":false }, "failure_code": { "type":"null", "id": "http://jsonschema.net/failure_code", "required":false }, "failure_message": { "type":"null", "id": "http://jsonschema.net/failure_message", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "invoice": { "type":"null", "id": "http://jsonschema.net/invoice", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "paid": { "type":"boolean", "id": "http://jsonschema.net/paid", "required":false }, "refunded": { "type":"boolean", "id": "http://jsonschema.net/refunded", "required":false }, "refunds": { "type":"array", "id": "http://jsonschema.net/refunds", "required":false } } } example: | { "id": "ch_2VzIHEg2arH51K", "object": "charge", "created": 1378366611, "livemode": false, "paid": true, "amount": 500, "currency": "usd", "refunded": false, "card": { "id": "card_2VzIt541zNEwjf", "object": "card", "last4": "4242", "type": "Visa", "exp_month": 1, "exp_year": 2050, "fingerprint": "qhjxpr7DiCdFYTlH", "customer": null, "country": "US", "name": null, "address_line1": null, "address_line2": null, "address_city": null, "address_state": null, "address_zip": null, "address_country": null, "cvc_check": "pass", "address_line1_check": null, "address_zip_check": null }, "captured": true, "refunds": [ ], "balance_transaction": "txn_2VrwM1WyxXifsV", "failure_message": null, "failure_code": null, "amount_refunded": 0, "customer": null, "invoice": null, "description": null, "dispute": null } get: description: | Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges appearing first. queryParameters: count: description: | A limit on the number of objects to be returned. type: integer minimum: 1 maximum: 100 default: 10 created: description: | A filter on the list based on the object created field. The value can be a string with an exact UTC timestamp type: string customer: description: | Only return charges for the customer specified by this customer ID. type: string offset: description: | An offset into the list of returned items. The API will return the requested number of items starting at that offset type: integer minimum: 0 default: 0 responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "count": { "type":"number", "id": "http://jsonschema.net/count", "required":false }, "data": { "type":"array", "id": "http://jsonschema.net/data", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/data/0", "required":false, "properties":{ "amount_refunded": { "type":"number", "id": "http://jsonschema.net/data/0/amount_refunded", "required":false }, "amount": { "type":"number", "id": "http://jsonschema.net/data/0/amount", "required":false }, "balance_transaction": { "type":"string", "id": "http://jsonschema.net/data/0/balance_transaction", "required":false }, "captured": { "type":"boolean", "id": "http://jsonschema.net/data/0/captured", "required":false }, "card": { "type":"object", "id": "http://jsonschema.net/data/0/card", "required":false, "properties":{ "address_city": { "type":"null", "id": "http://jsonschema.net/data/0/card/address_city", "required":false }, "address_country": { "type":"null", "id": "http://jsonschema.net/data/0/card/address_country", "required":false }, "address_line1_check": { "type":"null", "id": "http://jsonschema.net/data/0/card/address_line1_check", "required":false }, "address_line1": { "type":"null", "id": "http://jsonschema.net/data/0/card/address_line1", "required":false }, "address_line2": { "type":"null", "id": "http://jsonschema.net/data/0/card/address_line2", "required":false }, "address_state": { "type":"null", "id": "http://jsonschema.net/data/0/card/address_state", "required":false }, "address_zip_check": { "type":"null", "id": "http://jsonschema.net/data/0/card/address_zip_check", "required":false }, "address_zip": { "type":"null", "id": "http://jsonschema.net/data/0/card/address_zip", "required":false }, "country": { "type":"string", "id": "http://jsonschema.net/data/0/card/country", "required":false }, "customer": { "type":"null", "id": "http://jsonschema.net/data/0/card/customer", "required":false }, "cvc_check": { "type":"null", "id": "http://jsonschema.net/data/0/card/cvc_check", "required":false }, "exp_month": { "type":"number", "id": "http://jsonschema.net/data/0/card/exp_month", "required":false }, "exp_year": { "type":"number", "id": "http://jsonschema.net/data/0/card/exp_year", "required":false }, "fingerprint": { "type":"string", "id": "http://jsonschema.net/data/0/card/fingerprint", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/data/0/card/id", "required":false }, "last4": { "type":"string", "id": "http://jsonschema.net/data/0/card/last4", "required":false }, "name": { "type":"null", "id": "http://jsonschema.net/data/0/card/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/data/0/card/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/data/0/card/type", "required":false } } }, "created": { "type":"number", "id": "http://jsonschema.net/data/0/created", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/data/0/currency", "required":false }, "customer": { "type":"null", "id": "http://jsonschema.net/data/0/customer", "required":false }, "description": { "type":"string", "id": "http://jsonschema.net/data/0/description", "required":false }, "dispute": { "type":"null", "id": "http://jsonschema.net/data/0/dispute", "required":false }, "failure_code": { "type":"null", "id": "http://jsonschema.net/data/0/failure_code", "required":false }, "failure_message": { "type":"null", "id": "http://jsonschema.net/data/0/failure_message", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/data/0/id", "required":false }, "invoice": { "type":"null", "id": "http://jsonschema.net/data/0/invoice", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/data/0/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/data/0/object", "required":false }, "paid": { "type":"boolean", "id": "http://jsonschema.net/data/0/paid", "required":false }, "refunded": { "type":"boolean", "id": "http://jsonschema.net/data/0/refunded", "required":false }, "refunds": { "type":"array", "id": "http://jsonschema.net/data/0/refunds", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/data/0/refunds/0", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/data/0/refunds/0/amount", "required":false }, "balance_transaction": { "type":"string", "id": "http://jsonschema.net/data/0/refunds/0/balance_transaction", "required":false }, "created": { "type":"number", "id": "http://jsonschema.net/data/0/refunds/0/created", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/data/0/refunds/0/currency", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/data/0/refunds/0/object", "required":false } } } } } } }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "url": { "type":"string", "id": "http://jsonschema.net/url", "required":false } } } example: | { "object": "list", "url": "/v1/charges", "count": 2, "data": [ { "id": "ch_2W2skeSVoEIgH8", "object": "charge", "created": 1378379935, "livemode": false, "paid": true, "amount": 400, "currency": "usd", "refunded": false, "card": { "id": "cc_1SvbSeGL19eaMi", "object": "card", "last4": "4242", "type": "Visa", "exp_month": 8, "exp_year": 2014, "fingerprint": "qhjxpr7DiCdFYTlH", "customer": null, "country": "US", "name": null, "address_line1": null, "address_line2": null, "address_city": null, "address_state": null, "address_zip": null, "address_country": null, "cvc_check": null, "address_line1_check": null, "address_zip_check": null }, "captured": true, "refunds": [ { "amount": 400, "currency": "usd", "created": 1378379955, "object": "refund", "balance_transaction": "txn_2W2s5pXW1h3t3Q" } ], "balance_transaction": "txn_2VrwM1WyxXifsV", "failure_message": null, "failure_code": null, "amount_refunded": 400, "customer": null, "invoice": null, "description": "Charge for test@example.com", "dispute": null }, { "id": "ch_2W2skeusdf67IgH8", "object": "charge", "created": 1378374535, "livemode": false, "paid": true, "amount": 500, "currency": "usd", "refunded": false, "card": { "id": "cc_1SvbSeGL19eaMi", "object": "card", "last4": "4242", "type": "Visa", "exp_month": 8, "exp_year": 2014, "fingerprint": "qhjxpr7DiCdFYTlH", "customer": null, "country": "US", "name": null, "address_line1": null, "address_line2": null, "address_city": null, "address_state": null, "address_zip": null, "address_country": null, "cvc_check": null, "address_line1_check": null, "address_zip_check": null }, "captured": true, "refunds": [ { "amount": 500, "currency": "usd", "created": 1378379955, "object": "refund", "balance_transaction": "txn_2W2s5pXsdfsd3t3Q" } ], "balance_transaction": "txn_2W2s5pXsdfsd3t3Q", "failure_message": null, "failure_code": null, "amount_refunded": 500, "customer": null, "invoice": null, "description": "Charge 2 for test@example.com", "dispute": null } ] } /{CHARGE_ID}: type: baseResource uriParameters: CHARGE_ID: displayName: Charge ID description: The identifier of the charge to be retrieved. type: string required: true get: description: | Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "amount_refunded": { "type":"number", "id": "http://jsonschema.net/amount_refunded", "required":false }, "amount": { "type":"number", "id": "http://jsonschema.net/amount", "required":false }, "balance_transaction": { "type":"string", "id": "http://jsonschema.net/balance_transaction", "required":false }, "captured": { "type":"boolean", "id": "http://jsonschema.net/captured", "required":false }, "card": { "type":"object", "id": "http://jsonschema.net/card", "required":false, "properties":{ "address_city": { "type":"null", "id": "http://jsonschema.net/card/address_city", "required":false }, "address_country": { "type":"null", "id": "http://jsonschema.net/card/address_country", "required":false }, "address_line1_check": { "type":"null", "id": "http://jsonschema.net/card/address_line1_check", "required":false }, "address_line1": { "type":"null", "id": "http://jsonschema.net/card/address_line1", "required":false }, "address_line2": { "type":"null", "id": "http://jsonschema.net/card/address_line2", "required":false }, "address_state": { "type":"null", "id": "http://jsonschema.net/card/address_state", "required":false }, "address_zip_check": { "type":"null", "id": "http://jsonschema.net/card/address_zip_check", "required":false }, "address_zip": { "type":"null", "id": "http://jsonschema.net/card/address_zip", "required":false }, "country": { "type":"string", "id": "http://jsonschema.net/card/country", "required":false }, "customer": { "type":"null", "id": "http://jsonschema.net/card/customer", "required":false }, "cvc_check": { "type":"string", "id": "http://jsonschema.net/card/cvc_check", "required":false }, "exp_month": { "type":"number", "id": "http://jsonschema.net/card/exp_month", "required":false }, "exp_year": { "type":"number", "id": "http://jsonschema.net/card/exp_year", "required":false }, "fingerprint": { "type":"string", "id": "http://jsonschema.net/card/fingerprint", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/card/id", "required":false }, "last4": { "type":"string", "id": "http://jsonschema.net/card/last4", "required":false }, "name": { "type":"null", "id": "http://jsonschema.net/card/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/card/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/card/type", "required":false } } }, "created": { "type":"number", "id": "http://jsonschema.net/created", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "customer": { "type":"null", "id": "http://jsonschema.net/customer", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/description", "required":false }, "dispute": { "type":"null", "id": "http://jsonschema.net/dispute", "required":false }, "failure_code": { "type":"null", "id": "http://jsonschema.net/failure_code", "required":false }, "failure_message": { "type":"null", "id": "http://jsonschema.net/failure_message", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "invoice": { "type":"null", "id": "http://jsonschema.net/invoice", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "paid": { "type":"boolean", "id": "http://jsonschema.net/paid", "required":false }, "refunded": { "type":"boolean", "id": "http://jsonschema.net/refunded", "required":false }, "refunds": { "type":"array", "id": "http://jsonschema.net/refunds", "required":false } } } example: | { "id": "ch_2VzIHEg2arH51K", "object": "charge", "created": 1378366611, "livemode": false, "paid": true, "amount": 500, "currency": "usd", "refunded": false, "card": { "id": "card_2VzIt541zNEwjf", "object": "card", "last4": "4242", "type": "Visa", "exp_month": 1, "exp_year": 2050, "fingerprint": "qhjxpr7DiCdFYTlH", "customer": null, "country": "US", "name": null, "address_line1": null, "address_line2": null, "address_city": null, "address_state": null, "address_zip": null, "address_country": null, "cvc_check": "pass", "address_line1_check": null, "address_zip_check": null }, "captured": true, "refunds": [ ], "balance_transaction": "txn_2VrwM1WyxXifsV", "failure_message": null, "failure_code": null, "amount_refunded": 0, "customer": null, "invoice": null, "description": null, "dispute": null } # Refund /refund: type: baseResource post: description: | Refunds a charge that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged. The fees you were originally charged are also refunded. You can optionally refund only part of a charge. You can do so as many times as you wish until the entire charge has been refunded. Once entirely refunded, a charge can't be refunded again. This method will return an error when called on an already-refunded charge, or when trying to refund more money than is left on a charge. body: application/x-www-form-urlencoded: formParameters: amount: description: | A positive integer in cents representing how much of this charge to refund. Can only refund up to the unrefunded amount remaining of the charge. **optional**, default is entire charge type: integer refund_application_fee: description: | Boolean indicating whether the full application fee should be refunded when refunding this charge. An application fee can only be refunded by the application that created the charge. type: string responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "amount_refunded": { "type":"number", "id": "http://jsonschema.net/amount_refunded", "required":false }, "amount": { "type":"number", "id": "http://jsonschema.net/amount", "required":false }, "balance_transaction": { "type":"string", "id": "http://jsonschema.net/balance_transaction", "required":false }, "captured": { "type":"boolean", "id": "http://jsonschema.net/captured", "required":false }, "card": { "type":"object", "id": "http://jsonschema.net/card", "required":false, "properties":{ "address_city": { "type":"null", "id": "http://jsonschema.net/card/address_city", "required":false }, "address_country": { "type":"null", "id": "http://jsonschema.net/card/address_country", "required":false }, "address_line1_check": { "type":"null", "id": "http://jsonschema.net/card/address_line1_check", "required":false }, "address_line1": { "type":"null", "id": "http://jsonschema.net/card/address_line1", "required":false }, "address_line2": { "type":"null", "id": "http://jsonschema.net/card/address_line2", "required":false }, "address_state": { "type":"null", "id": "http://jsonschema.net/card/address_state", "required":false }, "address_zip_check": { "type":"null", "id": "http://jsonschema.net/card/address_zip_check", "required":false }, "address_zip": { "type":"null", "id": "http://jsonschema.net/card/address_zip", "required":false }, "country": { "type":"string", "id": "http://jsonschema.net/card/country", "required":false }, "customer": { "type":"null", "id": "http://jsonschema.net/card/customer", "required":false }, "cvc_check": { "type":"string", "id": "http://jsonschema.net/card/cvc_check", "required":false }, "exp_month": { "type":"number", "id": "http://jsonschema.net/card/exp_month", "required":false }, "exp_year": { "type":"number", "id": "http://jsonschema.net/card/exp_year", "required":false }, "fingerprint": { "type":"string", "id": "http://jsonschema.net/card/fingerprint", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/card/id", "required":false }, "last4": { "type":"string", "id": "http://jsonschema.net/card/last4", "required":false }, "name": { "type":"null", "id": "http://jsonschema.net/card/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/card/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/card/type", "required":false } } }, "created": { "type":"number", "id": "http://jsonschema.net/created", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "customer": { "type":"null", "id": "http://jsonschema.net/customer", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/description", "required":false }, "dispute": { "type":"null", "id": "http://jsonschema.net/dispute", "required":false }, "failure_code": { "type":"null", "id": "http://jsonschema.net/failure_code", "required":false }, "failure_message": { "type":"null", "id": "http://jsonschema.net/failure_message", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "invoice": { "type":"null", "id": "http://jsonschema.net/invoice", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "paid": { "type":"boolean", "id": "http://jsonschema.net/paid", "required":false }, "refunded": { "type":"boolean", "id": "http://jsonschema.net/refunded", "required":false }, "refunds": { "type":"array", "id": "http://jsonschema.net/refunds", "required":false } } } example: | { "id": "ch_2VzIHEg2arH51K", "object": "charge", "created": 1378366611, "livemode": false, "paid": true, "amount": 500, "currency": "usd", "refunded": false, "card": { "id": "card_2VzIt541zNEwjf", "object": "card", "last4": "4242", "type": "Visa", "exp_month": 1, "exp_year": 2050, "fingerprint": "qhjxpr7DiCdFYTlH", "customer": null, "country": "US", "name": null, "address_line1": null, "address_line2": null, "address_city": null, "address_state": null, "address_zip": null, "address_country": null, "cvc_check": "pass", "address_line1_check": null, "address_zip_check": null }, "captured": true, "refunds": [ ], "balance_transaction": "txn_2VrwM1WyxXifsV", "failure_message": null, "failure_code": null, "amount_refunded": 0, "customer": null, "invoice": null, "description": null, "dispute": null } # Capture /capture: type: baseResource post: description: | Capture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you created a charge with the capture option set to false. Uncaptured payments expire exactly seven days after they are created. If they are not captured by that point in time, they will be marked as refunded and will no longer be capturable. body: application/x-www-form-urlencoded: formParameters: amount: description: | The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. type: integer refund_application_fee: description: | An application fee to add on to this charge. Can only be used with Stripe Connect. type: string responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "amount_refunded": { "type":"number", "id": "http://jsonschema.net/amount_refunded", "required":false }, "amount": { "type":"number", "id": "http://jsonschema.net/amount", "required":false }, "balance_transaction": { "type":"string", "id": "http://jsonschema.net/balance_transaction", "required":false }, "captured": { "type":"boolean", "id": "http://jsonschema.net/captured", "required":false }, "card": { "type":"object", "id": "http://jsonschema.net/card", "required":false, "properties":{ "address_city": { "type":"null", "id": "http://jsonschema.net/card/address_city", "required":false }, "address_country": { "type":"null", "id": "http://jsonschema.net/card/address_country", "required":false }, "address_line1_check": { "type":"null", "id": "http://jsonschema.net/card/address_line1_check", "required":false }, "address_line1": { "type":"null", "id": "http://jsonschema.net/card/address_line1", "required":false }, "address_line2": { "type":"null", "id": "http://jsonschema.net/card/address_line2", "required":false }, "address_state": { "type":"null", "id": "http://jsonschema.net/card/address_state", "required":false }, "address_zip_check": { "type":"null", "id": "http://jsonschema.net/card/address_zip_check", "required":false }, "address_zip": { "type":"null", "id": "http://jsonschema.net/card/address_zip", "required":false }, "country": { "type":"string", "id": "http://jsonschema.net/card/country", "required":false }, "customer": { "type":"null", "id": "http://jsonschema.net/card/customer", "required":false }, "cvc_check": { "type":"string", "id": "http://jsonschema.net/card/cvc_check", "required":false }, "exp_month": { "type":"number", "id": "http://jsonschema.net/card/exp_month", "required":false }, "exp_year": { "type":"number", "id": "http://jsonschema.net/card/exp_year", "required":false }, "fingerprint": { "type":"string", "id": "http://jsonschema.net/card/fingerprint", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/card/id", "required":false }, "last4": { "type":"string", "id": "http://jsonschema.net/card/last4", "required":false }, "name": { "type":"null", "id": "http://jsonschema.net/card/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/card/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/card/type", "required":false } } }, "created": { "type":"number", "id": "http://jsonschema.net/created", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "customer": { "type":"null", "id": "http://jsonschema.net/customer", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/description", "required":false }, "dispute": { "type":"null", "id": "http://jsonschema.net/dispute", "required":false }, "failure_code": { "type":"null", "id": "http://jsonschema.net/failure_code", "required":false }, "failure_message": { "type":"null", "id": "http://jsonschema.net/failure_message", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "invoice": { "type":"null", "id": "http://jsonschema.net/invoice", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "paid": { "type":"boolean", "id": "http://jsonschema.net/paid", "required":false }, "refunded": { "type":"boolean", "id": "http://jsonschema.net/refunded", "required":false }, "refunds": { "type":"array", "id": "http://jsonschema.net/refunds", "required":false } } } example: | { "id": "ch_2VzIHEg2arH51K", "object": "charge", "created": 1378366611, "livemode": false, "paid": true, "amount": 500, "currency": "usd", "refunded": false, "card": { "id": "card_2VzIt541zNEwjf", "object": "card", "last4": "4242", "type": "Visa", "exp_month": 1, "exp_year": 2050, "fingerprint": "qhjxpr7DiCdFYTlH", "customer": null, "country": "US", "name": null, "address_line1": null, "address_line2": null, "address_city": null, "address_state": null, "address_zip": null, "address_country": null, "cvc_check": "pass", "address_line1_check": null, "address_zip_check": null }, "captured": true, "refunds": [ ], "balance_transaction": "txn_2VrwM1WyxXifsV", "failure_message": null, "failure_code": null, "amount_refunded": 0, "customer": null, "invoice": null, "description": null, "dispute": null } # Dispute /dispute: type: baseResource post: description: | Contacting your customer is always the best first step, but if that doesn't work, you can submit (text-only) evidence in order to help us resolve the dispute in your favor. You can do this in your dashboard, but if you prefer, you can use the API to submit evidence programmatically. body: application/x-www-form-urlencoded: formParameters: evidence: type: string responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/amount", "required":false }, "balance_transaction": { "type":"string", "id": "http://jsonschema.net/balance_transaction", "required":false }, "charge": { "type":"string", "id": "http://jsonschema.net/charge", "required":false }, "created": { "type":"number", "id": "http://jsonschema.net/created", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "evidence_due_by": { "type":"number", "id": "http://jsonschema.net/evidence_due_by", "required":false }, "evidence": { "type":"null", "id": "http://jsonschema.net/evidence", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "reason": { "type":"string", "id": "http://jsonschema.net/reason", "required":false }, "status": { "type":"string", "id": "http://jsonschema.net/status", "required":false } } } example: | { "charge": "ch_2i0bEetfZQnWS2", "amount": 1000, "created": 1381139172, "status": "needs_response", "livemode": false, "currency": "usd", "object": "dispute", "reason": "general", "balance_transaction": "txn_2hrAStwRKjXiIp", "evidence_due_by": 1382831999, "evidence": null } /close: post: description: | Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially 'dismissing' the dispute, acknowledging it as lost. The status of the dispute will change from under_review to lost. Closing a dispute is irreversible. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/amount", "required":false }, "balance_transaction": { "type":"string", "id": "http://jsonschema.net/balance_transaction", "required":false }, "charge": { "type":"string", "id": "http://jsonschema.net/charge", "required":false }, "created": { "type":"number", "id": "http://jsonschema.net/created", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "evidence_due_by": { "type":"number", "id": "http://jsonschema.net/evidence_due_by", "required":false }, "evidence": { "type":"null", "id": "http://jsonschema.net/evidence", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "reason": { "type":"string", "id": "http://jsonschema.net/reason", "required":false }, "status": { "type":"string", "id": "http://jsonschema.net/status", "required":false } } } example: | { "charge": "ch_2i0bEetfZQnWS2", "amount": 1000, "created": 1381139172, "status": "needs_response", "livemode": false, "currency": "usd", "object": "dispute", "reason": "general", "balance_transaction": "txn_2hrAStwRKjXiIp", "evidence_due_by": 1382831999, "evidence": null } /customers: displayName: Customers description: | Customers operations: * Creating a New Customer * Retrieving a Customer * Updating a Customer * Deleting a Customer * List all Customers type: baseResource post: description: | Creates a new customer object. body: application/x-www-form-urlencoded: formParameters: account_balance: description: | An integer amount in cents that is the starting account balance for your customer. A negative amount represents a credit that will be used before attempting any charges to the customer's card; a positive amount will be added to the next invoice. type: integer card: description: | The card can either be a token, like the ones returned by our Stripe.js, or a dictionary containing a user's credit card details (with the options shown below). Passing card will create a new card, make it the new customer default card, and delete the old customer default if one exists. If you want to add additional cards instead of replacing the existing default, use the card creation API. Whenever you attach a card to a customer, Stripe will automatically validate the card. type: string coupon: description: | If you provide a coupon code, the customer will have a discount applied on all recurring charges. Charges you create through the API will not have the discount. type: string description: description: | An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. This will be unset if you POST an empty value. type: string email: description: | Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This will be unset if you POST an empty value. type: string plan: description: | The identifier of the plan to subscribe the customer to. If provided, the returned customer object has a subscription attribute describing the state of the customer's subscription type: string quantity: description: | The quantity you'd like to apply to the subscription you're creating. For example, if your plan is 10 cents/user/month, and your customer has 5 users, you could pass 5 as the quantity to have the customer charged 50 cents (5 x 10 cents) monthly. Defaults to 1 if not set. type: integer trial_end: description: | UTC integer timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value now can be provided to end the customer's trial immediately. type: integer responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "account_balance": { "type":"number", "id": "http://jsonschema.net/account_balance", "required":false }, "cards": { "type":"object", "id": "http://jsonschema.net/cards", "required":false, "properties":{ "count": { "type":"number", "id": "http://jsonschema.net/cards/count", "required":false }, "data": { "type":"array", "id": "http://jsonschema.net/cards/data", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/cards/data/0", "required":false, "properties":{ "address_city": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_city", "required":false }, "address_country": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_country", "required":false }, "address_line1_check": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_line1_check", "required":false }, "address_line1": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_line1", "required":false }, "address_line2": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_line2", "required":false }, "address_state": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_state", "required":false }, "address_zip_check": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_zip_check", "required":false }, "address_zip": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_zip", "required":false }, "country": { "type":"string", "id": "http://jsonschema.net/cards/data/0/country", "required":false }, "customer": { "type":"string", "id": "http://jsonschema.net/cards/data/0/customer", "required":false }, "cvc_check": { "type":"null", "id": "http://jsonschema.net/cards/data/0/cvc_check", "required":false }, "exp_month": { "type":"number", "id": "http://jsonschema.net/cards/data/0/exp_month", "required":false }, "exp_year": { "type":"number", "id": "http://jsonschema.net/cards/data/0/exp_year", "required":false }, "fingerprint": { "type":"string", "id": "http://jsonschema.net/cards/data/0/fingerprint", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/cards/data/0/id", "required":false }, "last4": { "type":"string", "id": "http://jsonschema.net/cards/data/0/last4", "required":false }, "name": { "type":"null", "id": "http://jsonschema.net/cards/data/0/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/cards/data/0/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/cards/data/0/type", "required":false } } } }, "object": { "type":"string", "id": "http://jsonschema.net/cards/object", "required":false }, "url": { "type":"string", "id": "http://jsonschema.net/cards/url", "required":false } } }, "created": { "type":"number", "id": "http://jsonschema.net/created", "required":false }, "default_card": { "type":"string", "id": "http://jsonschema.net/default_card", "required":false }, "delinquent": { "type":"boolean", "id": "http://jsonschema.net/delinquent", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/description", "required":false }, "discount": { "type":"null", "id": "http://jsonschema.net/discount", "required":false }, "email": { "type":"string", "id": "http://jsonschema.net/email", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "subscription": { "type":"object", "id": "http://jsonschema.net/subscription", "required":false, "properties":{ "cancel_at_period_end": { "type":"boolean", "id": "http://jsonschema.net/subscription/cancel_at_period_end", "required":false }, "canceled_at": { "type":"null", "id": "http://jsonschema.net/subscription/canceled_at", "required":false }, "current_period_end": { "type":"number", "id": "http://jsonschema.net/subscription/current_period_end", "required":false }, "current_period_start": { "type":"number", "id": "http://jsonschema.net/subscription/current_period_start", "required":false }, "customer": { "type":"string", "id": "http://jsonschema.net/subscription/customer", "required":false }, "ended_at": { "type":"null", "id": "http://jsonschema.net/subscription/ended_at", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/subscription/id", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/subscription/object", "required":false }, "plan": { "type":"object", "id": "http://jsonschema.net/subscription/plan", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/subscription/plan/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/subscription/plan/currency", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/subscription/plan/id", "required":false }, "interval_count": { "type":"number", "id": "http://jsonschema.net/subscription/plan/interval_count", "required":false }, "interval": { "type":"string", "id": "http://jsonschema.net/subscription/plan/interval", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/subscription/plan/livemode", "required":false }, "name": { "type":"string", "id": "http://jsonschema.net/subscription/plan/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/subscription/plan/object", "required":false }, "trial_period_days": { "type":"null", "id": "http://jsonschema.net/subscription/plan/trial_period_days", "required":false } } }, "quantity": { "type":"number", "id": "http://jsonschema.net/subscription/quantity", "required":false }, "start": { "type":"number", "id": "http://jsonschema.net/subscription/start", "required":false }, "status": { "type":"string", "id": "http://jsonschema.net/subscription/status", "required":false }, "trial_end": { "type":"null", "id": "http://jsonschema.net/subscription/trial_end", "required":false }, "trial_start": { "type":"null", "id": "http://jsonschema.net/subscription/trial_start", "required":false } } } } } example: | { "object": "customer", "created": 1378379137, "id": "cus_2W2fj6IHUNOc2d", "livemode": false, "description": null, "email": "victor@huge-success.net", "delinquent": false, "subscription": { "id": "su_2W2fay9kQDcftp", "plan": { "interval": "month", "name": "Basic", "amount": 1000, "currency": "usd", "id": "basic", "object": "plan", "livemode": false, "interval_count": 1, "trial_period_days": null }, "object": "subscription", "start": 1378379138, "status": "active", "customer": "cus_2W2fj6IHUNOc2d", "cancel_at_period_end": false, "current_period_start": 1378379138, "current_period_end": 1380971138, "ended_at": null, "trial_start": null, "trial_end": null, "canceled_at": null, "quantity": 1 }, "discount": null, "account_balance": 0, "cards": { "object": "list", "count": 1, "url": "/v1/customers/cus_2W2fj6IHUNOc2d/cards", "data": [ { "id": "card_2W2fhiuUB8W9Bq", "object": "card", "last4": "4242", "type": "Visa", "exp_month": 10, "exp_year": 2020, "fingerprint": "qhjxpr7DiCdFYTlH", "customer": "cus_2W2fj6IHUNOc2d", "country": "US", "name": null, "address_line1": null, "address_line2": null, "address_city": null, "address_state": null, "address_zip": null, "address_country": null, "cvc_check": null, "address_line1_check": null, "address_zip_check": null } ] }, "default_card": "card_2W2fhiuUB8W9Bq" } get: description: | Returns a list of your customers. The customers are returned sorted by creation date, with the most recently created customers appearing first. queryParameters: count: description: | A limit on the number of objects to be returned. type: integer minimum: 1 maximum: 100 default: 10 created: description: | A filter on the list based on the object created field. The value can be a string with an exact UTC timestamp type: string offset: description: | An offset into the list of returned items. The API will return the requested number of items starting at that offset type: integer minimum: 0 default: 0 responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "count": { "type":"number", "id": "http://jsonschema.net/count", "required":false }, "data": { "type":"array", "id": "http://jsonschema.net/data", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/data/0", "required":false, "properties":{ "account_balance": { "type":"number", "id": "http://jsonschema.net/data/0/account_balance", "required":false }, "cards": { "type":"object", "id": "http://jsonschema.net/data/0/cards", "required":false, "properties":{ "count": { "type":"number", "id": "http://jsonschema.net/data/0/cards/count", "required":false }, "data": { "type":"array", "id": "http://jsonschema.net/data/0/cards/data", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/data/0/cards/data/0", "required":false, "properties":{ "address_city": { "type":"null", "id": "http://jsonschema.net/data/0/cards/data/0/address_city", "required":false }, "address_country": { "type":"null", "id": "http://jsonschema.net/data/0/cards/data/0/address_country", "required":false }, "address_line1_check": { "type":"null", "id": "http://jsonschema.net/data/0/cards/data/0/address_line1_check", "required":false }, "address_line1": { "type":"null", "id": "http://jsonschema.net/data/0/cards/data/0/address_line1", "required":false }, "address_line2": { "type":"null", "id": "http://jsonschema.net/data/0/cards/data/0/address_line2", "required":false }, "address_state": { "type":"null", "id": "http://jsonschema.net/data/0/cards/data/0/address_state", "required":false }, "address_zip_check": { "type":"null", "id": "http://jsonschema.net/data/0/cards/data/0/address_zip_check", "required":false }, "address_zip": { "type":"null", "id": "http://jsonschema.net/data/0/cards/data/0/address_zip", "required":false }, "country": { "type":"string", "id": "http://jsonschema.net/data/0/cards/data/0/country", "required":false }, "customer": { "type":"string", "id": "http://jsonschema.net/data/0/cards/data/0/customer", "required":false }, "cvc_check": { "type":"null", "id": "http://jsonschema.net/data/0/cards/data/0/cvc_check", "required":false }, "exp_month": { "type":"number", "id": "http://jsonschema.net/data/0/cards/data/0/exp_month", "required":false }, "exp_year": { "type":"number", "id": "http://jsonschema.net/data/0/cards/data/0/exp_year", "required":false }, "fingerprint": { "type":"string", "id": "http://jsonschema.net/data/0/cards/data/0/fingerprint", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/data/0/cards/data/0/id", "required":false }, "last4": { "type":"string", "id": "http://jsonschema.net/data/0/cards/data/0/last4", "required":false }, "name": { "type":"null", "id": "http://jsonschema.net/data/0/cards/data/0/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/data/0/cards/data/0/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/data/0/cards/data/0/type", "required":false } } } }, "object": { "type":"string", "id": "http://jsonschema.net/data/0/cards/object", "required":false }, "url": { "type":"string", "id": "http://jsonschema.net/data/0/cards/url", "required":false } } }, "created": { "type":"number", "id": "http://jsonschema.net/data/0/created", "required":false }, "default_card": { "type":"string", "id": "http://jsonschema.net/data/0/default_card", "required":false }, "delinquent": { "type":"boolean", "id": "http://jsonschema.net/data/0/delinquent", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/data/0/description", "required":false }, "discount": { "type":"null", "id": "http://jsonschema.net/data/0/discount", "required":false }, "email": { "type":"string", "id": "http://jsonschema.net/data/0/email", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/data/0/id", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/data/0/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/data/0/object", "required":false }, "subscription": { "type":"object", "id": "http://jsonschema.net/data/0/subscription", "required":false, "properties":{ "cancel_at_period_end": { "type":"boolean", "id": "http://jsonschema.net/data/0/subscription/cancel_at_period_end", "required":false }, "canceled_at": { "type":"null", "id": "http://jsonschema.net/data/0/subscription/canceled_at", "required":false }, "current_period_end": { "type":"number", "id": "http://jsonschema.net/data/0/subscription/current_period_end", "required":false }, "current_period_start": { "type":"number", "id": "http://jsonschema.net/data/0/subscription/current_period_start", "required":false }, "customer": { "type":"string", "id": "http://jsonschema.net/data/0/subscription/customer", "required":false }, "ended_at": { "type":"null", "id": "http://jsonschema.net/data/0/subscription/ended_at", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/data/0/subscription/id", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/data/0/subscription/object", "required":false }, "plan": { "type":"object", "id": "http://jsonschema.net/data/0/subscription/plan", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/data/0/subscription/plan/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/data/0/subscription/plan/currency", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/data/0/subscription/plan/id", "required":false }, "interval_count": { "type":"number", "id": "http://jsonschema.net/data/0/subscription/plan/interval_count", "required":false }, "interval": { "type":"string", "id": "http://jsonschema.net/data/0/subscription/plan/interval", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/data/0/subscription/plan/livemode", "required":false }, "name": { "type":"string", "id": "http://jsonschema.net/data/0/subscription/plan/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/data/0/subscription/plan/object", "required":false }, "trial_period_days": { "type":"null", "id": "http://jsonschema.net/data/0/subscription/plan/trial_period_days", "required":false } } }, "quantity": { "type":"number", "id": "http://jsonschema.net/data/0/subscription/quantity", "required":false }, "start": { "type":"number", "id": "http://jsonschema.net/data/0/subscription/start", "required":false }, "status": { "type":"string", "id": "http://jsonschema.net/data/0/subscription/status", "required":false }, "trial_end": { "type":"null", "id": "http://jsonschema.net/data/0/subscription/trial_end", "required":false }, "trial_start": { "type":"null", "id": "http://jsonschema.net/data/0/subscription/trial_start", "required":false } } } } } }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "url": { "type":"string", "id": "http://jsonschema.net/url", "required":false } } } example: | { "object": "list", "url": "v1/customers", "count": 2, "data": [ { "object": "customer", "created": 1378379137, "id": "cus_2W2fj6IHUNOc2d", "livemode": false, "description": null, "email": "victor@huge-success.net", "delinquent": false, "subscription": { "id": "su_2W2fay9kQDcftp", "plan": { "interval": "month", "name": "Basic", "amount": 1000, "currency": "usd", "id": "basic", "object": "plan", "livemode": false, "interval_count": 1, "trial_period_days": null }, "object": "subscription", "start": 1378379138, "status": "active", "customer": "cus_2W2fj6IHUNOc2d", "cancel_at_period_end": false, "current_period_start": 1378379138, "current_period_end": 1380971138, "ended_at": null, "trial_start": null, "trial_end": null, "canceled_at": null, "quantity": 1 }, "discount": null, "account_balance": 0, "cards": { "object": "list", "count": 1, "url": "/v1/customers/cus_2W2fj6IHUNOc2d/cards", "data": [ { "id": "card_2W2fhiuUB8W9Bq", "object": "card", "last4": "4242", "type": "Visa", "exp_month": 10, "exp_year": 2020, "fingerprint": "qhjxpr7DiCdFYTlH", "customer": "cus_2W2fj6IHUNOc2d", "country": "US", "name": null, "address_line1": null, "address_line2": null, "address_city": null, "address_state": null, "address_zip": null, "address_country": null, "cvc_check": null, "address_line1_check": null, "address_zip_check": null } ] }, "default_card": "card_2W2fhiuUB8W9Bq" }, { "object": "customer", "created": 1378379137, "id": "cus_2W2fj6IHUNOc2d", "livemode": false, "description": null, "email": "victor@huge-success.net", "delinquent": false, "subscription": { "id": "su_2W2fay9kQDcftp", "plan": { "interval": "month", "name": "Basic", "amount": 1000, "currency": "usd", "id": "basic", "object": "plan", "livemode": false, "interval_count": 1, "trial_period_days": null }, "object": "subscription", "start": 1378379138, "status": "active", "customer": "cus_2W2fj6IHUNOc2d", "cancel_at_period_end": false, "current_period_start": 1378379138, "current_period_end": 1380971138, "ended_at": null, "trial_start": null, "trial_end": null, "canceled_at": null, "quantity": 1 }, "discount": null, "account_balance": 0, "cards": { "object": "list", "count": 1, "url": "/v1/customers/cus_2W2fj6IHUNOc2d/cards", "data": [ { "id": "card_2W2fhiuUB8W9Bq", "object": "card", "last4": "4242", "type": "Visa", "exp_month": 10, "exp_year": 2020, "fingerprint": "qhjxpr7DiCdFYTlH", "customer": "cus_2W2fj6IHUNOc2d", "country": "US", "name": null, "address_line1": null, "address_line2": null, "address_city": null, "address_state": null, "address_zip": null, "address_country": null, "cvc_check": null, "address_line1_check": null, "address_zip_check": null } ] }, "default_card": "card_2W2fhiuUB8W9Bq" } ] } /{CUSTOMER_ID}: type: baseResource uriParameters: CUSTOMER_ID: displayName: Customer ID description: The identifier of the customer to be retrieved. type: string required: true get: description: | Retrieves the details of an existing customer. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "account_balance": { "type":"number", "id": "http://jsonschema.net/account_balance", "required":false }, "cards": { "type":"object", "id": "http://jsonschema.net/cards", "required":false, "properties":{ "count": { "type":"number", "id": "http://jsonschema.net/cards/count", "required":false }, "data": { "type":"array", "id": "http://jsonschema.net/cards/data", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/cards/data/0", "required":false, "properties":{ "address_city": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_city", "required":false }, "address_country": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_country", "required":false }, "address_line1_check": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_line1_check", "required":false }, "address_line1": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_line1", "required":false }, "address_line2": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_line2", "required":false }, "address_state": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_state", "required":false }, "address_zip_check": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_zip_check", "required":false }, "address_zip": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_zip", "required":false }, "country": { "type":"string", "id": "http://jsonschema.net/cards/data/0/country", "required":false }, "customer": { "type":"string", "id": "http://jsonschema.net/cards/data/0/customer", "required":false }, "cvc_check": { "type":"null", "id": "http://jsonschema.net/cards/data/0/cvc_check", "required":false }, "exp_month": { "type":"number", "id": "http://jsonschema.net/cards/data/0/exp_month", "required":false }, "exp_year": { "type":"number", "id": "http://jsonschema.net/cards/data/0/exp_year", "required":false }, "fingerprint": { "type":"string", "id": "http://jsonschema.net/cards/data/0/fingerprint", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/cards/data/0/id", "required":false }, "last4": { "type":"string", "id": "http://jsonschema.net/cards/data/0/last4", "required":false }, "name": { "type":"null", "id": "http://jsonschema.net/cards/data/0/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/cards/data/0/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/cards/data/0/type", "required":false } } } }, "object": { "type":"string", "id": "http://jsonschema.net/cards/object", "required":false }, "url": { "type":"string", "id": "http://jsonschema.net/cards/url", "required":false } } }, "created": { "type":"number", "id": "http://jsonschema.net/created", "required":false }, "default_card": { "type":"string", "id": "http://jsonschema.net/default_card", "required":false }, "delinquent": { "type":"boolean", "id": "http://jsonschema.net/delinquent", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/description", "required":false }, "discount": { "type":"null", "id": "http://jsonschema.net/discount", "required":false }, "email": { "type":"string", "id": "http://jsonschema.net/email", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "subscription": { "type":"object", "id": "http://jsonschema.net/subscription", "required":false, "properties":{ "cancel_at_period_end": { "type":"boolean", "id": "http://jsonschema.net/subscription/cancel_at_period_end", "required":false }, "canceled_at": { "type":"null", "id": "http://jsonschema.net/subscription/canceled_at", "required":false }, "current_period_end": { "type":"number", "id": "http://jsonschema.net/subscription/current_period_end", "required":false }, "current_period_start": { "type":"number", "id": "http://jsonschema.net/subscription/current_period_start", "required":false }, "customer": { "type":"string", "id": "http://jsonschema.net/subscription/customer", "required":false }, "ended_at": { "type":"null", "id": "http://jsonschema.net/subscription/ended_at", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/subscription/id", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/subscription/object", "required":false }, "plan": { "type":"object", "id": "http://jsonschema.net/subscription/plan", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/subscription/plan/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/subscription/plan/currency", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/subscription/plan/id", "required":false }, "interval_count": { "type":"number", "id": "http://jsonschema.net/subscription/plan/interval_count", "required":false }, "interval": { "type":"string", "id": "http://jsonschema.net/subscription/plan/interval", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/subscription/plan/livemode", "required":false }, "name": { "type":"string", "id": "http://jsonschema.net/subscription/plan/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/subscription/plan/object", "required":false }, "trial_period_days": { "type":"null", "id": "http://jsonschema.net/subscription/plan/trial_period_days", "required":false } } }, "quantity": { "type":"number", "id": "http://jsonschema.net/subscription/quantity", "required":false }, "start": { "type":"number", "id": "http://jsonschema.net/subscription/start", "required":false }, "status": { "type":"string", "id": "http://jsonschema.net/subscription/status", "required":false }, "trial_end": { "type":"null", "id": "http://jsonschema.net/subscription/trial_end", "required":false }, "trial_start": { "type":"null", "id": "http://jsonschema.net/subscription/trial_start", "required":false } } } } } example: | { "object": "customer", "created": 1378379137, "id": "cus_2W2fj6IHUNOc2d", "livemode": false, "description": null, "email": "victor@huge-success.net", "delinquent": false, "subscription": { "id": "su_2W2fay9kQDcftp", "plan": { "interval": "month", "name": "Basic", "amount": 1000, "currency": "usd", "id": "basic", "object": "plan", "livemode": false, "interval_count": 1, "trial_period_days": null }, "object": "subscription", "start": 1378379138, "status": "active", "customer": "cus_2W2fj6IHUNOc2d", "cancel_at_period_end": false, "current_period_start": 1378379138, "current_period_end": 1380971138, "ended_at": null, "trial_start": null, "trial_end": null, "canceled_at": null, "quantity": 1 }, "discount": null, "account_balance": 0, "cards": { "object": "list", "count": 1, "url": "/v1/customers/cus_2W2fj6IHUNOc2d/cards", "data": [ { "id": "card_2W2fhiuUB8W9Bq", "object": "card", "last4": "4242", "type": "Visa", "exp_month": 10, "exp_year": 2020, "fingerprint": "qhjxpr7DiCdFYTlH", "customer": "cus_2W2fj6IHUNOc2d", "country": "US", "name": null, "address_line1": null, "address_line2": null, "address_city": null, "address_state": null, "address_zip": null, "address_country": null, "cvc_check": null, "address_line1_check": null, "address_zip_check": null } ] }, "default_card": "card_2W2fhiuUB8W9Bq" } post: description: | Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the card parameter, that becomes the customer's active card to be used for all charges in future. When you update a customer to a new valid card, the last unpaid invoice (if one exists) will be retried automatically. body: application/x-www-form-urlencoded: formParameters: account_balance: description: | An integer amount in cents that is the starting account balance for your customer. A negative amount represents a credit that will be used before attempting any charges to the customer's card; a positive amount will be added to the next invoice. type: integer card: description: | The card can either be a token, like the ones returned by our Stripe.js, or a dictionary containing a user's credit card details (with the options shown below). Passing card will create a new card, make it the new customer default card, and delete the old customer default if one exists. If you want to add additional cards instead of replacing the existing default, use the card creation API. Whenever you attach a card to a customer, Stripe will automatically validate the card. type: string coupon: description: | If you provide a coupon code, the customer will have a discount applied on all recurring charges. Charges you create through the API will not have the discount. type: string default_card: description: | ID of card to make the customer's new default for invoice payments type: string description: description: | An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. This will be unset if you POST an empty value. type: string email: description: | Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This will be unset if you POST an empty value. type: string responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "account_balance": { "type":"number", "id": "http://jsonschema.net/account_balance", "required":false }, "cards": { "type":"object", "id": "http://jsonschema.net/cards", "required":false, "properties":{ "count": { "type":"number", "id": "http://jsonschema.net/cards/count", "required":false }, "data": { "type":"array", "id": "http://jsonschema.net/cards/data", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/cards/data/0", "required":false, "properties":{ "address_city": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_city", "required":false }, "address_country": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_country", "required":false }, "address_line1_check": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_line1_check", "required":false }, "address_line1": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_line1", "required":false }, "address_line2": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_line2", "required":false }, "address_state": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_state", "required":false }, "address_zip_check": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_zip_check", "required":false }, "address_zip": { "type":"null", "id": "http://jsonschema.net/cards/data/0/address_zip", "required":false }, "country": { "type":"string", "id": "http://jsonschema.net/cards/data/0/country", "required":false }, "customer": { "type":"string", "id": "http://jsonschema.net/cards/data/0/customer", "required":false }, "cvc_check": { "type":"null", "id": "http://jsonschema.net/cards/data/0/cvc_check", "required":false }, "exp_month": { "type":"number", "id": "http://jsonschema.net/cards/data/0/exp_month", "required":false }, "exp_year": { "type":"number", "id": "http://jsonschema.net/cards/data/0/exp_year", "required":false }, "fingerprint": { "type":"string", "id": "http://jsonschema.net/cards/data/0/fingerprint", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/cards/data/0/id", "required":false }, "last4": { "type":"string", "id": "http://jsonschema.net/cards/data/0/last4", "required":false }, "name": { "type":"null", "id": "http://jsonschema.net/cards/data/0/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/cards/data/0/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/cards/data/0/type", "required":false } } } }, "object": { "type":"string", "id": "http://jsonschema.net/cards/object", "required":false }, "url": { "type":"string", "id": "http://jsonschema.net/cards/url", "required":false } } }, "created": { "type":"number", "id": "http://jsonschema.net/created", "required":false }, "default_card": { "type":"string", "id": "http://jsonschema.net/default_card", "required":false }, "delinquent": { "type":"boolean", "id": "http://jsonschema.net/delinquent", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/description", "required":false }, "discount": { "type":"null", "id": "http://jsonschema.net/discount", "required":false }, "email": { "type":"string", "id": "http://jsonschema.net/email", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "subscription": { "type":"object", "id": "http://jsonschema.net/subscription", "required":false, "properties":{ "cancel_at_period_end": { "type":"boolean", "id": "http://jsonschema.net/subscription/cancel_at_period_end", "required":false }, "canceled_at": { "type":"null", "id": "http://jsonschema.net/subscription/canceled_at", "required":false }, "current_period_end": { "type":"number", "id": "http://jsonschema.net/subscription/current_period_end", "required":false }, "current_period_start": { "type":"number", "id": "http://jsonschema.net/subscription/current_period_start", "required":false }, "customer": { "type":"string", "id": "http://jsonschema.net/subscription/customer", "required":false }, "ended_at": { "type":"null", "id": "http://jsonschema.net/subscription/ended_at", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/subscription/id", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/subscription/object", "required":false }, "plan": { "type":"object", "id": "http://jsonschema.net/subscription/plan", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/subscription/plan/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/subscription/plan/currency", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/subscription/plan/id", "required":false }, "interval_count": { "type":"number", "id": "http://jsonschema.net/subscription/plan/interval_count", "required":false }, "interval": { "type":"string", "id": "http://jsonschema.net/subscription/plan/interval", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/subscription/plan/livemode", "required":false }, "name": { "type":"string", "id": "http://jsonschema.net/subscription/plan/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/subscription/plan/object", "required":false }, "trial_period_days": { "type":"null", "id": "http://jsonschema.net/subscription/plan/trial_period_days", "required":false } } }, "quantity": { "type":"number", "id": "http://jsonschema.net/subscription/quantity", "required":false }, "start": { "type":"number", "id": "http://jsonschema.net/subscription/start", "required":false }, "status": { "type":"string", "id": "http://jsonschema.net/subscription/status", "required":false }, "trial_end": { "type":"null", "id": "http://jsonschema.net/subscription/trial_end", "required":false }, "trial_start": { "type":"null", "id": "http://jsonschema.net/subscription/trial_start", "required":false } } } } } example: | { "object": "customer", "created": 1378379137, "id": "cus_2W2fj6IHUNOc2d", "livemode": false, "description": null, "email": "victor@huge-success.net", "delinquent": false, "subscription": { "id": "su_2W2fay9kQDcftp", "plan": { "interval": "month", "name": "Basic", "amount": 1000, "currency": "usd", "id": "basic", "object": "plan", "livemode": false, "interval_count": 1, "trial_period_days": null }, "object": "subscription", "start": 1378379138, "status": "active", "customer": "cus_2W2fj6IHUNOc2d", "cancel_at_period_end": false, "current_period_start": 1378379138, "current_period_end": 1380971138, "ended_at": null, "trial_start": null, "trial_end": null, "canceled_at": null, "quantity": 1 }, "discount": null, "account_balance": 0, "cards": { "object": "list", "count": 1, "url": "/v1/customers/cus_2W2fj6IHUNOc2d/cards", "data": [ { "id": "card_2W2fhiuUB8W9Bq", "object": "card", "last4": "4242", "type": "Visa", "exp_month": 10, "exp_year": 2020, "fingerprint": "qhjxpr7DiCdFYTlH", "customer": "cus_2W2fj6IHUNOc2d", "country": "US", "name": null, "address_line1": null, "address_line2": null, "address_city": null, "address_state": null, "address_zip": null, "address_country": null, "cvc_check": null, "address_line1_check": null, "address_zip_check": null } ] }, "default_card": "card_2W2fhiuUB8W9Bq" } delete: description: | Permanently deletes a customer. It cannot be undone. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "deleted": { "type":"boolean", "id": "http://jsonschema.net/deleted", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false } } } example: | { "id": "cu_2W2fo9IOza32fP", "deleted": true } /cards: displayName: Cards description: | Cards operations: * Creating a new card * Retrieving a customer's card * Updating a card * Deleting cards * Listing cards type: baseResource post: description: | Creating a new card. When you create a new credit card, you must specify a customer. Creating a new credit card will not change the customer's default credit card automatically; you should update the customer with a new default_card for that. body: application/x-www-form-urlencoded: formParameters: card: description: | The card can either be a token, like the ones returned by our Stripe.js, or a dictionary containing a user's credit card details (with the options shown below). Whenever you create a new card for a customer, Stripe will automatically validate the card. Card details: **number**: required The card number, as a string without any separators. **exp_month**: required Two digit number representing the card's expiration month. **exp_year**: required Two or four digit number representing the card's expiration year. **cvc**: optional, highly recommended Card security code. **name**: optional, Cardholder's full name. **address_line1**: optional **address_line2**: optional **address_zip**: optional **address_state**: optional **address_country**: optional type: string responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "address_city": { "type":"null", "id": "http://jsonschema.net/address_city", "required":false }, "address_country": { "type":"null", "id": "http://jsonschema.net/address_country", "required":false }, "address_line1_check": { "type":"null", "id": "http://jsonschema.net/address_line1_check", "required":false }, "address_line1": { "type":"null", "id": "http://jsonschema.net/address_line1", "required":false }, "address_line2": { "type":"null", "id": "http://jsonschema.net/address_line2", "required":false }, "address_state": { "type":"null", "id": "http://jsonschema.net/address_state", "required":false }, "address_zip_check": { "type":"null", "id": "http://jsonschema.net/address_zip_check", "required":false }, "address_zip": { "type":"null", "id": "http://jsonschema.net/address_zip", "required":false }, "country": { "type":"string", "id": "http://jsonschema.net/country", "required":false }, "customer": { "type":"null", "id": "http://jsonschema.net/customer", "required":false }, "cvc_check": { "type":"string", "id": "http://jsonschema.net/cvc_check", "required":false }, "exp_month": { "type":"number", "id": "http://jsonschema.net/exp_month", "required":false }, "exp_year": { "type":"number", "id": "http://jsonschema.net/exp_year", "required":false }, "fingerprint": { "type":"string", "id": "http://jsonschema.net/fingerprint", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "last4": { "type":"string", "id": "http://jsonschema.net/last4", "required":false }, "name": { "type":"null", "id": "http://jsonschema.net/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/type", "required":false } } } example: | { "id": "card_2W2sZ5oLJ4aVNE", "object": "card", "last4": "4242", "type": "Visa", "exp_month": 1, "exp_year": 2050, "fingerprint": "qhjxpr7DiCdFYTlH", "customer": null, "country": "US", "name": null, "address_line1": null, "address_line2": null, "address_city": null, "address_state": null, "address_zip": null, "address_country": null, "cvc_check": "pass", "address_line1_check": null, "address_zip_check": null } get: description: | You can see a list of the customer's cards. Note that the 10 most recent cards are always available by default on the customer object. If you need more than 10, you can use the listing API to page through the additional cards. queryParameters: count: description: | A limit on the number of objects to be returned. type: integer minimum: 1 maximum: 100 default: 10 offset: description: | An offset into the list of returned items. The API will return the requested number of items starting at that offset type: integer minimum: 0 default: 0 responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "count": { "type":"number", "id": "http://jsonschema.net/count", "required":false }, "data": { "type":"array", "id": "http://jsonschema.net/data", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/data/0", "required":false, "properties":{ "address_city": { "type":"null", "id": "http://jsonschema.net/data/0/address_city", "required":false }, "address_country": { "type":"null", "id": "http://jsonschema.net/data/0/address_country", "required":false }, "address_line1_check": { "type":"null", "id": "http://jsonschema.net/data/0/address_line1_check", "required":false }, "address_line1": { "type":"null", "id": "http://jsonschema.net/data/0/address_line1", "required":false }, "address_line2": { "type":"null", "id": "http://jsonschema.net/data/0/address_line2", "required":false }, "address_state": { "type":"null", "id": "http://jsonschema.net/data/0/address_state", "required":false }, "address_zip_check": { "type":"null", "id": "http://jsonschema.net/data/0/address_zip_check", "required":false }, "address_zip": { "type":"null", "id": "http://jsonschema.net/data/0/address_zip", "required":false }, "country": { "type":"string", "id": "http://jsonschema.net/data/0/country", "required":false }, "customer": { "type":"null", "id": "http://jsonschema.net/data/0/customer", "required":false }, "cvc_check": { "type":"string", "id": "http://jsonschema.net/data/0/cvc_check", "required":false }, "exp_month": { "type":"number", "id": "http://jsonschema.net/data/0/exp_month", "required":false }, "exp_year": { "type":"number", "id": "http://jsonschema.net/data/0/exp_year", "required":false }, "fingerprint": { "type":"string", "id": "http://jsonschema.net/data/0/fingerprint", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/data/0/id", "required":false }, "last4": { "type":"string", "id": "http://jsonschema.net/data/0/last4", "required":false }, "name": { "type":"null", "id": "http://jsonschema.net/data/0/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/data/0/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/data/0/type", "required":false } } } }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "url": { "type":"string", "id": "http://jsonschema.net/url", "required":false } } } example: | { "object": "list", "url": "/v1/customers/cu_2W3K3PwO1ECFGh/cards", "count": 2, "data": [ { "id": "card_2W6ZlG7CMrI5Us", "object": "card", "last4": "4242", "type": "Visa", "exp_month": 1, "exp_year": 2050, "fingerprint": "qhjxpr7DiCdFYTlH", "customer": null, "country": "US", "name": null, "address_line1": null, "address_line2": null, "address_city": null, "address_state": null, "address_zip": null, "address_country": null, "cvc_check": "pass", "address_line1_check": null, "address_zip_check": null }, { "id": "card_2W6ZlGsdfMrI5Us", "object": "card", "last4": "1234", "type": "Visa", "exp_month": 1, "exp_year": 2051, "fingerprint": "qhjxpr7DiCdFYTlH", "customer": null, "country": "US", "name": null, "address_line1": null, "address_line2": null, "address_city": null, "address_state": null, "address_zip": null, "address_country": null, "cvc_check": "pass", "address_line1_check": null, "address_zip_check": null } ] } /{CARD_ID}: type: baseResource uriParameters: CARD_ID: displayName: Card ID description: ID of card to retrieve type: string required: true get: description: | Retrieving a customer's card. By default, you can see the 10 most recent cards stored on a customer directly on the customer object, but you can also retrieve details about a specific card stored on the customer. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "address_city": { "type":"null", "id": "http://jsonschema.net/address_city", "required":false }, "address_country": { "type":"null", "id": "http://jsonschema.net/address_country", "required":false }, "address_line1_check": { "type":"null", "id": "http://jsonschema.net/address_line1_check", "required":false }, "address_line1": { "type":"null", "id": "http://jsonschema.net/address_line1", "required":false }, "address_line2": { "type":"null", "id": "http://jsonschema.net/address_line2", "required":false }, "address_state": { "type":"null", "id": "http://jsonschema.net/address_state", "required":false }, "address_zip_check": { "type":"null", "id": "http://jsonschema.net/address_zip_check", "required":false }, "address_zip": { "type":"null", "id": "http://jsonschema.net/address_zip", "required":false }, "country": { "type":"string", "id": "http://jsonschema.net/country", "required":false }, "customer": { "type":"null", "id": "http://jsonschema.net/customer", "required":false }, "cvc_check": { "type":"string", "id": "http://jsonschema.net/cvc_check", "required":false }, "exp_month": { "type":"number", "id": "http://jsonschema.net/exp_month", "required":false }, "exp_year": { "type":"number", "id": "http://jsonschema.net/exp_year", "required":false }, "fingerprint": { "type":"string", "id": "http://jsonschema.net/fingerprint", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "last4": { "type":"string", "id": "http://jsonschema.net/last4", "required":false }, "name": { "type":"null", "id": "http://jsonschema.net/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/type", "required":false } } } example: | { "id": "card_2W2sZ5oLJ4aVNE", "object": "card", "last4": "4242", "type": "Visa", "exp_month": 1, "exp_year": 2050, "fingerprint": "qhjxpr7DiCdFYTlH", "customer": null, "country": "US", "name": null, "address_line1": null, "address_line2": null, "address_city": null, "address_state": null, "address_zip": null, "address_country": null, "cvc_check": "pass", "address_line1_check": null, "address_zip_check": null } post: description: | Updating a card. If you need to update only some card details, like the billing address or expiration date, you can do so without having to re-enter the full card details. When you update a card, Stripe will automatically validate the card. body: application/x-www-form-urlencoded: formParameters: address_city: type: string address_country: type: string address_line1: type: string address_line2: type: string address_state: type: string address_zip: type: string exp_month: type: integer exp_year: type: integer name: type: string responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "address_city": { "type":"null", "id": "http://jsonschema.net/address_city", "required":false }, "address_country": { "type":"null", "id": "http://jsonschema.net/address_country", "required":false }, "address_line1_check": { "type":"null", "id": "http://jsonschema.net/address_line1_check", "required":false }, "address_line1": { "type":"null", "id": "http://jsonschema.net/address_line1", "required":false }, "address_line2": { "type":"null", "id": "http://jsonschema.net/address_line2", "required":false }, "address_state": { "type":"null", "id": "http://jsonschema.net/address_state", "required":false }, "address_zip_check": { "type":"null", "id": "http://jsonschema.net/address_zip_check", "required":false }, "address_zip": { "type":"null", "id": "http://jsonschema.net/address_zip", "required":false }, "country": { "type":"string", "id": "http://jsonschema.net/country", "required":false }, "customer": { "type":"null", "id": "http://jsonschema.net/customer", "required":false }, "cvc_check": { "type":"string", "id": "http://jsonschema.net/cvc_check", "required":false }, "exp_month": { "type":"number", "id": "http://jsonschema.net/exp_month", "required":false }, "exp_year": { "type":"number", "id": "http://jsonschema.net/exp_year", "required":false }, "fingerprint": { "type":"string", "id": "http://jsonschema.net/fingerprint", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "last4": { "type":"string", "id": "http://jsonschema.net/last4", "required":false }, "name": { "type":"null", "id": "http://jsonschema.net/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/type", "required":false } } } example: | { "id": "card_2W2sZ5oLJ4aVNE", "object": "card", "last4": "4242", "type": "Visa", "exp_month": 1, "exp_year": 2050, "fingerprint": "qhjxpr7DiCdFYTlH", "customer": null, "country": "US", "name": null, "address_line1": null, "address_line2": null, "address_city": null, "address_state": null, "address_zip": null, "address_country": null, "cvc_check": "pass", "address_line1_check": null, "address_zip_check": null } delete: description: | You can delete cards from a customer. If you delete a card that is currently a customer's default, the most recently added card will be used as the new default. If you delete the customer's last remaining card, the default_card attribute on the customer will become null. Note that you may want to prevent customers on paid subscriptions from deleting all cards on file so that there is at least one default card for the next invoice payment attempt. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "deleted": { "type":"boolean", "id": "http://jsonschema.net/deleted", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false } } } example: | { "id": "cu_2W2fo9IOza32fP", "deleted": true } /subscription: type: baseResource post: description: | Subscribes a customer to a plan, meaning the customer will be billed monthly starting from signup. If the customer already has an active subscription, we'll update it to the new plan and optionally prorate the price we charge next month to make up for any price changes. body: application/x-www-form-urlencoded: formParameters: plan: description: The identifier of the plan to subscribe the customer to. type: string required: true coupon: description: | The code of the coupon to apply to the customer if you would like to apply it at the same time as creating the subscription. type: string default: null prorate: description: | Flag telling us whether to prorate switching plans during a billing cycle. type: string default: true trial_end: description: | UTC integer timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value now can be provided to end the customer's trial immediately. type: string default: null card: description: | The card can either be a token, like the ones returned by our Stripe.js, or a dictionary containing a user's credit card details (with the options shown below). You must provide a card if the customer does not already have a valid card attached, and you are subscribing the customer for a plan that is not free. Passing card will create a new card, make it the customer default card, and delete the old customer default if one exists. If you want to add an additional card to use with subscriptions, instead use the card creation API to add the card and then the customer update API to set it as the default. Whenever you attach a card to a customer, Stripe will automatically validate the card. Card details: **number**: required The card number, as a string without any separators. **exp_month**: required Two digit number representing the card's expiration month. **exp_year**: required Two or four digit number representing the card's expiration year. **cvc**: optional, highly recommended Card security code. **name**: optional, Cardholder's full name. **address_line1**: optional **address_line2**: optional **address_zip**: optional **address_state**: optional **address_country**: optional type: string quantity: description: | The quantity you'd like to apply to the subscription you're creating. For example, if your plan is $10/user/month, and your customer has 5 users, you could pass 5 as the quantity to have the customer charged $50 (5 x $10) monthly. If you update a subscription but don't change the plan ID (e.g. changing only the trial_end), the subscription will inherit the old subscription's quantity attribute unless you pass a new quantity parameter. If you update a subscription and change the plan ID, the new subscription will not inherit the quantity attribute and will default to 1 unless you pass a quantity parameter. type: integer default: 1 application_fee_percent: description: | A positive integer between 1 and 100 that represents the percentage of the subscription invoice amount due each billing period (including any bundled invoice items) that will be transferred to the application owner's Stripe account. The request must be made with an OAuth key in order to set an application fee percentage . For more information, see the application fees documentation. type: string default: null responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "application_fee_percent": { "type":"null", "id": "http://jsonschema.net/application_fee_percent", "required":false }, "cancel_at_period_end": { "type":"boolean", "id": "http://jsonschema.net/cancel_at_period_end", "required":false }, "canceled_at": { "type":"null", "id": "http://jsonschema.net/canceled_at", "required":false }, "current_period_end": { "type":"number", "id": "http://jsonschema.net/current_period_end", "required":false }, "current_period_start": { "type":"number", "id": "http://jsonschema.net/current_period_start", "required":false }, "customer": { "type":"string", "id": "http://jsonschema.net/customer", "required":false }, "ended_at": { "type":"null", "id": "http://jsonschema.net/ended_at", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "plan": { "type":"object", "id": "http://jsonschema.net/plan", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/plan/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/plan/currency", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/plan/id", "required":false }, "interval_count": { "type":"number", "id": "http://jsonschema.net/plan/interval_count", "required":false }, "interval": { "type":"string", "id": "http://jsonschema.net/plan/interval", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/plan/livemode", "required":false }, "name": { "type":"string", "id": "http://jsonschema.net/plan/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/plan/object", "required":false }, "trial_period_days": { "type":"null", "id": "http://jsonschema.net/plan/trial_period_days", "required":false } } }, "quantity": { "type":"number", "id": "http://jsonschema.net/quantity", "required":false }, "start": { "type":"number", "id": "http://jsonschema.net/start", "required":false }, "status": { "type":"string", "id": "http://jsonschema.net/status", "required":false }, "trial_end": { "type":"null", "id": "http://jsonschema.net/trial_end", "required":false }, "trial_start": { "type":"null", "id": "http://jsonschema.net/trial_start", "required":false } } } example: | { "id": "su_2i0bDIlnaMV0Vq", "plan": { "interval": "month", "name": "Java Bindings Plan", "amount": 100, "currency": "usd", "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", "object": "plan", "livemode": false, "interval_count": 1, "trial_period_days": null }, "object": "subscription", "start": 1381139171, "status": "active", "customer": "cus_2hzElrZhmfV9my", "cancel_at_period_end": false, "current_period_start": 1381139171, "current_period_end": 1383817571, "ended_at": null, "trial_start": null, "trial_end": null, "canceled_at": null, "quantity": 1, "application_fee_percent": null } delete: description: | Cancels the subscription if it exists. If you set the at_period_end parameter to true, the subscription will remain active until the end of the period, at which point it will be cancelled and not renewed. By default, the subscription is terminated immediately. In either case, the customer will not be charged again for the subscription. Note, however, that any pending invoice items that you've created will still be charged for at the end of the period unless manually deleted.If you've set the subscription to cancel at period end, any pending prorations will also be left in place and collected at the end of the period, but if the subscription is set to cancel immediately, pending prorations will be removed. By default, all unpaid invoices for the customer will be closed upon subscription cancellation. We do this in order to prevent unexpected payment retries once the customer has canceled a subscription. However, you can reopen the invoices manually after subscription cancellation to have us proceed with automatic retries, or you could even re-attempt payment yourself on all unpaid invoices before allowing the customer to cancel the subscription at all. queryParameters: at_period_end: description: | A flag that if set to true will delay the cancellation of the subscription until the end of the current period. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "application_fee_percent": { "type":"null", "id": "http://jsonschema.net/application_fee_percent", "required":false }, "cancel_at_period_end": { "type":"boolean", "id": "http://jsonschema.net/cancel_at_period_end", "required":false }, "canceled_at": { "type":"null", "id": "http://jsonschema.net/canceled_at", "required":false }, "current_period_end": { "type":"number", "id": "http://jsonschema.net/current_period_end", "required":false }, "current_period_start": { "type":"number", "id": "http://jsonschema.net/current_period_start", "required":false }, "customer": { "type":"string", "id": "http://jsonschema.net/customer", "required":false }, "ended_at": { "type":"null", "id": "http://jsonschema.net/ended_at", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "plan": { "type":"object", "id": "http://jsonschema.net/plan", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/plan/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/plan/currency", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/plan/id", "required":false }, "interval_count": { "type":"number", "id": "http://jsonschema.net/plan/interval_count", "required":false }, "interval": { "type":"string", "id": "http://jsonschema.net/plan/interval", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/plan/livemode", "required":false }, "name": { "type":"string", "id": "http://jsonschema.net/plan/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/plan/object", "required":false }, "trial_period_days": { "type":"null", "id": "http://jsonschema.net/plan/trial_period_days", "required":false } } }, "quantity": { "type":"number", "id": "http://jsonschema.net/quantity", "required":false }, "start": { "type":"number", "id": "http://jsonschema.net/start", "required":false }, "status": { "type":"string", "id": "http://jsonschema.net/status", "required":false }, "trial_end": { "type":"null", "id": "http://jsonschema.net/trial_end", "required":false }, "trial_start": { "type":"null", "id": "http://jsonschema.net/trial_start", "required":false } } } example: | { "id": "su_2i0bDIlnaMV0Vq", "plan": { "interval": "month", "name": "Java Bindings Plan", "amount": 100, "currency": "usd", "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", "object": "plan", "livemode": false, "interval_count": 1, "trial_period_days": null }, "object": "subscription", "start": 1381139171, "status": "active", "customer": "cus_2hzElrZhmfV9my", "cancel_at_period_end": false, "current_period_start": 1381139171, "current_period_end": 1383817571, "ended_at": null, "trial_start": null, "trial_end": null, "canceled_at": null, "quantity": 1, "application_fee_percent": null } /discount: type: baseResource delete: description: Removes the currently applied discount on a customer. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "deleted": { "type":"boolean", "id": "http://jsonschema.net/deleted", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false } } } example: | { "id": "cu_2W2fo9IOza32fP", "deleted": true } /plans: type: baseResource post: description: | You can create plans easily via the plan management page of the Stripe dashboard. Plan creation is also accessible via the API if you need to create plans on the fly. body: application/x-www-form-urlencoded: formParameters: id: description: | Unique string of your choice that will be used to identify this plan when subscribing a customer. This could be an identifier like "gold" or a primary key from your own database. type: string required: true amount: description: | A positive integer in cents (or 0 for a free plan) representing how much to charge (on a recurring basis). type: integer required: true currency: description: 3-letter ISO code for currency. type: string minLength: 3 maxLength: 3 required: true interval: description: Specifies billing frequency. Either week, month or year. enum: [week, month, year] required: true interval_count: description: | The number of the unit specified in the interval parameter. For example, you could specify an interval_count of 3 and an interval of 'month' for quarterly billing (every 3 months). type: integer default: 1 name: description: | Name of the plan, to be displayed on invoices and in the web interface. type: string required: true trial_period_days: description: | Specifies a trial period in (an integer number of) days. If you include a trial period, the customer won't be billed for the first time until the trial period ends. If the customer cancels before the trial period is over, she'll never be billed at all. type: string default: null responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "interval_count": { "type":"number", "id": "http://jsonschema.net/interval_count", "required":false }, "interval": { "type":"string", "id": "http://jsonschema.net/interval", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "name": { "type":"string", "id": "http://jsonschema.net/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "trial_period_days": { "type":"null", "id": "http://jsonschema.net/trial_period_days", "required":false } } } example: | { "interval": "month", "name": "Java Bindings Plan", "amount": 100, "currency": "usd", "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", "object": "plan", "livemode": false, "interval_count": 1, "trial_period_days": null } get: description: Returns a list of your plans. queryParameters: count: description: | A limit on the number of objects to be returned. Count can range between 1 and 100 items. type: integer minimum: 1 maximum: 100 default: 10 offset: description: | An offset into the list of returned items. The API will return the requested number of items starting at that offset. type: integer default: 0 responses: 200: body: schema: | { "type": "object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required": false, "properties": { "count": { "type": "number", "id": "http://jsonschema.net/count", "required": false }, "data": { "type": "array", "id": "http://jsonschema.net/data", "required": false, "items": { "type": "object", "id": "http://jsonschema.net", "required": false, "properties": { "amount": { "type": "number", "id": "http://jsonschema.net/amount", "required": false }, "currency": { "type": "string", "id": "http://jsonschema.net/currency", "required": false }, "id": { "type": "string", "id": "http://jsonschema.net/id", "required": false }, "interval_count": { "type": "number", "id": "http://jsonschema.net/interval_count", "required": false }, "interval": { "type": "string", "id": "http://jsonschema.net/interval", "required": false }, "livemode": { "type": "boolean", "id": "http://jsonschema.net/livemode", "required": false }, "name": { "type": "string", "id": "http://jsonschema.net/name", "required": false }, "object": { "type": "string", "id": "http://jsonschema.net/object", "required": false }, "trial_period_days": { "type": "null", "id": "http://jsonschema.net/trial_period_days", "required": false } } } } } } example: | { "object": "list", "url": "/v1/plans", "count": 1, "data": [ { "interval": "month", "name": "Java Bindings Plan", "amount": 100, "currency": "usd", "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", "object": "plan", "livemode": false, "interval_count": 1, "trial_period_days": null } ] } /{PLAN_ID}: type: baseResource uriParameters: PLAN_ID: description: The ID of the desired plan. type: string get: description: Retrieves the plan with the given ID. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "interval_count": { "type":"number", "id": "http://jsonschema.net/interval_count", "required":false }, "interval": { "type":"string", "id": "http://jsonschema.net/interval", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "name": { "type":"string", "id": "http://jsonschema.net/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "trial_period_days": { "type":"null", "id": "http://jsonschema.net/trial_period_days", "required":false } } } example: | { "interval": "month", "name": "Java Bindings Plan", "amount": 100, "currency": "usd", "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", "object": "plan", "livemode": false, "interval_count": 1, "trial_period_days": null } post: description: | Updates the name of a plan. Other plan details (price, interval, etc.) are, by design, not editable. body: application/x-www-form-urlencoded: formParameters: name: description: | Name of the plan, to be displayed on invoices and in the web interface. type: string responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "interval_count": { "type":"number", "id": "http://jsonschema.net/interval_count", "required":false }, "interval": { "type":"string", "id": "http://jsonschema.net/interval", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "name": { "type":"string", "id": "http://jsonschema.net/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "trial_period_days": { "type":"null", "id": "http://jsonschema.net/trial_period_days", "required":false } } } example: | { "interval": "month", "name": "Java Bindings Plan", "amount": 100, "currency": "usd", "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", "object": "plan", "livemode": false, "interval_count": 1, "trial_period_days": null } delete: description: | You can delete plans via the plan management page of the Stripe dashboard. However, deleting a plan does not affect any current subscribers to the plan; it merely means that new subscribers can't be added to that plan. You can also delete plans via the API. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "deleted": { "type":"boolean", "id": "http://jsonschema.net/deleted", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false } } } example: | { "id": "cu_2W2fo9IOza32fP", "deleted": true } /coupons: type: baseResource post: description: | You can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly. A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice's subtotal. For example, an invoice with a subtotal $10 will have a final total of -$10 if a coupon with an amount_off of 2000 is applied to it. body: application/x-www-form-urlencoded: formParameters: id: description: | Unique string of your choice that will be used to identify this coupon when applying it a customer. This is often a specific code you'll give to your customer to use when signing up (e.g. FALL25OFF). If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you. type: string duration: description: | Specifies how long the discount will be in effect. Can be forever, once, or repeating. enum: [ forever, once, repeating ] required: true amount_off: description: | A positive integer representing the amount to subtract from an invoice total (if percent_off is not passed). type: integer currency: description: | Currency of the amount_off parameter (if percent_off is not passed) type: string duration_in_months: description: | Required only if duration is repeating If duration is repeating, a positive integer that specifies the number of months the discount will be in effect. type: integer max_redemptions: description: | A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use. type: integer percent_off: description: | A positive integer between 1 and 100 that represents the discount the coupon will apply (if amount_off is not passed). type: integer minimum: 1 maximum: 100 redeem_by: description: | UTC timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers. type: string responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "amount_off": { "type":"null", "id": "http://jsonschema.net/amount_off", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "duration_in_months": { "type":"number", "id": "http://jsonschema.net/duration_in_months", "required":false }, "duration": { "type":"string", "id": "http://jsonschema.net/duration", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "max_redemptions": { "type":"null", "id": "http://jsonschema.net/max_redemptions", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "percent_off": { "type":"number", "id": "http://jsonschema.net/percent_off", "required":false }, "redeem_by": { "type":"null", "id": "http://jsonschema.net/redeem_by", "required":false }, "times_redeemed": { "type":"number", "id": "http://jsonschema.net/times_redeemed", "required":false } } } example: | { "id": "259FF", "percent_off": 25, "amount_off": null, "currency": "usd", "object": "coupon", "livemode": false, "duration": "repeating", "redeem_by": null, "max_redemptions": null, "times_redeemed": 0, "duration_in_months": 3 } get: description: Returns a list of your coupons. queryParameters: count: description: | A limit on the number of objects to be returned. Count can range between 1 and 100 items. type: integer minimum: 1 maximum: 100 default: 10 offset: description: | An offset into the list of returned items. The API will return the requested number of items starting at that offset. type: integer default: 0 responses: 200: body: schema: | { "type": "object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required": false, "properties": { "count": { "type": "number", "id": "http://jsonschema.net/count", "required": false }, "data": { "type": "array", "id": "http://jsonschema.net/data", "required": false, "items": { "type": "object", "id": "http://jsonschema.net", "required": false, "properties": { "amount_off": { "type": "null", "id": "http://jsonschema.net/amount_off", "required": false }, "currency": { "type": "string", "id": "http://jsonschema.net/currency", "required": false }, "duration_in_months": { "type": "number", "id": "http://jsonschema.net/duration_in_months", "required": false }, "duration": { "type": "string", "id": "http://jsonschema.net/duration", "required": false }, "id": { "type": "string", "id": "http://jsonschema.net/id", "required": false }, "livemode": { "type": "boolean", "id": "http://jsonschema.net/livemode", "required": false }, "max_redemptions": { "type": "null", "id": "http://jsonschema.net/max_redemptions", "required": false }, "object": { "type": "string", "id": "http://jsonschema.net/object", "required": false }, "percent_off": { "type": "number", "id": "http://jsonschema.net/percent_off", "required": false }, "redeem_by": { "type": "null", "id": "http://jsonschema.net/redeem_by", "required": false }, "times_redeemed": { "type": "number", "id": "http://jsonschema.net/times_redeemed", "required": false } } } } } } example: | { "object": "list", "url": "/v1/coupons", "count": 1, "data": [ { "id": "259FF", "percent_off": 25, "amount_off": null, "currency": "usd", "object": "coupon", "livemode": false, "duration": "repeating", "redeem_by": null, "max_redemptions": null, "times_redeemed": 0, "duration_in_months": 3 } ] } /{COUPON_ID}: type: baseResource uriParameters: COUPON_ID: description: The ID of the desired coupon. type: string get: description: Retrieves the coupon with the given ID. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "amount_off": { "type":"null", "id": "http://jsonschema.net/amount_off", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "duration_in_months": { "type":"number", "id": "http://jsonschema.net/duration_in_months", "required":false }, "duration": { "type":"string", "id": "http://jsonschema.net/duration", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "max_redemptions": { "type":"null", "id": "http://jsonschema.net/max_redemptions", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "percent_off": { "type":"number", "id": "http://jsonschema.net/percent_off", "required":false }, "redeem_by": { "type":"null", "id": "http://jsonschema.net/redeem_by", "required":false }, "times_redeemed": { "type":"number", "id": "http://jsonschema.net/times_redeemed", "required":false } } } example: | { "id": "259FF", "percent_off": 25, "amount_off": null, "currency": "usd", "object": "coupon", "livemode": false, "duration": "repeating", "redeem_by": null, "max_redemptions": null, "times_redeemed": 0, "duration_in_months": 3 } delete: description: | You can delete coupons via the coupon management page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "deleted": { "type":"boolean", "id": "http://jsonschema.net/deleted", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false } } } example: | { "id": "cu_2W2fo9IOza32fP", "deleted": true } /invoices: type: baseResource post: description: | If you need to invoice your customer outside the regular billing cycle, you can create an invoice that pulls in all pending invoice items, including prorations. The customer's billing cycle and regular subscription won't be affected. Once you create the invoice, it'll be picked up and paid automatically, though you can choose to pay it right away. body: application/x-www-form-urlencoded: formParameters: customer: type: string required: true application_fee: description: | A fee in cents that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key in order to take an application fee. For more information, see the application fees documentation. type: integer responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "amount_due": { "type":"number", "id": "http://jsonschema.net/amount_due", "required":false }, "application_fee": { "type":"null", "id": "http://jsonschema.net/application_fee", "required":false }, "attempt_count": { "type":"number", "id": "http://jsonschema.net/attempt_count", "required":false }, "attempted": { "type":"boolean", "id": "http://jsonschema.net/attempted", "required":false }, "charge": { "type":"null", "id": "http://jsonschema.net/charge", "required":false }, "closed": { "type":"boolean", "id": "http://jsonschema.net/closed", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "customer": { "type":"string", "id": "http://jsonschema.net/customer", "required":false }, "date": { "type":"number", "id": "http://jsonschema.net/date", "required":false }, "discount": { "type":"null", "id": "http://jsonschema.net/discount", "required":false }, "ending_balance": { "type":"null", "id": "http://jsonschema.net/ending_balance", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "lines": { "type":"object", "id": "http://jsonschema.net/lines", "required":false, "properties":{ "count": { "type":"number", "id": "http://jsonschema.net/lines/count", "required":false }, "data": { "type":"array", "id": "http://jsonschema.net/lines/data", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/lines/data/0", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/lines/data/0/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/lines/data/0/currency", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/lines/data/0/description", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/lines/data/0/id", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/lines/data/0/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/lines/data/0/object", "required":false }, "period": { "type":"object", "id": "http://jsonschema.net/lines/data/0/period", "required":false, "properties":{ "end": { "type":"number", "id": "http://jsonschema.net/lines/data/0/period/end", "required":false }, "start": { "type":"number", "id": "http://jsonschema.net/lines/data/0/period/start", "required":false } } }, "plan": { "type":"object", "id": "http://jsonschema.net/lines/data/0/plan", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/lines/data/0/plan/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/currency", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/id", "required":false }, "interval_count": { "type":"number", "id": "http://jsonschema.net/lines/data/0/plan/interval_count", "required":false }, "interval": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/interval", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/lines/data/0/plan/livemode", "required":false }, "name": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/object", "required":false }, "trial_period_days": { "type":"null", "id": "http://jsonschema.net/lines/data/0/plan/trial_period_days", "required":false } } }, "proration": { "type":"boolean", "id": "http://jsonschema.net/lines/data/0/proration", "required":false }, "quantity": { "type":"number", "id": "http://jsonschema.net/lines/data/0/quantity", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/lines/data/0/type", "required":false } } } }, "object": { "type":"string", "id": "http://jsonschema.net/lines/object", "required":false }, "url": { "type":"string", "id": "http://jsonschema.net/lines/url", "required":false } } }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "next_payment_attempt": { "type":"null", "id": "http://jsonschema.net/next_payment_attempt", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "paid": { "type":"boolean", "id": "http://jsonschema.net/paid", "required":false }, "period_end": { "type":"number", "id": "http://jsonschema.net/period_end", "required":false }, "period_start": { "type":"number", "id": "http://jsonschema.net/period_start", "required":false }, "starting_balance": { "type":"number", "id": "http://jsonschema.net/starting_balance", "required":false }, "subtotal": { "type":"number", "id": "http://jsonschema.net/subtotal", "required":false }, "total": { "type":"number", "id": "http://jsonschema.net/total", "required":false } } } example: | { "date": 1381134043, "id": "in_2hzEcE91Q3iHBb", "period_start": 1381134043, "period_end": 1381134043, "lines": { "data": [ { "id": "su_2i0bDIlnaMV0Vq", "object": "line_item", "type": "subscription", "livemode": true, "amount": 100, "currency": "usd", "proration": false, "period": { "start": 1383817571, "end": 1386409571 }, "quantity": 1, "plan": { "interval": "month", "name": "Java Bindings Plan", "amount": 100, "currency": "usd", "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", "object": "plan", "livemode": false, "interval_count": 1, "trial_period_days": null }, "description": null } ], "count": 1, "object": "list", "url": "/v1/invoices/in_2hzEcE91Q3iHBb/lines" }, "subtotal": 0, "total": 0, "customer": "cus_2hzElrZhmfV9my", "object": "invoice", "attempted": true, "closed": true, "paid": true, "livemode": false, "attempt_count": 0, "amount_due": 0, "currency": "usd", "starting_balance": 0, "ending_balance": null, "next_payment_attempt": null, "charge": null, "discount": null, "application_fee": null } /{INVOICE_ID}: type: baseResource uriParameters: INVOICE_ID: description: The identifier of the desired invoice. type: string get: description: | Retrieves the invoice with the given ID. Returns an invoice object if a valid invoice ID was provided. Returns an error otherwise. The invoice object contains a lines hash that contains information about the subscriptions and invoice items that have been applied to the invoice, as well as any prorations that Stripe has automatically calculated. Each line on the invoice has an amount attribute that represents the amount actually contributed to the invoice's total. For invoice items and prorations, the amount attribute is the same as for the invoice item or proration respectively. For subscriptions, the amount may be different from the plan's regular price depending on whether the invoice covers a trial period or the invoice period differs from the plan's usual interval. The invoice object has both a subtotal and a total. The subtotal represents the total before any discounts, while the total is the final amount to be charged to the customer after all coupons have been applied. The invoice also has a next_payment_attempt attribute that tells you the next time (as a UTC timestamp) payment for the invoice will be automatically attempted. For invoices that have been closed or that have reached the maximum number of retries (specified in your retry settings) , the next_payment_attempt will be null. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "amount_due": { "type":"number", "id": "http://jsonschema.net/amount_due", "required":false }, "application_fee": { "type":"null", "id": "http://jsonschema.net/application_fee", "required":false }, "attempt_count": { "type":"number", "id": "http://jsonschema.net/attempt_count", "required":false }, "attempted": { "type":"boolean", "id": "http://jsonschema.net/attempted", "required":false }, "charge": { "type":"null", "id": "http://jsonschema.net/charge", "required":false }, "closed": { "type":"boolean", "id": "http://jsonschema.net/closed", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "customer": { "type":"string", "id": "http://jsonschema.net/customer", "required":false }, "date": { "type":"number", "id": "http://jsonschema.net/date", "required":false }, "discount": { "type":"null", "id": "http://jsonschema.net/discount", "required":false }, "ending_balance": { "type":"null", "id": "http://jsonschema.net/ending_balance", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "lines": { "type":"object", "id": "http://jsonschema.net/lines", "required":false, "properties":{ "count": { "type":"number", "id": "http://jsonschema.net/lines/count", "required":false }, "data": { "type":"array", "id": "http://jsonschema.net/lines/data", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/lines/data/0", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/lines/data/0/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/lines/data/0/currency", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/lines/data/0/description", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/lines/data/0/id", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/lines/data/0/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/lines/data/0/object", "required":false }, "period": { "type":"object", "id": "http://jsonschema.net/lines/data/0/period", "required":false, "properties":{ "end": { "type":"number", "id": "http://jsonschema.net/lines/data/0/period/end", "required":false }, "start": { "type":"number", "id": "http://jsonschema.net/lines/data/0/period/start", "required":false } } }, "plan": { "type":"object", "id": "http://jsonschema.net/lines/data/0/plan", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/lines/data/0/plan/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/currency", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/id", "required":false }, "interval_count": { "type":"number", "id": "http://jsonschema.net/lines/data/0/plan/interval_count", "required":false }, "interval": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/interval", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/lines/data/0/plan/livemode", "required":false }, "name": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/object", "required":false }, "trial_period_days": { "type":"null", "id": "http://jsonschema.net/lines/data/0/plan/trial_period_days", "required":false } } }, "proration": { "type":"boolean", "id": "http://jsonschema.net/lines/data/0/proration", "required":false }, "quantity": { "type":"number", "id": "http://jsonschema.net/lines/data/0/quantity", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/lines/data/0/type", "required":false } } } }, "object": { "type":"string", "id": "http://jsonschema.net/lines/object", "required":false }, "url": { "type":"string", "id": "http://jsonschema.net/lines/url", "required":false } } }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "next_payment_attempt": { "type":"null", "id": "http://jsonschema.net/next_payment_attempt", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "paid": { "type":"boolean", "id": "http://jsonschema.net/paid", "required":false }, "period_end": { "type":"number", "id": "http://jsonschema.net/period_end", "required":false }, "period_start": { "type":"number", "id": "http://jsonschema.net/period_start", "required":false }, "starting_balance": { "type":"number", "id": "http://jsonschema.net/starting_balance", "required":false }, "subtotal": { "type":"number", "id": "http://jsonschema.net/subtotal", "required":false }, "total": { "type":"number", "id": "http://jsonschema.net/total", "required":false } } } example: | { "date": 1381134043, "id": "in_2hzEcE91Q3iHBb", "period_start": 1381134043, "period_end": 1381134043, "lines": { "data": [ { "id": "su_2i0bDIlnaMV0Vq", "object": "line_item", "type": "subscription", "livemode": true, "amount": 100, "currency": "usd", "proration": false, "period": { "start": 1383817571, "end": 1386409571 }, "quantity": 1, "plan": { "interval": "month", "name": "Java Bindings Plan", "amount": 100, "currency": "usd", "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", "object": "plan", "livemode": false, "interval_count": 1, "trial_period_days": null }, "description": null } ], "count": 1, "object": "list", "url": "/v1/invoices/in_2hzEcE91Q3iHBb/lines" }, "subtotal": 0, "total": 0, "customer": "cus_2hzElrZhmfV9my", "object": "invoice", "attempted": true, "closed": true, "paid": true, "livemode": false, "attempt_count": 0, "amount_due": 0, "currency": "usd", "starting_balance": 0, "ending_balance": null, "next_payment_attempt": null, "charge": null, "discount": null, "application_fee": null } post: description: | Until an invoice is paid, it is marked as open (closed=false). If you'd like to stop Stripe from automatically attempting payment on an invoice or would simply like to close the invoice out as no longer owed by the customer, you can update the closed parameter. body: application/x-www-form-urlencoded: formParameters: application_fee: description: | A fee in cents that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key in order to take an application fee. For more information, see the application fees documentation. type: integer closed: description: | Boolean representing whether an invoice is closed or not. To close an invoice, pass true. type: string responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "amount_due": { "type":"number", "id": "http://jsonschema.net/amount_due", "required":false }, "application_fee": { "type":"null", "id": "http://jsonschema.net/application_fee", "required":false }, "attempt_count": { "type":"number", "id": "http://jsonschema.net/attempt_count", "required":false }, "attempted": { "type":"boolean", "id": "http://jsonschema.net/attempted", "required":false }, "charge": { "type":"null", "id": "http://jsonschema.net/charge", "required":false }, "closed": { "type":"boolean", "id": "http://jsonschema.net/closed", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "customer": { "type":"string", "id": "http://jsonschema.net/customer", "required":false }, "date": { "type":"number", "id": "http://jsonschema.net/date", "required":false }, "discount": { "type":"null", "id": "http://jsonschema.net/discount", "required":false }, "ending_balance": { "type":"null", "id": "http://jsonschema.net/ending_balance", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "lines": { "type":"object", "id": "http://jsonschema.net/lines", "required":false, "properties":{ "count": { "type":"number", "id": "http://jsonschema.net/lines/count", "required":false }, "data": { "type":"array", "id": "http://jsonschema.net/lines/data", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/lines/data/0", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/lines/data/0/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/lines/data/0/currency", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/lines/data/0/description", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/lines/data/0/id", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/lines/data/0/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/lines/data/0/object", "required":false }, "period": { "type":"object", "id": "http://jsonschema.net/lines/data/0/period", "required":false, "properties":{ "end": { "type":"number", "id": "http://jsonschema.net/lines/data/0/period/end", "required":false }, "start": { "type":"number", "id": "http://jsonschema.net/lines/data/0/period/start", "required":false } } }, "plan": { "type":"object", "id": "http://jsonschema.net/lines/data/0/plan", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/lines/data/0/plan/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/currency", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/id", "required":false }, "interval_count": { "type":"number", "id": "http://jsonschema.net/lines/data/0/plan/interval_count", "required":false }, "interval": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/interval", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/lines/data/0/plan/livemode", "required":false }, "name": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/object", "required":false }, "trial_period_days": { "type":"null", "id": "http://jsonschema.net/lines/data/0/plan/trial_period_days", "required":false } } }, "proration": { "type":"boolean", "id": "http://jsonschema.net/lines/data/0/proration", "required":false }, "quantity": { "type":"number", "id": "http://jsonschema.net/lines/data/0/quantity", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/lines/data/0/type", "required":false } } } }, "object": { "type":"string", "id": "http://jsonschema.net/lines/object", "required":false }, "url": { "type":"string", "id": "http://jsonschema.net/lines/url", "required":false } } }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "next_payment_attempt": { "type":"null", "id": "http://jsonschema.net/next_payment_attempt", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "paid": { "type":"boolean", "id": "http://jsonschema.net/paid", "required":false }, "period_end": { "type":"number", "id": "http://jsonschema.net/period_end", "required":false }, "period_start": { "type":"number", "id": "http://jsonschema.net/period_start", "required":false }, "starting_balance": { "type":"number", "id": "http://jsonschema.net/starting_balance", "required":false }, "subtotal": { "type":"number", "id": "http://jsonschema.net/subtotal", "required":false }, "total": { "type":"number", "id": "http://jsonschema.net/total", "required":false } } } example: | { "date": 1381134043, "id": "in_2hzEcE91Q3iHBb", "period_start": 1381134043, "period_end": 1381134043, "lines": { "data": [ { "id": "su_2i0bDIlnaMV0Vq", "object": "line_item", "type": "subscription", "livemode": true, "amount": 100, "currency": "usd", "proration": false, "period": { "start": 1383817571, "end": 1386409571 }, "quantity": 1, "plan": { "interval": "month", "name": "Java Bindings Plan", "amount": 100, "currency": "usd", "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", "object": "plan", "livemode": false, "interval_count": 1, "trial_period_days": null }, "description": null } ], "count": 1, "object": "list", "url": "/v1/invoices/in_2hzEcE91Q3iHBb/lines" }, "subtotal": 0, "total": 0, "customer": "cus_2hzElrZhmfV9my", "object": "invoice", "attempted": true, "closed": true, "paid": true, "livemode": false, "attempt_count": 0, "amount_due": 0, "currency": "usd", "starting_balance": 0, "ending_balance": null, "next_payment_attempt": null, "charge": null, "discount": null, "application_fee": null } # Lines /lines: type: baseResource get: description: | When retrieving an invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. queryParameters: id: description: | The id of the invoice containing the lines to be retrieved type: string required: true count: description: | A limit on the number of objects to be returned. Count can range between 1 and 100 items. type: integer minimum: 1 maximum: 100 default: 10 customer: description: | In the case of upcoming invoices, the customer of the upcoming invoice is required. In other cases it is ignored. type: string offset: description: | An offset into the list of returned items. The API will return the requested number of items starting at that offset. type: integer responses: 200: body: schema: | { "type": "object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required": false, "properties": { "count": { "type": "number", "id": "http://jsonschema.net/count", "required": false }, "data": { "type": "array", "id": "http://jsonschema.net/data", "required": false, "items": { "type": "object", "id": "http://jsonschema.net", "required": false, "properties": { "amount": { "type": "number", "id": "http://jsonschema.net/amount", "required": false }, "currency": { "type": "string", "id": "http://jsonschema.net/currency", "required": false }, "description": { "type": "string", "id": "http://jsonschema.net/description", "required": false }, "id": { "type": "string", "id": "http://jsonschema.net/id", "required": false }, "livemode": { "type": "boolean", "id": "http://jsonschema.net/livemode", "required": false }, "object": { "type": "string", "id": "http://jsonschema.net/object", "required": false }, "period": { "type": "object", "id": "http://jsonschema.net/period", "required": false, "properties": { "end": { "type": "number", "id": "http://jsonschema.net/period/end", "required": false }, "start": { "type": "number", "id": "http://jsonschema.net/period/start", "required": false } } }, "plan": { "type": "null", "id": "http://jsonschema.net/plan", "required": false }, "proration": { "type": "boolean", "id": "http://jsonschema.net/proration", "required": false }, "quantity": { "type": "null", "id": "http://jsonschema.net/quantity", "required": false }, "type": { "type": "string", "id": "http://jsonschema.net/type", "required": false } } } } } } example: | { "object": "list", "url": "/v1/invoices/in_2hzEcE91Q3iHBb/lines", "count": 1, "data": [ { "id": "ii_2Xovytvup4IajJ", "object": "line_item", "type": "invoiceitem", "livemode": false, "amount": 1, "currency": "usd", "proration": true, "period": { "start": 1378789336, "end": 1378789336 }, "quantity": null, "plan": null, "description": "Remaining time on Prep Plan 2 after 10 Sep 2013" } ] } # Pay /pay: type: baseResource post: description: | Stripe automatically creates and then attempts to pay invoices for customers on subscriptions. We'll also retry unpaid invoices according to your retry settings. However, if you'd like to attempt to collect payment on an invoice out of the normal retry schedule or for some other reason, you can do so. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "amount_due": { "type":"number", "id": "http://jsonschema.net/amount_due", "required":false }, "application_fee": { "type":"null", "id": "http://jsonschema.net/application_fee", "required":false }, "attempt_count": { "type":"number", "id": "http://jsonschema.net/attempt_count", "required":false }, "attempted": { "type":"boolean", "id": "http://jsonschema.net/attempted", "required":false }, "charge": { "type":"null", "id": "http://jsonschema.net/charge", "required":false }, "closed": { "type":"boolean", "id": "http://jsonschema.net/closed", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "customer": { "type":"string", "id": "http://jsonschema.net/customer", "required":false }, "date": { "type":"number", "id": "http://jsonschema.net/date", "required":false }, "discount": { "type":"null", "id": "http://jsonschema.net/discount", "required":false }, "ending_balance": { "type":"null", "id": "http://jsonschema.net/ending_balance", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "lines": { "type":"object", "id": "http://jsonschema.net/lines", "required":false, "properties":{ "count": { "type":"number", "id": "http://jsonschema.net/lines/count", "required":false }, "data": { "type":"array", "id": "http://jsonschema.net/lines/data", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/lines/data/0", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/lines/data/0/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/lines/data/0/currency", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/lines/data/0/description", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/lines/data/0/id", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/lines/data/0/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/lines/data/0/object", "required":false }, "period": { "type":"object", "id": "http://jsonschema.net/lines/data/0/period", "required":false, "properties":{ "end": { "type":"number", "id": "http://jsonschema.net/lines/data/0/period/end", "required":false }, "start": { "type":"number", "id": "http://jsonschema.net/lines/data/0/period/start", "required":false } } }, "plan": { "type":"object", "id": "http://jsonschema.net/lines/data/0/plan", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/lines/data/0/plan/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/currency", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/id", "required":false }, "interval_count": { "type":"number", "id": "http://jsonschema.net/lines/data/0/plan/interval_count", "required":false }, "interval": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/interval", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/lines/data/0/plan/livemode", "required":false }, "name": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/object", "required":false }, "trial_period_days": { "type":"null", "id": "http://jsonschema.net/lines/data/0/plan/trial_period_days", "required":false } } }, "proration": { "type":"boolean", "id": "http://jsonschema.net/lines/data/0/proration", "required":false }, "quantity": { "type":"number", "id": "http://jsonschema.net/lines/data/0/quantity", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/lines/data/0/type", "required":false } } } }, "object": { "type":"string", "id": "http://jsonschema.net/lines/object", "required":false }, "url": { "type":"string", "id": "http://jsonschema.net/lines/url", "required":false } } }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "next_payment_attempt": { "type":"null", "id": "http://jsonschema.net/next_payment_attempt", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "paid": { "type":"boolean", "id": "http://jsonschema.net/paid", "required":false }, "period_end": { "type":"number", "id": "http://jsonschema.net/period_end", "required":false }, "period_start": { "type":"number", "id": "http://jsonschema.net/period_start", "required":false }, "starting_balance": { "type":"number", "id": "http://jsonschema.net/starting_balance", "required":false }, "subtotal": { "type":"number", "id": "http://jsonschema.net/subtotal", "required":false }, "total": { "type":"number", "id": "http://jsonschema.net/total", "required":false } } } example: | { "date": 1381134043, "id": "in_2hzEcE91Q3iHBb", "period_start": 1381134043, "period_end": 1381134043, "lines": { "data": [ { "id": "su_2i0bDIlnaMV0Vq", "object": "line_item", "type": "subscription", "livemode": true, "amount": 100, "currency": "usd", "proration": false, "period": { "start": 1383817571, "end": 1386409571 }, "quantity": 1, "plan": { "interval": "month", "name": "Java Bindings Plan", "amount": 100, "currency": "usd", "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", "object": "plan", "livemode": false, "interval_count": 1, "trial_period_days": null }, "description": null } ], "count": 1, "object": "list", "url": "/v1/invoices/in_2hzEcE91Q3iHBb/lines" }, "subtotal": 0, "total": 0, "customer": "cus_2hzElrZhmfV9my", "object": "invoice", "attempted": true, "closed": true, "paid": true, "livemode": false, "attempt_count": 0, "amount_due": 0, "currency": "usd", "starting_balance": 0, "ending_balance": null, "next_payment_attempt": null, "charge": null, "discount": null, "application_fee": null } /upcoming: type: baseResource get: description: | At any time, you can view the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discount that is applicable to the customer. queryParameters: customer: description: | The identifier of the customer whose upcoming invoice you'd like to retrieve. type: string required: true responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "amount_due": { "type":"number", "id": "http://jsonschema.net/amount_due", "required":false }, "application_fee": { "type":"null", "id": "http://jsonschema.net/application_fee", "required":false }, "attempt_count": { "type":"number", "id": "http://jsonschema.net/attempt_count", "required":false }, "attempted": { "type":"boolean", "id": "http://jsonschema.net/attempted", "required":false }, "charge": { "type":"null", "id": "http://jsonschema.net/charge", "required":false }, "closed": { "type":"boolean", "id": "http://jsonschema.net/closed", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "customer": { "type":"string", "id": "http://jsonschema.net/customer", "required":false }, "date": { "type":"number", "id": "http://jsonschema.net/date", "required":false }, "discount": { "type":"null", "id": "http://jsonschema.net/discount", "required":false }, "ending_balance": { "type":"null", "id": "http://jsonschema.net/ending_balance", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "lines": { "type":"object", "id": "http://jsonschema.net/lines", "required":false, "properties":{ "count": { "type":"number", "id": "http://jsonschema.net/lines/count", "required":false }, "data": { "type":"array", "id": "http://jsonschema.net/lines/data", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/lines/data/0", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/lines/data/0/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/lines/data/0/currency", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/lines/data/0/description", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/lines/data/0/id", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/lines/data/0/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/lines/data/0/object", "required":false }, "period": { "type":"object", "id": "http://jsonschema.net/lines/data/0/period", "required":false, "properties":{ "end": { "type":"number", "id": "http://jsonschema.net/lines/data/0/period/end", "required":false }, "start": { "type":"number", "id": "http://jsonschema.net/lines/data/0/period/start", "required":false } } }, "plan": { "type":"object", "id": "http://jsonschema.net/lines/data/0/plan", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/lines/data/0/plan/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/currency", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/id", "required":false }, "interval_count": { "type":"number", "id": "http://jsonschema.net/lines/data/0/plan/interval_count", "required":false }, "interval": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/interval", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/lines/data/0/plan/livemode", "required":false }, "name": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/lines/data/0/plan/object", "required":false }, "trial_period_days": { "type":"null", "id": "http://jsonschema.net/lines/data/0/plan/trial_period_days", "required":false } } }, "proration": { "type":"boolean", "id": "http://jsonschema.net/lines/data/0/proration", "required":false }, "quantity": { "type":"number", "id": "http://jsonschema.net/lines/data/0/quantity", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/lines/data/0/type", "required":false } } } }, "object": { "type":"string", "id": "http://jsonschema.net/lines/object", "required":false }, "url": { "type":"string", "id": "http://jsonschema.net/lines/url", "required":false } } }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "next_payment_attempt": { "type":"null", "id": "http://jsonschema.net/next_payment_attempt", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "paid": { "type":"boolean", "id": "http://jsonschema.net/paid", "required":false }, "period_end": { "type":"number", "id": "http://jsonschema.net/period_end", "required":false }, "period_start": { "type":"number", "id": "http://jsonschema.net/period_start", "required":false }, "starting_balance": { "type":"number", "id": "http://jsonschema.net/starting_balance", "required":false }, "subtotal": { "type":"number", "id": "http://jsonschema.net/subtotal", "required":false }, "total": { "type":"number", "id": "http://jsonschema.net/total", "required":false } } } example: | { "date": 1381134043, "id": "in_2hzEcE91Q3iHBb", "period_start": 1381134043, "period_end": 1381134043, "lines": { "data": [ { "id": "su_2i0bDIlnaMV0Vq", "object": "line_item", "type": "subscription", "livemode": true, "amount": 100, "currency": "usd", "proration": false, "period": { "start": 1383817571, "end": 1386409571 }, "quantity": 1, "plan": { "interval": "month", "name": "Java Bindings Plan", "amount": 100, "currency": "usd", "id": "JAVA-PLAN-dbfd01a0-c28c-421d-8ae9-5a999575fa1b", "object": "plan", "livemode": false, "interval_count": 1, "trial_period_days": null }, "description": null } ], "count": 1, "object": "list", "url": "/v1/invoices/in_2hzEcE91Q3iHBb/lines" }, "subtotal": 0, "total": 0, "customer": "cus_2hzElrZhmfV9my", "object": "invoice", "attempted": true, "closed": true, "paid": true, "livemode": false, "attempt_count": 0, "amount_due": 0, "currency": "usd", "starting_balance": 0, "ending_balance": null, "next_payment_attempt": null, "charge": null, "discount": null, "application_fee": null } /invoiceitems: type: baseResource post: description: | Adds an arbitrary charge or credit to the customer's upcoming invoice. body: application/x-www-form-urlencoded: formParameters: customer: description: | The ID of the customer who will be billed when this invoice item is billed. type: string required: true amount: description: | The integer amount in cents of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. type: integer required: true currency: description: 3-letter ISO code for currency. type: string minLength: 3 maxLength: 3 required: true invoice: description: | The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. Use this when adding invoice items in response to an invoice.created webhook. You cannot add an invoice item to an invoice that has already been paid or closed. type: string description: description: | An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. type: string default: null responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "customer": { "type":"string", "id": "http://jsonschema.net/customer", "required":false }, "date": { "type":"number", "id": "http://jsonschema.net/date", "required":false }, "description": { "type":"string", "id": "http://jsonschema.net/description", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "invoice": { "type":"null", "id": "http://jsonschema.net/invoice", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "proration": { "type":"boolean", "id": "http://jsonschema.net/proration", "required":false } } } example: | { "object": "invoiceitem", "id": "ii_2Xovytvup4IajJ", "date": 1378789336, "amount": 0, "livemode": false, "proration": true, "currency": "usd", "customer": "cus_2hzElrZhmfV9my", "description": "Remaining time on Prep Plan 2 after 10 Sep 2013", "invoice": null } get: description: | Returns a list of your invoice items. Invoice Items are returned sorted by creation date, with the most recently created invoice items appearing first. queryParameters: count: description: | A limit on the number of objects to be returned. Count can range between 1 and 100 items. type: integer minimum: 1 maximum: 100 created: description: | A filter on the list based on the object created field. The value can be a string with an exact UTC timestamp, or it can be a dictionary with the following options: **gt**: optional Return values where the created field is after this timestamp. **gte**: optional Return values where the created field is after or equal to this timestamp. **lt**: optional Return values where the created field is before this timestamp. **lte**: optional Return values where the created field is before or equal to this timestamp. **customer**: optional The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. **offset**: optional default is 0 An offset into the list of returned items. The API will return the requested number of items starting at that offset. type: string customer: description: | The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. type: string offset: description: | An offset into the list of returned items. The API will return the requested number of items starting at that offset. type: integer default: 0 responses: 200: body: schema: | { "type": "object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required": false, "properties": { "count": { "type": "number", "id": "http://jsonschema.net/count", "required": false }, "data": { "type": "array", "id": "http://jsonschema.net/data", "required": false, "items": { "type": "object", "id": "http://jsonschema.net", "required": false, "properties": { "amount": { "type": "number", "id": "http://jsonschema.net/amount", "required": false }, "currency": { "type": "string", "id": "http://jsonschema.net/currency", "required": false }, "customer": { "type": "string", "id": "http://jsonschema.net/customer", "required": false }, "date": { "type": "number", "id": "http://jsonschema.net/date", "required": false }, "description": { "type": "string", "id": "http://jsonschema.net/description", "required": false }, "id": { "type": "string", "id": "http://jsonschema.net/id", "required": false }, "invoice": { "type": "null", "id": "http://jsonschema.net/invoice", "required": false }, "livemode": { "type": "boolean", "id": "http://jsonschema.net/livemode", "required": false }, "object": { "type": "string", "id": "http://jsonschema.net/object", "required": false }, "proration": { "type": "boolean", "id": "http://jsonschema.net/proration", "required": false } } } } } } example: | { "object": "list", "url": "/v1/invoiceitems", "count": 1, "data": [ { "object": "invoiceitem", "id": "ii_2Xovytvup4IajJ", "date": 1378789336, "amount": 0, "livemode": false, "proration": true, "currency": "usd", "customer": "cus_2hzElrZhmfV9my", "description": "Remaining time on Prep Plan 2 after 10 Sep 2013", "invoice": null } ] } /{ID}: type: baseResource uriParameters: ID: description: The identifier of the invoice item. type: string get: description: Retrieves the invoice item with the given ID. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "customer": { "type":"string", "id": "http://jsonschema.net/customer", "required":false }, "date": { "type":"number", "id": "http://jsonschema.net/date", "required":false }, "description": { "type":"string", "id": "http://jsonschema.net/description", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "invoice": { "type":"null", "id": "http://jsonschema.net/invoice", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "proration": { "type":"boolean", "id": "http://jsonschema.net/proration", "required":false } } } example: | { "object": "invoiceitem", "id": "ii_2Xovytvup4IajJ", "date": 1378789336, "amount": 0, "livemode": false, "proration": true, "currency": "usd", "customer": "cus_2hzElrZhmfV9my", "description": "Remaining time on Prep Plan 2 after 10 Sep 2013", "invoice": null } delete: description: | Removes an invoice item from the upcoming invoice. Removing an invoice item is only possible before the invoice it's attached to is closed. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "deleted": { "type":"boolean", "id": "http://jsonschema.net/deleted", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false } } } example: | { "id": "cu_2W2fo9IOza32fP", "deleted": true } /transfers: type: baseResource post: description: | To send funds from your Stripe account to a third-party bank account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you'll receive an "Insufficient Funds" error. If your API key is in test mode, money won't actually be sent, though everything else will occur as if in live mode. body: application/x-www-form-urlencoded: formParameters: amount: description: | A positive integer in cents representing how much to transfer. type: integer required: true currency: description: 3-letter ISO code for currency. type: string maxLength: 3 minLength: 3 required: true recipient: description: | The ID of an existing, verified recipient that the money will be transferred to in this request. If self, the money will be transferred to the bank account associated with your account. type: string required: true description: description: | An arbitrary string which you can attach to a transfer object. It is displayed when in the web interface alongside the transfer. type: string default: null statement_descriptor: description: | An arbitrary string which will be displayed on the recipient's bank statement. This should not include your company name, as that will already be part of the descriptor. The maximum length of this string is 15 characters; longer strings will be truncated. For example, if your website is EXAMPLE.COM and you pass in `INVOICE 1234`, the user will see `EXAMPLE.COM INVOICE 1234`. Note: While most banks display this information consistently, some may display it incorrectly or not at all. type: string default: null responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "account": { "type":"null", "id": "http://jsonschema.net/account", "required":false }, "amount": { "type":"number", "id": "http://jsonschema.net/amount", "required":false }, "balance_transaction": { "type":"string", "id": "http://jsonschema.net/balance_transaction", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "date": { "type":"number", "id": "http://jsonschema.net/date", "required":false }, "description": { "type":"string", "id": "http://jsonschema.net/description", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "metadata": { "type":"object", "id": "http://jsonschema.net/metadata", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "other_transfers": { "type":"array", "id": "http://jsonschema.net/other_transfers", "required":false, "items": { "type":"string", "id": "http://jsonschema.net/other_transfers/0", "required":false } }, "recipient": { "type":"null", "id": "http://jsonschema.net/recipient", "required":false }, "statement_descriptor": { "type":"null", "id": "http://jsonschema.net/statement_descriptor", "required":false }, "status": { "type":"string", "id": "http://jsonschema.net/status", "required":false }, "summary": { "type":"object", "id": "http://jsonschema.net/summary", "required":false, "properties":{ "adjustment_count": { "type":"number", "id": "http://jsonschema.net/summary/adjustment_count", "required":false }, "adjustment_fee_details": { "type":"array", "id": "http://jsonschema.net/summary/adjustment_fee_details", "required":false }, "adjustment_fees": { "type":"number", "id": "http://jsonschema.net/summary/adjustment_fees", "required":false }, "adjustment_gross": { "type":"number", "id": "http://jsonschema.net/summary/adjustment_gross", "required":false }, "charge_count": { "type":"number", "id": "http://jsonschema.net/summary/charge_count", "required":false }, "charge_fee_details": { "type":"array", "id": "http://jsonschema.net/summary/charge_fee_details", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/summary/charge_fee_details/0", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/summary/charge_fee_details/0/amount", "required":false }, "application": { "type":"null", "id": "http://jsonschema.net/summary/charge_fee_details/0/application", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/summary/charge_fee_details/0/currency", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/summary/charge_fee_details/0/description", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/summary/charge_fee_details/0/type", "required":false } } } }, "charge_fees": { "type":"number", "id": "http://jsonschema.net/summary/charge_fees", "required":false }, "charge_gross": { "type":"number", "id": "http://jsonschema.net/summary/charge_gross", "required":false }, "collected_fee_count": { "type":"number", "id": "http://jsonschema.net/summary/collected_fee_count", "required":false }, "collected_fee_gross": { "type":"number", "id": "http://jsonschema.net/summary/collected_fee_gross", "required":false }, "collected_fee_refund_count": { "type":"number", "id": "http://jsonschema.net/summary/collected_fee_refund_count", "required":false }, "collected_fee_refund_gross": { "type":"number", "id": "http://jsonschema.net/summary/collected_fee_refund_gross", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/summary/currency", "required":false }, "net": { "type":"number", "id": "http://jsonschema.net/summary/net", "required":false }, "refund_count": { "type":"number", "id": "http://jsonschema.net/summary/refund_count", "required":false }, "refund_fee_details": { "type":"array", "id": "http://jsonschema.net/summary/refund_fee_details", "required":false }, "refund_fees": { "type":"number", "id": "http://jsonschema.net/summary/refund_fees", "required":false }, "refund_gross": { "type":"number", "id": "http://jsonschema.net/summary/refund_gross", "required":false }, "validation_count": { "type":"number", "id": "http://jsonschema.net/summary/validation_count", "required":false }, "validation_fees": { "type":"number", "id": "http://jsonschema.net/summary/validation_fees", "required":false } } }, "transactions": { "type":"object", "id": "http://jsonschema.net/transactions", "required":false, "properties":{ "count": { "type":"number", "id": "http://jsonschema.net/transactions/count", "required":false }, "data": { "type":"array", "id": "http://jsonschema.net/transactions/data", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/transactions/data/0", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/transactions/data/0/amount", "required":false }, "created": { "type":"number", "id": "http://jsonschema.net/transactions/data/0/created", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/transactions/data/0/currency", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/transactions/data/0/description", "required":false }, "fee_details": { "type":"array", "id": "http://jsonschema.net/transactions/data/0/fee_details", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/transactions/data/0/fee_details/0", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/transactions/data/0/fee_details/0/amount", "required":false }, "application": { "type":"null", "id": "http://jsonschema.net/transactions/data/0/fee_details/0/application", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/transactions/data/0/fee_details/0/currency", "required":false }, "description": { "type":"string", "id": "http://jsonschema.net/transactions/data/0/fee_details/0/description", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/transactions/data/0/fee_details/0/type", "required":false } } } }, "fee": { "type":"number", "id": "http://jsonschema.net/transactions/data/0/fee", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/transactions/data/0/id", "required":false }, "net": { "type":"number", "id": "http://jsonschema.net/transactions/data/0/net", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/transactions/data/0/type", "required":false } } } }, "object": { "type":"string", "id": "http://jsonschema.net/transactions/object", "required":false }, "url": { "type":"string", "id": "http://jsonschema.net/transactions/url", "required":false } } } } } example: | { "id": "tr_2OKKQ4A6HN1WJy", "object": "transfer", "date": 1376524800, "livemode": false, "amount": 286710, "currency": "usd", "status": "paid", "balance_transaction": "txn_2hrAStwRKjXiIp", "summary": { "charge_gross": 316670, "charge_fees": 29960, "charge_fee_details": [ { "amount": 29960, "currency": "usd", "type": "stripe_fee", "description": null, "application": null } ], "refund_gross": 0, "refund_fees": 0, "refund_fee_details": [ ], "adjustment_gross": 0, "adjustment_fees": 0, "adjustment_fee_details": [ ], "validation_fees": 0, "validation_count": 0, "charge_count": 682, "refund_count": 0, "adjustment_count": 0, "net": 286710, "currency": "usd", "collected_fee_gross": 0, "collected_fee_count": 0, "collected_fee_refund_gross": 0, "collected_fee_refund_count": 0 }, "transactions": { "object": "list", "count": 682, "url": "/v1/transfers/tr_2OKKQ4A6HN1WJy/transactions", "data": [ { "id": "ch_2Nn7UTSkz0cxq9", "type": "charge", "amount": 500, "currency": "usd", "net": 455, "created": 1376476192, "description": null, "fee": 45, "fee_details": [ { "amount": 45, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ] }, { "id": "ch_2Nn8hBMCCN0b1r", "type": "charge", "amount": 500, "currency": "usd", "net": 455, "created": 1376476252, "description": null, "fee": 45, "fee_details": [ { "amount": 45, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ] }, { "id": "ch_2Nn9rrWLlKk7Mj", "type": "charge", "amount": 500, "currency": "usd", "net": 455, "created": 1376476312, "description": null, "fee": 45, "fee_details": [ { "amount": 45, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ] }, { "id": "ch_2Nn9z9LTfcoJvW", "type": "charge", "amount": 100, "currency": "usd", "net": 67, "created": 1376476323, "description": null, "fee": 33, "fee_details": [ { "amount": 33, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ] }, { "id": "ch_2Nn9jymNURQqY5", "type": "charge", "amount": 100, "currency": "usd", "net": 67, "created": 1376476323, "description": null, "fee": 33, "fee_details": [ { "amount": 33, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ] } ] }, "other_transfers": [ "tr_2OKKQ4A6HN1WJy" ], "account": null, "description": "STRIPE TRANSFER", "metadata": { }, "statement_descriptor": null, "recipient": null } get: description: | Returns a list of existing transfers sent to third-party bank accounts or that Stripe has sent you. The transfers are returned in sorted order, with the most recent transfers appearing first. queryParameters: count: description: | A limit on the number of objects to be returned. Count can range between 1 and 100 items. type: integer minimum: 1 maximum: 100 date: description: | A filter on the list based on the object date field. The value can be a string with an exact UTC timestamp, or it can be a dictionary with the following options: **gt**: optional Return values where the date field is after this timestamp. **gte**: optional Return values where the date field is after or equal to this timestamp. **lt**: optional Return values where the date field is before this timestamp. **lte**: optional Return values where the date field is before or equal to this timestamp. type: string offset: description: | An offset into the list of returned items. The API will return the requested number of items starting at that offset. type: integer default: 0 recipient: description: | Only return transfers for the recipient specified by this recipient ID. type: string status: description: | Only return transfers that have the given status: pending, paid, or failed. enum: [ pending, paid, failed ] responses: 200: body: schema: | { "type": "object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required": false, "properties": { "count": { "type": "number", "id": "http://jsonschema.net/count", "required": false }, "data": { "type": "array", "id": "http://jsonschema.net/data", "required": false, "items": { "type": "object", "id": "http://jsonschema.net", "required": false, "properties": { "account": { "type": "null", "id": "http://jsonschema.net/account", "required": false }, "amount": { "type": "number", "id": "http://jsonschema.net/amount", "required": false }, "balance_transaction": { "type": "string", "id": "http://jsonschema.net/balance_transaction", "required": false }, "currency": { "type": "string", "id": "http://jsonschema.net/currency", "required": false }, "date": { "type": "number", "id": "http://jsonschema.net/date", "required": false }, "description": { "type": "string", "id": "http://jsonschema.net/description", "required": false }, "id": { "type": "string", "id": "http://jsonschema.net/id", "required": false }, "livemode": { "type": "boolean", "id": "http://jsonschema.net/livemode", "required": false }, "metadata": { "type": "object", "id": "http://jsonschema.net/metadata", "required": false }, "object": { "type": "string", "id": "http://jsonschema.net/object", "required": false }, "other_transfers": { "type": "array", "id": "http://jsonschema.net/other_transfers", "required": false, "items": { "type": "string", "id": "http://jsonschema.net/other_transfers/0", "required": false } }, "recipient": { "type": "null", "id": "http://jsonschema.net/recipient", "required": false }, "statement_descriptor": { "type": "null", "id": "http://jsonschema.net/statement_descriptor", "required": false }, "status": { "type": "string", "id": "http://jsonschema.net/status", "required": false }, "summary": { "type": "object", "id": "http://jsonschema.net/summary", "required": false, "properties": { "adjustment_count": { "type": "number", "id": "http://jsonschema.net/summary/adjustment_count", "required": false }, "adjustment_fee_details": { "type": "array", "id": "http://jsonschema.net/summary/adjustment_fee_details", "required": false }, "adjustment_fees": { "type": "number", "id": "http://jsonschema.net/summary/adjustment_fees", "required": false }, "adjustment_gross": { "type": "number", "id": "http://jsonschema.net/summary/adjustment_gross", "required": false }, "charge_count": { "type": "number", "id": "http://jsonschema.net/summary/charge_count", "required": false }, "charge_fee_details": { "type": "array", "id": "http://jsonschema.net/summary/charge_fee_details", "required": false, "items": { "type": "object", "id": "http://jsonschema.net/summary/charge_fee_details/0", "required": false, "properties": { "amount": { "type": "number", "id": "http://jsonschema.net/summary/charge_fee_details/0/amount", "required": false }, "application": { "type": "null", "id": "http://jsonschema.net/summary/charge_fee_details/0/application", "required": false }, "currency": { "type": "string", "id": "http://jsonschema.net/summary/charge_fee_details/0/currency", "required": false }, "description": { "type": "null", "id": "http://jsonschema.net/summary/charge_fee_details/0/description", "required": false }, "type": { "type": "string", "id": "http://jsonschema.net/summary/charge_fee_details/0/type", "required": false } } } }, "charge_fees": { "type": "number", "id": "http://jsonschema.net/summary/charge_fees", "required": false }, "charge_gross": { "type": "number", "id": "http://jsonschema.net/summary/charge_gross", "required": false }, "collected_fee_count": { "type": "number", "id": "http://jsonschema.net/summary/collected_fee_count", "required": false }, "collected_fee_gross": { "type": "number", "id": "http://jsonschema.net/summary/collected_fee_gross", "required": false }, "collected_fee_refund_count": { "type": "number", "id": "http://jsonschema.net/summary/collected_fee_refund_count", "required": false }, "collected_fee_refund_gross": { "type": "number", "id": "http://jsonschema.net/summary/collected_fee_refund_gross", "required": false }, "currency": { "type": "string", "id": "http://jsonschema.net/summary/currency", "required": false }, "net": { "type": "number", "id": "http://jsonschema.net/summary/net", "required": false }, "refund_count": { "type": "number", "id": "http://jsonschema.net/summary/refund_count", "required": false }, "refund_fee_details": { "type": "array", "id": "http://jsonschema.net/summary/refund_fee_details", "required": false }, "refund_fees": { "type": "number", "id": "http://jsonschema.net/summary/refund_fees", "required": false }, "refund_gross": { "type": "number", "id": "http://jsonschema.net/summary/refund_gross", "required": false }, "validation_count": { "type": "number", "id": "http://jsonschema.net/summary/validation_count", "required": false }, "validation_fees": { "type": "number", "id": "http://jsonschema.net/summary/validation_fees", "required": false } } }, "transactions": { "type": "object", "id": "http://jsonschema.net/transactions", "required": false, "properties": { "count": { "type": "number", "id": "http://jsonschema.net/transactions/count", "required": false }, "data": { "type": "array", "id": "http://jsonschema.net/transactions/data", "required": false, "items": { "type": "object", "id": "http://jsonschema.net/transactions/data/0", "required": false, "properties": { "amount": { "type": "number", "id": "http://jsonschema.net/transactions/data/0/amount", "required": false }, "created": { "type": "number", "id": "http://jsonschema.net/transactions/data/0/created", "required": false }, "currency": { "type": "string", "id": "http://jsonschema.net/transactions/data/0/currency", "required": false }, "description": { "type": "null", "id": "http://jsonschema.net/transactions/data/0/description", "required": false }, "fee_details": { "type": "array", "id": "http://jsonschema.net/transactions/data/0/fee_details", "required": false, "items": { "type": "object", "id": "http://jsonschema.net/transactions/data/0/fee_details/0", "required": false, "properties": { "amount": { "type": "number", "id": "http://jsonschema.net/transactions/data/0/fee_details/0/amount", "required": false }, "application": { "type": "null", "id": "http://jsonschema.net/transactions/data/0/fee_details/0/application", "required": false }, "currency": { "type": "string", "id": "http://jsonschema.net/transactions/data/0/fee_details/0/currency", "required": false }, "description": { "type": "string", "id": "http://jsonschema.net/transactions/data/0/fee_details/0/description", "required": false }, "type": { "type": "string", "id": "http://jsonschema.net/transactions/data/0/fee_details/0/type", "required": false } } } }, "fee": { "type": "number", "id": "http://jsonschema.net/transactions/data/0/fee", "required": false }, "id": { "type": "string", "id": "http://jsonschema.net/transactions/data/0/id", "required": false }, "net": { "type": "number", "id": "http://jsonschema.net/transactions/data/0/net", "required": false }, "type": { "type": "string", "id": "http://jsonschema.net/transactions/data/0/type", "required": false } } } }, "object": { "type": "string", "id": "http://jsonschema.net/transactions/object", "required": false }, "url": { "type": "string", "id": "http://jsonschema.net/transactions/url", "required": false } } } } } } } } example: | { "object": "list", "url": "/v1/transfers", "count": 1, "data": [ { "id": "tr_2OKKQ4A6HN1WJy", "object": "transfer", "date": 1376524800, "livemode": false, "amount": 286710, "currency": "usd", "status": "paid", "balance_transaction": "txn_2hrAStwRKjXiIp", "summary": { "charge_gross": 316670, "charge_fees": 29960, "charge_fee_details": [ { "amount": 29960, "currency": "usd", "type": "stripe_fee", "description": null, "application": null } ], "refund_gross": 0, "refund_fees": 0, "refund_fee_details": [ ], "adjustment_gross": 0, "adjustment_fees": 0, "adjustment_fee_details": [ ], "validation_fees": 0, "validation_count": 0, "charge_count": 682, "refund_count": 0, "adjustment_count": 0, "net": 286710, "currency": "usd", "collected_fee_gross": 0, "collected_fee_count": 0, "collected_fee_refund_gross": 0, "collected_fee_refund_count": 0 }, "transactions": { "object": "list", "count": 682, "url": "/v1/transfers/tr_2OKKQ4A6HN1WJy/transactions", "data": [ { "id": "ch_2Nn7UTSkz0cxq9", "type": "charge", "amount": 500, "currency": "usd", "net": 455, "created": 1376476192, "description": null, "fee": 45, "fee_details": [ { "amount": 45, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ] }, { "id": "ch_2Nn8hBMCCN0b1r", "type": "charge", "amount": 500, "currency": "usd", "net": 455, "created": 1376476252, "description": null, "fee": 45, "fee_details": [ { "amount": 45, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ] }, { "id": "ch_2Nn9rrWLlKk7Mj", "type": "charge", "amount": 500, "currency": "usd", "net": 455, "created": 1376476312, "description": null, "fee": 45, "fee_details": [ { "amount": 45, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ] }, { "id": "ch_2Nn9z9LTfcoJvW", "type": "charge", "amount": 100, "currency": "usd", "net": 67, "created": 1376476323, "description": null, "fee": 33, "fee_details": [ { "amount": 33, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ] }, { "id": "ch_2Nn9jymNURQqY5", "type": "charge", "amount": 100, "currency": "usd", "net": 67, "created": 1376476323, "description": null, "fee": 33, "fee_details": [ { "amount": 33, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ] } ] }, "other_transfers": [ "tr_2OKKQ4A6HN1WJy" ], "account": null, "description": "STRIPE TRANSFER", "metadata": { }, "statement_descriptor": null, "recipient": null } ] } /{transfer_ID}: type: baseResource uriParameters: transfer_ID: description: The identifier of the transfer. get: description: | Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "account": { "type":"null", "id": "http://jsonschema.net/account", "required":false }, "amount": { "type":"number", "id": "http://jsonschema.net/amount", "required":false }, "balance_transaction": { "type":"string", "id": "http://jsonschema.net/balance_transaction", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "date": { "type":"number", "id": "http://jsonschema.net/date", "required":false }, "description": { "type":"string", "id": "http://jsonschema.net/description", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "metadata": { "type":"object", "id": "http://jsonschema.net/metadata", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "other_transfers": { "type":"array", "id": "http://jsonschema.net/other_transfers", "required":false, "items": { "type":"string", "id": "http://jsonschema.net/other_transfers/0", "required":false } }, "recipient": { "type":"null", "id": "http://jsonschema.net/recipient", "required":false }, "statement_descriptor": { "type":"null", "id": "http://jsonschema.net/statement_descriptor", "required":false }, "status": { "type":"string", "id": "http://jsonschema.net/status", "required":false }, "summary": { "type":"object", "id": "http://jsonschema.net/summary", "required":false, "properties":{ "adjustment_count": { "type":"number", "id": "http://jsonschema.net/summary/adjustment_count", "required":false }, "adjustment_fee_details": { "type":"array", "id": "http://jsonschema.net/summary/adjustment_fee_details", "required":false }, "adjustment_fees": { "type":"number", "id": "http://jsonschema.net/summary/adjustment_fees", "required":false }, "adjustment_gross": { "type":"number", "id": "http://jsonschema.net/summary/adjustment_gross", "required":false }, "charge_count": { "type":"number", "id": "http://jsonschema.net/summary/charge_count", "required":false }, "charge_fee_details": { "type":"array", "id": "http://jsonschema.net/summary/charge_fee_details", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/summary/charge_fee_details/0", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/summary/charge_fee_details/0/amount", "required":false }, "application": { "type":"null", "id": "http://jsonschema.net/summary/charge_fee_details/0/application", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/summary/charge_fee_details/0/currency", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/summary/charge_fee_details/0/description", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/summary/charge_fee_details/0/type", "required":false } } } }, "charge_fees": { "type":"number", "id": "http://jsonschema.net/summary/charge_fees", "required":false }, "charge_gross": { "type":"number", "id": "http://jsonschema.net/summary/charge_gross", "required":false }, "collected_fee_count": { "type":"number", "id": "http://jsonschema.net/summary/collected_fee_count", "required":false }, "collected_fee_gross": { "type":"number", "id": "http://jsonschema.net/summary/collected_fee_gross", "required":false }, "collected_fee_refund_count": { "type":"number", "id": "http://jsonschema.net/summary/collected_fee_refund_count", "required":false }, "collected_fee_refund_gross": { "type":"number", "id": "http://jsonschema.net/summary/collected_fee_refund_gross", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/summary/currency", "required":false }, "net": { "type":"number", "id": "http://jsonschema.net/summary/net", "required":false }, "refund_count": { "type":"number", "id": "http://jsonschema.net/summary/refund_count", "required":false }, "refund_fee_details": { "type":"array", "id": "http://jsonschema.net/summary/refund_fee_details", "required":false }, "refund_fees": { "type":"number", "id": "http://jsonschema.net/summary/refund_fees", "required":false }, "refund_gross": { "type":"number", "id": "http://jsonschema.net/summary/refund_gross", "required":false }, "validation_count": { "type":"number", "id": "http://jsonschema.net/summary/validation_count", "required":false }, "validation_fees": { "type":"number", "id": "http://jsonschema.net/summary/validation_fees", "required":false } } }, "transactions": { "type":"object", "id": "http://jsonschema.net/transactions", "required":false, "properties":{ "count": { "type":"number", "id": "http://jsonschema.net/transactions/count", "required":false }, "data": { "type":"array", "id": "http://jsonschema.net/transactions/data", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/transactions/data/0", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/transactions/data/0/amount", "required":false }, "created": { "type":"number", "id": "http://jsonschema.net/transactions/data/0/created", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/transactions/data/0/currency", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/transactions/data/0/description", "required":false }, "fee_details": { "type":"array", "id": "http://jsonschema.net/transactions/data/0/fee_details", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/transactions/data/0/fee_details/0", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/transactions/data/0/fee_details/0/amount", "required":false }, "application": { "type":"null", "id": "http://jsonschema.net/transactions/data/0/fee_details/0/application", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/transactions/data/0/fee_details/0/currency", "required":false }, "description": { "type":"string", "id": "http://jsonschema.net/transactions/data/0/fee_details/0/description", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/transactions/data/0/fee_details/0/type", "required":false } } } }, "fee": { "type":"number", "id": "http://jsonschema.net/transactions/data/0/fee", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/transactions/data/0/id", "required":false }, "net": { "type":"number", "id": "http://jsonschema.net/transactions/data/0/net", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/transactions/data/0/type", "required":false } } } }, "object": { "type":"string", "id": "http://jsonschema.net/transactions/object", "required":false }, "url": { "type":"string", "id": "http://jsonschema.net/transactions/url", "required":false } } } } } example: | { "id": "tr_2OKKQ4A6HN1WJy", "object": "transfer", "date": 1376524800, "livemode": false, "amount": 286710, "currency": "usd", "status": "paid", "balance_transaction": "txn_2hrAStwRKjXiIp", "summary": { "charge_gross": 316670, "charge_fees": 29960, "charge_fee_details": [ { "amount": 29960, "currency": "usd", "type": "stripe_fee", "description": null, "application": null } ], "refund_gross": 0, "refund_fees": 0, "refund_fee_details": [ ], "adjustment_gross": 0, "adjustment_fees": 0, "adjustment_fee_details": [ ], "validation_fees": 0, "validation_count": 0, "charge_count": 682, "refund_count": 0, "adjustment_count": 0, "net": 286710, "currency": "usd", "collected_fee_gross": 0, "collected_fee_count": 0, "collected_fee_refund_gross": 0, "collected_fee_refund_count": 0 }, "transactions": { "object": "list", "count": 682, "url": "/v1/transfers/tr_2OKKQ4A6HN1WJy/transactions", "data": [ { "id": "ch_2Nn7UTSkz0cxq9", "type": "charge", "amount": 500, "currency": "usd", "net": 455, "created": 1376476192, "description": null, "fee": 45, "fee_details": [ { "amount": 45, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ] }, { "id": "ch_2Nn8hBMCCN0b1r", "type": "charge", "amount": 500, "currency": "usd", "net": 455, "created": 1376476252, "description": null, "fee": 45, "fee_details": [ { "amount": 45, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ] }, { "id": "ch_2Nn9rrWLlKk7Mj", "type": "charge", "amount": 500, "currency": "usd", "net": 455, "created": 1376476312, "description": null, "fee": 45, "fee_details": [ { "amount": 45, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ] }, { "id": "ch_2Nn9z9LTfcoJvW", "type": "charge", "amount": 100, "currency": "usd", "net": 67, "created": 1376476323, "description": null, "fee": 33, "fee_details": [ { "amount": 33, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ] }, { "id": "ch_2Nn9jymNURQqY5", "type": "charge", "amount": 100, "currency": "usd", "net": 67, "created": 1376476323, "description": null, "fee": 33, "fee_details": [ { "amount": 33, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ] } ] }, "other_transfers": [ "tr_2OKKQ4A6HN1WJy" ], "account": null, "description": "STRIPE TRANSFER", "metadata": { }, "statement_descriptor": null, "recipient": null } /cancel: type: baseResource post: description: | Cancels a transfer that has previously been created. Funds will be refunded to your available balance, and the fees you were originally charged on the transfer will be refunded. You may not cancel transfers that have already been paid out, or automatic Stripe transfers. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "account": { "type":"null", "id": "http://jsonschema.net/account", "required":false }, "amount": { "type":"number", "id": "http://jsonschema.net/amount", "required":false }, "balance_transaction": { "type":"string", "id": "http://jsonschema.net/balance_transaction", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "date": { "type":"number", "id": "http://jsonschema.net/date", "required":false }, "description": { "type":"string", "id": "http://jsonschema.net/description", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "metadata": { "type":"object", "id": "http://jsonschema.net/metadata", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "other_transfers": { "type":"array", "id": "http://jsonschema.net/other_transfers", "required":false, "items": { "type":"string", "id": "http://jsonschema.net/other_transfers/0", "required":false } }, "recipient": { "type":"null", "id": "http://jsonschema.net/recipient", "required":false }, "statement_descriptor": { "type":"null", "id": "http://jsonschema.net/statement_descriptor", "required":false }, "status": { "type":"string", "id": "http://jsonschema.net/status", "required":false }, "summary": { "type":"object", "id": "http://jsonschema.net/summary", "required":false, "properties":{ "adjustment_count": { "type":"number", "id": "http://jsonschema.net/summary/adjustment_count", "required":false }, "adjustment_fee_details": { "type":"array", "id": "http://jsonschema.net/summary/adjustment_fee_details", "required":false }, "adjustment_fees": { "type":"number", "id": "http://jsonschema.net/summary/adjustment_fees", "required":false }, "adjustment_gross": { "type":"number", "id": "http://jsonschema.net/summary/adjustment_gross", "required":false }, "charge_count": { "type":"number", "id": "http://jsonschema.net/summary/charge_count", "required":false }, "charge_fee_details": { "type":"array", "id": "http://jsonschema.net/summary/charge_fee_details", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/summary/charge_fee_details/0", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/summary/charge_fee_details/0/amount", "required":false }, "application": { "type":"null", "id": "http://jsonschema.net/summary/charge_fee_details/0/application", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/summary/charge_fee_details/0/currency", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/summary/charge_fee_details/0/description", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/summary/charge_fee_details/0/type", "required":false } } } }, "charge_fees": { "type":"number", "id": "http://jsonschema.net/summary/charge_fees", "required":false }, "charge_gross": { "type":"number", "id": "http://jsonschema.net/summary/charge_gross", "required":false }, "collected_fee_count": { "type":"number", "id": "http://jsonschema.net/summary/collected_fee_count", "required":false }, "collected_fee_gross": { "type":"number", "id": "http://jsonschema.net/summary/collected_fee_gross", "required":false }, "collected_fee_refund_count": { "type":"number", "id": "http://jsonschema.net/summary/collected_fee_refund_count", "required":false }, "collected_fee_refund_gross": { "type":"number", "id": "http://jsonschema.net/summary/collected_fee_refund_gross", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/summary/currency", "required":false }, "net": { "type":"number", "id": "http://jsonschema.net/summary/net", "required":false }, "refund_count": { "type":"number", "id": "http://jsonschema.net/summary/refund_count", "required":false }, "refund_fee_details": { "type":"array", "id": "http://jsonschema.net/summary/refund_fee_details", "required":false }, "refund_fees": { "type":"number", "id": "http://jsonschema.net/summary/refund_fees", "required":false }, "refund_gross": { "type":"number", "id": "http://jsonschema.net/summary/refund_gross", "required":false }, "validation_count": { "type":"number", "id": "http://jsonschema.net/summary/validation_count", "required":false }, "validation_fees": { "type":"number", "id": "http://jsonschema.net/summary/validation_fees", "required":false } } }, "transactions": { "type":"object", "id": "http://jsonschema.net/transactions", "required":false, "properties":{ "count": { "type":"number", "id": "http://jsonschema.net/transactions/count", "required":false }, "data": { "type":"array", "id": "http://jsonschema.net/transactions/data", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/transactions/data/0", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/transactions/data/0/amount", "required":false }, "created": { "type":"number", "id": "http://jsonschema.net/transactions/data/0/created", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/transactions/data/0/currency", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/transactions/data/0/description", "required":false }, "fee_details": { "type":"array", "id": "http://jsonschema.net/transactions/data/0/fee_details", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/transactions/data/0/fee_details/0", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/transactions/data/0/fee_details/0/amount", "required":false }, "application": { "type":"null", "id": "http://jsonschema.net/transactions/data/0/fee_details/0/application", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/transactions/data/0/fee_details/0/currency", "required":false }, "description": { "type":"string", "id": "http://jsonschema.net/transactions/data/0/fee_details/0/description", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/transactions/data/0/fee_details/0/type", "required":false } } } }, "fee": { "type":"number", "id": "http://jsonschema.net/transactions/data/0/fee", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/transactions/data/0/id", "required":false }, "net": { "type":"number", "id": "http://jsonschema.net/transactions/data/0/net", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/transactions/data/0/type", "required":false } } } }, "object": { "type":"string", "id": "http://jsonschema.net/transactions/object", "required":false }, "url": { "type":"string", "id": "http://jsonschema.net/transactions/url", "required":false } } } } } example: | { "id": "tr_2OKKQ4A6HN1WJy", "object": "transfer", "date": 1376524800, "livemode": false, "amount": 286710, "currency": "usd", "status": "paid", "balance_transaction": "txn_2hrAStwRKjXiIp", "summary": { "charge_gross": 316670, "charge_fees": 29960, "charge_fee_details": [ { "amount": 29960, "currency": "usd", "type": "stripe_fee", "description": null, "application": null } ], "refund_gross": 0, "refund_fees": 0, "refund_fee_details": [ ], "adjustment_gross": 0, "adjustment_fees": 0, "adjustment_fee_details": [ ], "validation_fees": 0, "validation_count": 0, "charge_count": 682, "refund_count": 0, "adjustment_count": 0, "net": 286710, "currency": "usd", "collected_fee_gross": 0, "collected_fee_count": 0, "collected_fee_refund_gross": 0, "collected_fee_refund_count": 0 }, "transactions": { "object": "list", "count": 682, "url": "/v1/transfers/tr_2OKKQ4A6HN1WJy/transactions", "data": [ { "id": "ch_2Nn7UTSkz0cxq9", "type": "charge", "amount": 500, "currency": "usd", "net": 455, "created": 1376476192, "description": null, "fee": 45, "fee_details": [ { "amount": 45, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ] }, { "id": "ch_2Nn8hBMCCN0b1r", "type": "charge", "amount": 500, "currency": "usd", "net": 455, "created": 1376476252, "description": null, "fee": 45, "fee_details": [ { "amount": 45, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ] }, { "id": "ch_2Nn9rrWLlKk7Mj", "type": "charge", "amount": 500, "currency": "usd", "net": 455, "created": 1376476312, "description": null, "fee": 45, "fee_details": [ { "amount": 45, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ] }, { "id": "ch_2Nn9z9LTfcoJvW", "type": "charge", "amount": 100, "currency": "usd", "net": 67, "created": 1376476323, "description": null, "fee": 33, "fee_details": [ { "amount": 33, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ] }, { "id": "ch_2Nn9jymNURQqY5", "type": "charge", "amount": 100, "currency": "usd", "net": 67, "created": 1376476323, "description": null, "fee": 33, "fee_details": [ { "amount": 33, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ] } ] }, "other_transfers": [ "tr_2OKKQ4A6HN1WJy" ], "account": null, "description": "STRIPE TRANSFER", "metadata": { }, "statement_descriptor": null, "recipient": null } /recipients: type: baseResource post: description: | Creates a new recipient object and verifies both the recipient identity and bank account information. body: application/x-www-form-urlencoded: formParameters: name: description: | The recipient's full, legal name. For type individual, should be in the format "First Last", "First Middle Last", or "First M Last" (no prefixes or suffixes). For corporation, the full incorporated name. type: string required: true type: description: | Type of the recipient: either individual or corporation. enum: [ individual, corporation ] required: true tax_id: description: | The recipient's tax ID, as a string. For type individual, the full SSN; for type corporation, the full EIN. type: string bank_account: description: | A bank account to attach to the recipient. **country**: required The country the bank account is in. Currently, only US is supported. **routing_number**: required The routing number for the bank account in string form. This should be the ACH routing number, not the wire routing number. **account_number**: required The account number for the bank account in string form. Must be a checking account. type: string default: null email: description: | The recipient's email address. It is displayed alongside the recipient in the web interface and can be useful for searching and tracking. type: string description: description: | An arbitrary string which you can attach to a recipient object. It is displayed alongside the recipient in the web interface. type: string default: null responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "active_account": { "type":"object", "id": "http://jsonschema.net/active_account", "required":false, "properties":{ "bank_name": { "type":"string", "id": "http://jsonschema.net/active_account/bank_name", "required":false }, "country": { "type":"string", "id": "http://jsonschema.net/active_account/country", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/active_account/currency", "required":false }, "fingerprint": { "type":"string", "id": "http://jsonschema.net/active_account/fingerprint", "required":false }, "last4": { "type":"string", "id": "http://jsonschema.net/active_account/last4", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/active_account/object", "required":false }, "validated": { "type":"boolean", "id": "http://jsonschema.net/active_account/validated", "required":false } } }, "created": { "type":"number", "id": "http://jsonschema.net/created", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/description", "required":false }, "email": { "type":"string", "id": "http://jsonschema.net/email", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "metadata": { "type":"object", "id": "http://jsonschema.net/metadata", "required":false }, "name": { "type":"string", "id": "http://jsonschema.net/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/type", "required":false }, "verified": { "type":"boolean", "id": "http://jsonschema.net/verified", "required":false } } } example: | { "id": "rp_2dlCVjwuvlBoSm", "object": "recipient", "created": 1380159281, "livemode": false, "type": "individual", "description": null, "email": "jesse@mybitfix.com", "name": "Jessiford P Franklin", "verified": false, "metadata": { }, "active_account": { "object": "bank_account", "bank_name": "STRIPE TEST BANK", "last4": "6789", "country": "US", "currency": "usd", "validated": false, "fingerprint": "StvKx0vy9W8cn6pd" } } get: description: | Returns a list of your recipients. The recipients are returned sorted by creation date, with the most recently created recipient appearing first. queryParameters: count: description: | A limit on the number of objects to be returned. Count can range between 1 and 100 items. minimum: 1 maximum: 100 default: 10 offset: description: | An offset into the list of returned items. The API will return the requested number of items starting at that offset. type: integer default: 0 verified: description: Only return recipients that are verified or unverified. type: string responses: 200: body: schema: | { "type": "object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required": false, "properties": { "count": { "type": "number", "id": "http://jsonschema.net/count", "required": false }, "data": { "type": "array", "id": "http://jsonschema.net/data", "required": false, "items": { "type": "object", "id": "http://jsonschema.net", "required": false, "properties": { "active_account": { "type": "object", "id": "http://jsonschema.net/active_account", "required": false, "properties": { "bank_name": { "type": "string", "id": "http://jsonschema.net/active_account/bank_name", "required": false }, "country": { "type": "string", "id": "http://jsonschema.net/active_account/country", "required": false }, "currency": { "type": "string", "id": "http://jsonschema.net/active_account/currency", "required": false }, "fingerprint": { "type": "string", "id": "http://jsonschema.net/active_account/fingerprint", "required": false }, "last4": { "type": "string", "id": "http://jsonschema.net/active_account/last4", "required": false }, "object": { "type": "string", "id": "http://jsonschema.net/active_account/object", "required": false }, "validated": { "type": "boolean", "id": "http://jsonschema.net/active_account/validated", "required": false } } }, "created": { "type": "number", "id": "http://jsonschema.net/created", "required": false }, "description": { "type": "null", "id": "http://jsonschema.net/description", "required": false }, "email": { "type": "string", "id": "http://jsonschema.net/email", "required": false }, "id": { "type": "string", "id": "http://jsonschema.net/id", "required": false }, "livemode": { "type": "boolean", "id": "http://jsonschema.net/livemode", "required": false }, "metadata": { "type": "object", "id": "http://jsonschema.net/metadata", "required": false }, "name": { "type": "string", "id": "http://jsonschema.net/name", "required": false }, "object": { "type": "string", "id": "http://jsonschema.net/object", "required": false }, "type": { "type": "string", "id": "http://jsonschema.net/type", "required": false }, "verified": { "type": "boolean", "id": "http://jsonschema.net/verified", "required": false } } } } } } example: | { "object": "list", "url": "v1/recipients", "count": 1, "data": [ { "id": "rp_2dlCVjwuvlBoSm", "object": "recipient", "created": 1380159281, "livemode": false, "type": "individual", "description": null, "email": "jesse@mybitfix.com", "name": "Jessiford P Franklin", "verified": false, "metadata": { }, "active_account": { "object": "bank_account", "bank_name": "STRIPE TEST BANK", "last4": "6789", "country": "US", "currency": "usd", "validated": false, "fingerprint": "StvKx0vy9W8cn6pd" } } ] } /{recipient_ID}: type: baseResource uriParameters: recipient_ID: description: The identifier of the recipient to be retrieved. get: description: | Retrieves the details of an existing recipient. You need only supply the unique recipient identifier that was returned upon recipient creation. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "active_account": { "type":"object", "id": "http://jsonschema.net/active_account", "required":false, "properties":{ "bank_name": { "type":"string", "id": "http://jsonschema.net/active_account/bank_name", "required":false }, "country": { "type":"string", "id": "http://jsonschema.net/active_account/country", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/active_account/currency", "required":false }, "fingerprint": { "type":"string", "id": "http://jsonschema.net/active_account/fingerprint", "required":false }, "last4": { "type":"string", "id": "http://jsonschema.net/active_account/last4", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/active_account/object", "required":false }, "validated": { "type":"boolean", "id": "http://jsonschema.net/active_account/validated", "required":false } } }, "created": { "type":"number", "id": "http://jsonschema.net/created", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/description", "required":false }, "email": { "type":"string", "id": "http://jsonschema.net/email", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "metadata": { "type":"object", "id": "http://jsonschema.net/metadata", "required":false }, "name": { "type":"string", "id": "http://jsonschema.net/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/type", "required":false }, "verified": { "type":"boolean", "id": "http://jsonschema.net/verified", "required":false } } } example: | { "id": "rp_2dlCVjwuvlBoSm", "object": "recipient", "created": 1380159281, "livemode": false, "type": "individual", "description": null, "email": "jesse@mybitfix.com", "name": "Jessiford P Franklin", "verified": false, "metadata": { }, "active_account": { "object": "bank_account", "bank_name": "STRIPE TEST BANK", "last4": "6789", "country": "US", "currency": "usd", "validated": false, "fingerprint": "StvKx0vy9W8cn6pd" } } post: description: | Updates the specified recipient by setting the values of the parameters passed. Any parameters not provided will be left unchanged. If you update the name or tax ID, the identity verification will automatically be rerun. If you update the bank account, the bank account validation will automatically be rerun. body: application/x-www-form-urlencoded: formParameters: name: description: | The recipient's full, legal name. For type individual, should be in the format "First Last", "First Middle Last", or "First M Last" (no prefixes or suffixes). For corporation, the full incorporated name. type: string default: null tax_id: description: | The recipient's tax ID, as a string. For type individual, the full SSN; for type corporation, the full EIN. type: string bank_account: description: | A new bank account to attach to the recipient. **country**: required The country the bank account is in. Currently, only US is supported. **routing_number**: required The routing number for the bank account in string form. This should be the ACH routing number, not the wire routing number. **account_number**: required The account number for the bank account in string form. Must be a checking account. type: string email: description: | The recipient's email address. It is displayed alongside the recipient in the web interface and can be useful for searching and tracking. This will be unset if you POST an empty value. type: string default: null description: description: | An arbitrary string which you can attach to a recipient object. It is displayed alongside the recipient in the web interface. This will be unset if you POST an empty value. type: string default: null responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "active_account": { "type":"object", "id": "http://jsonschema.net/active_account", "required":false, "properties":{ "bank_name": { "type":"string", "id": "http://jsonschema.net/active_account/bank_name", "required":false }, "country": { "type":"string", "id": "http://jsonschema.net/active_account/country", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/active_account/currency", "required":false }, "fingerprint": { "type":"string", "id": "http://jsonschema.net/active_account/fingerprint", "required":false }, "last4": { "type":"string", "id": "http://jsonschema.net/active_account/last4", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/active_account/object", "required":false }, "validated": { "type":"boolean", "id": "http://jsonschema.net/active_account/validated", "required":false } } }, "created": { "type":"number", "id": "http://jsonschema.net/created", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/description", "required":false }, "email": { "type":"string", "id": "http://jsonschema.net/email", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "metadata": { "type":"object", "id": "http://jsonschema.net/metadata", "required":false }, "name": { "type":"string", "id": "http://jsonschema.net/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/type", "required":false }, "verified": { "type":"boolean", "id": "http://jsonschema.net/verified", "required":false } } } example: | { "id": "rp_2dlCVjwuvlBoSm", "object": "recipient", "created": 1380159281, "livemode": false, "type": "individual", "description": null, "email": "jesse@mybitfix.com", "name": "Jessiford P Franklin", "verified": false, "metadata": { }, "active_account": { "object": "bank_account", "bank_name": "STRIPE TEST BANK", "last4": "6789", "country": "US", "currency": "usd", "validated": false, "fingerprint": "StvKx0vy9W8cn6pd" } } delete: description: | Permanently deletes a recipient. It cannot be undone. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "deleted": { "type":"boolean", "id": "http://jsonschema.net/deleted", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false } } } example: | { "id": "cu_2W2fo9IOza32fP", "deleted": true } /account: type: baseResource get: description: | Retrieves the details of the account, based on the API key that was used to make the request. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "charge_enabled": { "type":"boolean", "id": "http://jsonschema.net/charge_enabled", "required":false }, "country": { "type":"string", "id": "http://jsonschema.net/country", "required":false }, "currencies_supported": { "type":"array", "id": "http://jsonschema.net/currencies_supported", "required":false, "items": { "type":"string", "id": "http://jsonschema.net/currencies_supported/0", "required":false } }, "default_currency": { "type":"string", "id": "http://jsonschema.net/default_currency", "required":false }, "details_submitted": { "type":"boolean", "id": "http://jsonschema.net/details_submitted", "required":false }, "email": { "type":"string", "id": "http://jsonschema.net/email", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "statement_descriptor": { "type":"null", "id": "http://jsonschema.net/statement_descriptor", "required":false }, "transfer_enabled": { "type":"boolean", "id": "http://jsonschema.net/transfer_enabled", "required":false } } } example: | { "id": "BKFamDcAnurQgZDPT6vvOzGJboJhPCcF", "email": "site@stripe.com", "statement_descriptor": null, "details_submitted": false, "charge_enabled": false, "transfer_enabled": false, "currencies_supported": [ "USD" ], "default_currency": "USD", "country": "US", "object": "account" } /balance: type: baseResource get: description: | Retrieves the current account balance, based on the API key that was used to make the request. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "available": { "type":"array", "id": "http://jsonschema.net/available", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/available/0", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/available/0/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/available/0/currency", "required":false } } } }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "pending": { "type":"array", "id": "http://jsonschema.net/pending", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/pending/0", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/pending/0/amount", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/pending/0/currency", "required":false } } } } } } example: | { "pending": [ { "amount": 0, "currency": "cad" }, { "amount": 363361, "currency": "usd" } ], "available": [ { "amount": -358, "currency": "cad" }, { "amount": -124791940, "currency": "usd" } ], "livemode": false, "object": "balance" } /history: type: baseResource get: description: | Returns a list of transactions that have contributed to the Stripe account balance (includes charges, refunds, transfers, and so on). The transactions are returned in sorted order, with the most recent transactions appearing first. queryParameters: available_on: description: | A filter on the list based on the object available_on field. The value can be a string with an exact UTC timestamp, or it can be a dictionary with the following options: **gt**: optional Return values where the available_on field is after this timestamp. **gte**: optional Return values where the available_on field is after or equal to this timestamp. **lt**: optional Return values where the available_on field is before this timestamp. **lte**: optional Return values where the available_on field is before or equal to this timestamp. type: string count: description: | A limit on the number of objects to be returned. Count can range between 1 and 100 items. type: integer minimum: 1 maximum: 100 default: 10 created: description: | A filter on the list based on the object created field. The value can be a string with an exact UTC timestamp, or it can be a dictionary with the following options: **gt**: optional Return values where the created field is after this timestamp. **gte**: optional Return values where the created field is after or equal to this timestamp. **lt**: optional Return values where the created field is before this timestamp. **lte**: optional Return values where the created field is before or equal to this timestamp. type: string currency: type: string offset: description: | An offset into the list of returned items. The API will return the requested number of items starting at that offset. type: integer default: 0 source: type: string transfer: description: | For automatic Stripe transfers only, only returns transactions that were transferred out on the specified transfer ID. type: string type: description: | Only returns transactions of the given type. One of: charge, refund, adjustment, application_fee, application_fee_refund, transfer, or transfer_failure. enum: [charge, refund, adjustment, application_fee, application_fee_refund, transfer, transfer_failure] responses: 200: body: schema: | { "type": "object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required": false, "properties": { "count": { "type": "number", "id": "http://jsonschema.net/count", "required": false }, "data": { "type": "array", "id": "http://jsonschema.net/data", "required": false, "items": { "type": "object", "id": "http://jsonschema.net", "required": false, "properties": { "amount": { "type": "number", "id": "http://jsonschema.net/amount", "required": false }, "available_on": { "type": "number", "id": "http://jsonschema.net/available_on", "required": false }, "created": { "type": "number", "id": "http://jsonschema.net/created", "required": false }, "currency": { "type": "string", "id": "http://jsonschema.net/currency", "required": false }, "description": { "type": "null", "id": "http://jsonschema.net/description", "required": false }, "fee_details": { "type": "array", "id": "http://jsonschema.net/fee_details", "required": false, "items": { "type": "object", "id": "http://jsonschema.net/fee_details/0", "required": false, "properties": { "amount": { "type": "number", "id": "http://jsonschema.net/fee_details/0/amount", "required": false }, "application": { "type": "null", "id": "http://jsonschema.net/fee_details/0/application", "required": false }, "currency": { "type": "string", "id": "http://jsonschema.net/fee_details/0/currency", "required": false }, "description": { "type": "string", "id": "http://jsonschema.net/fee_details/0/description", "required": false }, "type": { "type": "string", "id": "http://jsonschema.net/fee_details/0/type", "required": false } } } }, "fee": { "type": "number", "id": "http://jsonschema.net/fee", "required": false }, "id": { "type": "string", "id": "http://jsonschema.net/id", "required": false }, "net": { "type": "number", "id": "http://jsonschema.net/net", "required": false }, "object": { "type": "string", "id": "http://jsonschema.net/object", "required": false }, "source": { "type": "string", "id": "http://jsonschema.net/source", "required": false }, "status": { "type": "string", "id": "http://jsonschema.net/status", "required": false }, "type": { "type": "string", "id": "http://jsonschema.net/type", "required": false } } } } } } example: | { "object": "list", "url": "/v1/balance/history", "count": 1, "data": [ { "id": "txn_2hrAStwRKjXiIp", "object": "balance_transaction", "source": "ch_2hrAFVP6jlr1jB", "amount": 100, "currency": "usd", "net": 41, "type": "charge", "created": 1381104058, "available_on": 1381104000, "status": "available", "fee": 59, "fee_details": [ { "amount": 45, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ], "description": null } ] } /{TRANSACTION_ID}: type: baseResource uriParameters: TRANSACTION_ID: description: | The ID of the desired balance transaction (as found on any API object that affects the balance, e.g. a charge or transfer). type: string get: description: Retrieves the balance transaction with the given ID. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/amount", "required":false }, "available_on": { "type":"number", "id": "http://jsonschema.net/available_on", "required":false }, "created": { "type":"number", "id": "http://jsonschema.net/created", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/currency", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/description", "required":false }, "fee_details": { "type":"array", "id": "http://jsonschema.net/fee_details", "required":false, "items": { "type":"object", "id": "http://jsonschema.net/fee_details/0", "required":false, "properties":{ "amount": { "type":"number", "id": "http://jsonschema.net/fee_details/0/amount", "required":false }, "application": { "type":"null", "id": "http://jsonschema.net/fee_details/0/application", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/fee_details/0/currency", "required":false }, "description": { "type":"string", "id": "http://jsonschema.net/fee_details/0/description", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/fee_details/0/type", "required":false } } } }, "fee": { "type":"number", "id": "http://jsonschema.net/fee", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "net": { "type":"number", "id": "http://jsonschema.net/net", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "source": { "type":"string", "id": "http://jsonschema.net/source", "required":false }, "status": { "type":"string", "id": "http://jsonschema.net/status", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/type", "required":false } } } example: | { "id": "txn_2hrAStwRKjXiIp", "object": "balance_transaction", "source": "ch_2hrAFVP6jlr1jB", "amount": 100, "currency": "usd", "net": 41, "type": "charge", "created": 1381104058, "available_on": 1381104000, "status": "available", "fee": 59, "fee_details": [ { "amount": 45, "currency": "usd", "type": "stripe_fee", "description": "Stripe processing fees", "application": null } ], "description": null } /events: type: baseResource get: description: List events, going back (at least) up to 30 days. queryParameters: count: description: | A limit on the number of objects to be returned. Count can range between 1 and 100 items. type: integer minimum: 1 maximum: 100 default: 10 created: description: | A filter on the list based on the object created field. The value can be a string with an exact UTC timestamp, or it can be a dictionary with the following options: **gt**: optional Return values where the created field is after this timestamp. **gte**: optional Return values where the created field is after or equal to this timestamp. **lt**: optional Return values where the created field is before this timestamp. **lte**: optional Return values where the created field is before or equal to this timestamp. type: string offset: description: | An offset into the list of returned items. The API will return the requested number of items starting at that offset. type: integer default: 0 type: description: | A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property type: string responses: 200: body: schema: | { "type": "object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required": false, "properties": { "count": { "type": "number", "id": "http://jsonschema.net/count", "required": false }, "data": { "type": "array", "id": "http://jsonschema.net/data", "required": false, "items": { "type": "object", "id": "http://jsonschema.net", "required": false, "properties": { "created": { "type": "number", "id": "http://jsonschema.net/created", "required": false }, "data": { "type": "object", "id": "http://jsonschema.net/data", "required": false, "properties": { "object": { "type": "object", "id": "http://jsonschema.net/data/object", "required": false, "properties": { "amount_refunded": { "type": "number", "id": "http://jsonschema.net/data/object/amount_refunded", "required": false }, "amount": { "type": "number", "id": "http://jsonschema.net/data/object/amount", "required": false }, "balance_transaction": { "type": "string", "id": "http://jsonschema.net/data/object/balance_transaction", "required": false }, "captured": { "type": "boolean", "id": "http://jsonschema.net/data/object/captured", "required": false }, "card": { "type": "object", "id": "http://jsonschema.net/data/object/card", "required": false, "properties": { "address_city": { "type": "null", "id": "http://jsonschema.net/data/object/card/address_city", "required": false }, "address_country": { "type": "null", "id": "http://jsonschema.net/data/object/card/address_country", "required": false }, "address_line1_check": { "type": "null", "id": "http://jsonschema.net/data/object/card/address_line1_check", "required": false }, "address_line1": { "type": "null", "id": "http://jsonschema.net/data/object/card/address_line1", "required": false }, "address_line2": { "type": "null", "id": "http://jsonschema.net/data/object/card/address_line2", "required": false }, "address_state": { "type": "null", "id": "http://jsonschema.net/data/object/card/address_state", "required": false }, "address_zip_check": { "type": "null", "id": "http://jsonschema.net/data/object/card/address_zip_check", "required": false }, "address_zip": { "type": "null", "id": "http://jsonschema.net/data/object/card/address_zip", "required": false }, "country": { "type": "string", "id": "http://jsonschema.net/data/object/card/country", "required": false }, "customer": { "type": "null", "id": "http://jsonschema.net/data/object/card/customer", "required": false }, "cvc_check": { "type": "string", "id": "http://jsonschema.net/data/object/card/cvc_check", "required": false }, "exp_month": { "type": "number", "id": "http://jsonschema.net/data/object/card/exp_month", "required": false }, "exp_year": { "type": "number", "id": "http://jsonschema.net/data/object/card/exp_year", "required": false }, "fingerprint": { "type": "string", "id": "http://jsonschema.net/data/object/card/fingerprint", "required": false }, "id": { "type": "string", "id": "http://jsonschema.net/data/object/card/id", "required": false }, "last4": { "type": "string", "id": "http://jsonschema.net/data/object/card/last4", "required": false }, "name": { "type": "null", "id": "http://jsonschema.net/data/object/card/name", "required": false }, "object": { "type": "string", "id": "http://jsonschema.net/data/object/card/object", "required": false }, "type": { "type": "string", "id": "http://jsonschema.net/data/object/card/type", "required": false } } }, "created": { "type": "number", "id": "http://jsonschema.net/data/object/created", "required": false }, "currency": { "type": "string", "id": "http://jsonschema.net/data/object/currency", "required": false }, "customer": { "type": "null", "id": "http://jsonschema.net/data/object/customer", "required": false }, "description": { "type": "null", "id": "http://jsonschema.net/data/object/description", "required": false }, "dispute": { "type": "null", "id": "http://jsonschema.net/data/object/dispute", "required": false }, "failure_code": { "type": "null", "id": "http://jsonschema.net/data/object/failure_code", "required": false }, "failure_message": { "type": "null", "id": "http://jsonschema.net/data/object/failure_message", "required": false }, "id": { "type": "string", "id": "http://jsonschema.net/data/object/id", "required": false }, "invoice": { "type": "null", "id": "http://jsonschema.net/data/object/invoice", "required": false }, "livemode": { "type": "boolean", "id": "http://jsonschema.net/data/object/livemode", "required": false }, "metadata": { "type": "object", "id": "http://jsonschema.net/data/object/metadata", "required": false }, "object": { "type": "string", "id": "http://jsonschema.net/data/object/object", "required": false }, "paid": { "type": "boolean", "id": "http://jsonschema.net/data/object/paid", "required": false }, "refunded": { "type": "boolean", "id": "http://jsonschema.net/data/object/refunded", "required": false }, "refunds": { "type": "array", "id": "http://jsonschema.net/data/object/refunds", "required": false } } } } }, "id": { "type": "string", "id": "http://jsonschema.net/id", "required": false }, "livemode": { "type": "boolean", "id": "http://jsonschema.net/livemode", "required": false }, "object": { "type": "string", "id": "http://jsonschema.net/object", "required": false }, "pending_webhooks": { "type": "number", "id": "http://jsonschema.net/pending_webhooks", "required": false }, "request": { "type": "string", "id": "http://jsonschema.net/request", "required": false }, "type": { "type": "string", "id": "http://jsonschema.net/type", "required": false } } } } } } example: | { "object": "list", "url": "/v1/events", "count": 1, "data": [ { "id": "evt_2i0bkMsBaZwLp1", "created": 1381139159, "livemode": false, "type": "charge.succeeded", "data": { "object": { "id": "ch_2i0bEetfZQnWS2", "object": "charge", "created": 1381139159, "livemode": false, "paid": true, "amount": 500, "currency": "usd", "refunded": false, "card": { "id": "card_2i0baJexR7HVae", "object": "card", "last4": "4242", "type": "Visa", "exp_month": 1, "exp_year": 2050, "fingerprint": "qhjxpr7DiCdFYTlH", "customer": null, "country": "US", "name": null, "address_line1": null, "address_line2": null, "address_city": null, "address_state": null, "address_zip": null, "address_country": null, "cvc_check": "pass", "address_line1_check": null, "address_zip_check": null }, "captured": true, "refunds": [ ], "balance_transaction": "txn_2i0bWLMtt8QnOF", "failure_message": null, "failure_code": null, "amount_refunded": 0, "customer": null, "invoice": null, "description": null, "dispute": null, "metadata": { } } }, "object": "event", "pending_webhooks": 0, "request": "iar_2i0bwZ3Bh7TiPp" } ] } /{EVENT_ID}: type: baseResource uriParameters: EVENT_ID: description: The identifier of the event. type: string get: description: | Retrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "created": { "type":"number", "id": "http://jsonschema.net/created", "required":false }, "data": { "type":"object", "id": "http://jsonschema.net/data", "required":false, "properties":{ "object": { "type":"object", "id": "http://jsonschema.net/data/object", "required":false, "properties":{ "amount_refunded": { "type":"number", "id": "http://jsonschema.net/data/object/amount_refunded", "required":false }, "amount": { "type":"number", "id": "http://jsonschema.net/data/object/amount", "required":false }, "balance_transaction": { "type":"string", "id": "http://jsonschema.net/data/object/balance_transaction", "required":false }, "captured": { "type":"boolean", "id": "http://jsonschema.net/data/object/captured", "required":false }, "card": { "type":"object", "id": "http://jsonschema.net/data/object/card", "required":false, "properties":{ "address_city": { "type":"null", "id": "http://jsonschema.net/data/object/card/address_city", "required":false }, "address_country": { "type":"null", "id": "http://jsonschema.net/data/object/card/address_country", "required":false }, "address_line1_check": { "type":"null", "id": "http://jsonschema.net/data/object/card/address_line1_check", "required":false }, "address_line1": { "type":"null", "id": "http://jsonschema.net/data/object/card/address_line1", "required":false }, "address_line2": { "type":"null", "id": "http://jsonschema.net/data/object/card/address_line2", "required":false }, "address_state": { "type":"null", "id": "http://jsonschema.net/data/object/card/address_state", "required":false }, "address_zip_check": { "type":"null", "id": "http://jsonschema.net/data/object/card/address_zip_check", "required":false }, "address_zip": { "type":"null", "id": "http://jsonschema.net/data/object/card/address_zip", "required":false }, "country": { "type":"string", "id": "http://jsonschema.net/data/object/card/country", "required":false }, "customer": { "type":"null", "id": "http://jsonschema.net/data/object/card/customer", "required":false }, "cvc_check": { "type":"string", "id": "http://jsonschema.net/data/object/card/cvc_check", "required":false }, "exp_month": { "type":"number", "id": "http://jsonschema.net/data/object/card/exp_month", "required":false }, "exp_year": { "type":"number", "id": "http://jsonschema.net/data/object/card/exp_year", "required":false }, "fingerprint": { "type":"string", "id": "http://jsonschema.net/data/object/card/fingerprint", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/data/object/card/id", "required":false }, "last4": { "type":"string", "id": "http://jsonschema.net/data/object/card/last4", "required":false }, "name": { "type":"null", "id": "http://jsonschema.net/data/object/card/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/data/object/card/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/data/object/card/type", "required":false } } }, "created": { "type":"number", "id": "http://jsonschema.net/data/object/created", "required":false }, "currency": { "type":"string", "id": "http://jsonschema.net/data/object/currency", "required":false }, "customer": { "type":"null", "id": "http://jsonschema.net/data/object/customer", "required":false }, "description": { "type":"null", "id": "http://jsonschema.net/data/object/description", "required":false }, "dispute": { "type":"null", "id": "http://jsonschema.net/data/object/dispute", "required":false }, "failure_code": { "type":"null", "id": "http://jsonschema.net/data/object/failure_code", "required":false }, "failure_message": { "type":"null", "id": "http://jsonschema.net/data/object/failure_message", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/data/object/id", "required":false }, "invoice": { "type":"null", "id": "http://jsonschema.net/data/object/invoice", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/data/object/livemode", "required":false }, "metadata": { "type":"object", "id": "http://jsonschema.net/data/object/metadata", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/data/object/object", "required":false }, "paid": { "type":"boolean", "id": "http://jsonschema.net/data/object/paid", "required":false }, "refunded": { "type":"boolean", "id": "http://jsonschema.net/data/object/refunded", "required":false }, "refunds": { "type":"array", "id": "http://jsonschema.net/data/object/refunds", "required":false } } } } }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "pending_webhooks": { "type":"number", "id": "http://jsonschema.net/pending_webhooks", "required":false }, "request": { "type":"string", "id": "http://jsonschema.net/request", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/type", "required":false } } } example: | { "id": "evt_2i0bkMsBaZwLp1", "created": 1381139159, "livemode": false, "type": "charge.succeeded", "data": { "object": { "id": "ch_2i0bEetfZQnWS2", "object": "charge", "created": 1381139159, "livemode": false, "paid": true, "amount": 500, "currency": "usd", "refunded": false, "card": { "id": "card_2i0baJexR7HVae", "object": "card", "last4": "4242", "type": "Visa", "exp_month": 1, "exp_year": 2050, "fingerprint": "qhjxpr7DiCdFYTlH", "customer": null, "country": "US", "name": null, "address_line1": null, "address_line2": null, "address_city": null, "address_state": null, "address_zip": null, "address_country": null, "cvc_check": "pass", "address_line1_check": null, "address_zip_check": null }, "captured": true, "refunds": [ ], "balance_transaction": "txn_2i0bWLMtt8QnOF", "failure_message": null, "failure_code": null, "amount_refunded": 0, "customer": null, "invoice": null, "description": null, "dispute": null, "metadata": { } } }, "object": "event", "pending_webhooks": 0, "request": "iar_2i0bwZ3Bh7TiPp" } /tokens: type: baseResource post: description: | Creates a single use token that wraps the details of a credit card. This token can be used in place of a credit card dictionary with any API method. These tokens can only be used once: by creating a new charge object, or attaching them to a customer. #TODO: one of needed body: application/x-www-form-urlencoded: formParameters: card: description: | optional, either customer or card is required, but not both The card details this token will represent. **number**: required The card number, as a string without any separators. **exp_month**: required Two digit number representing the card's expiration month. **exp_year**: required Two or four digit number representing the card's expiration year. **cvc**: optional, highly recommended Card security code. **name**: optional Cardholder's full name. **address_line1**: optional **address_line2**: optional **address_city**: optional **address_zip**: optional **address_state**: optional **address_country**: optional type: string customer: description: | optional, either customer or card is required, but not both For use with Stripe Connect only; the API key used for the request must be an OAuth access token. For more details, see the shared customers documentation. A customer (owned by the application's account) to create a token for. type: string responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "card": { "type":"object", "id": "http://jsonschema.net/card", "required":false, "properties":{ "address_city": { "type":"null", "id": "http://jsonschema.net/card/address_city", "required":false }, "address_country": { "type":"null", "id": "http://jsonschema.net/card/address_country", "required":false }, "address_line1": { "type":"null", "id": "http://jsonschema.net/card/address_line1", "required":false }, "address_line2": { "type":"null", "id": "http://jsonschema.net/card/address_line2", "required":false }, "address_state": { "type":"null", "id": "http://jsonschema.net/card/address_state", "required":false }, "address_zip": { "type":"null", "id": "http://jsonschema.net/card/address_zip", "required":false }, "country": { "type":"string", "id": "http://jsonschema.net/card/country", "required":false }, "customer": { "type":"null", "id": "http://jsonschema.net/card/customer", "required":false }, "exp_month": { "type":"number", "id": "http://jsonschema.net/card/exp_month", "required":false }, "exp_year": { "type":"number", "id": "http://jsonschema.net/card/exp_year", "required":false }, "fingerprint": { "type":"string", "id": "http://jsonschema.net/card/fingerprint", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/card/id", "required":false }, "last4": { "type":"string", "id": "http://jsonschema.net/card/last4", "required":false }, "name": { "type":"null", "id": "http://jsonschema.net/card/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/card/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/card/type", "required":false } } }, "created": { "type":"number", "id": "http://jsonschema.net/created", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/type", "required":false }, "used": { "type":"boolean", "id": "http://jsonschema.net/used", "required":false } } } example: | { "id": "tok_1RjCszdhnuTnGF", "livemode": false, "created": 1363084496, "used": false, "object": "token", "type": "card", "card": { "id": "cc_1RjCGyzfsxF0AF", "object": "card", "last4": "4242", "type": "Visa", "exp_month": 8, "exp_year": 2014, "fingerprint": "qhjxpr7DiCdFYTlH", "customer": null, "country": "US", "name": null, "address_line1": null, "address_line2": null, "address_city": null, "address_state": null, "address_zip": null, "address_country": null } } /{ID}: uriParameters: ID: description: ID of a token. get: description: Retrieves the token with the given ID. responses: 200: body: schema: | { "type":"object", "$schema": "http://json-schema.org/draft-03/schema", "id": "http://jsonschema.net", "required":false, "properties":{ "card": { "type":"object", "id": "http://jsonschema.net/card", "required":false, "properties":{ "address_city": { "type":"null", "id": "http://jsonschema.net/card/address_city", "required":false }, "address_country": { "type":"null", "id": "http://jsonschema.net/card/address_country", "required":false }, "address_line1": { "type":"null", "id": "http://jsonschema.net/card/address_line1", "required":false }, "address_line2": { "type":"null", "id": "http://jsonschema.net/card/address_line2", "required":false }, "address_state": { "type":"null", "id": "http://jsonschema.net/card/address_state", "required":false }, "address_zip": { "type":"null", "id": "http://jsonschema.net/card/address_zip", "required":false }, "country": { "type":"string", "id": "http://jsonschema.net/card/country", "required":false }, "customer": { "type":"null", "id": "http://jsonschema.net/card/customer", "required":false }, "exp_month": { "type":"number", "id": "http://jsonschema.net/card/exp_month", "required":false }, "exp_year": { "type":"number", "id": "http://jsonschema.net/card/exp_year", "required":false }, "fingerprint": { "type":"string", "id": "http://jsonschema.net/card/fingerprint", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/card/id", "required":false }, "last4": { "type":"string", "id": "http://jsonschema.net/card/last4", "required":false }, "name": { "type":"null", "id": "http://jsonschema.net/card/name", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/card/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/card/type", "required":false } } }, "created": { "type":"number", "id": "http://jsonschema.net/created", "required":false }, "id": { "type":"string", "id": "http://jsonschema.net/id", "required":false }, "livemode": { "type":"boolean", "id": "http://jsonschema.net/livemode", "required":false }, "object": { "type":"string", "id": "http://jsonschema.net/object", "required":false }, "type": { "type":"string", "id": "http://jsonschema.net/type", "required":false }, "used": { "type":"boolean", "id": "http://jsonschema.net/used", "required":false } } } example: | { "id": "tok_1RjCszdhnuTnGF", "livemode": false, "created": 1363084496, "used": false, "object": "token", "type": "card", "card": { "id": "cc_1RjCGyzfsxF0AF", "object": "card", "last4": "4242", "type": "Visa", "exp_month": 8, "exp_year": 2014, "fingerprint": "qhjxpr7DiCdFYTlH", "customer": null, "country": "US", "name": null, "address_line1": null, "address_line2": null, "address_city": null, "address_state": null, "address_zip": null, "address_country": null } }