Introduction

These are the API docs for version 1 of the Spreedly API (previously Spreedly Core).

API v1 is a standard REST-style API that accepts/returns XML or JSON requests and is located at:

https://core.spreedly.com/v1/

API examples

These API reference docs are meant to clearly define the URLs, parameters, request bodies, responses and error states of the Spreedly API. Most sections will be accompanied by the HTTP representation of the API call in the right-most column and should be easily translated to the equivalent curl (or other library) command.

For instance, the following HTTP request representation:

Is equivalent to the following curl command:

The response section immediately follows the request and outputs both the HTTP response code:

as well as the response body itself:

Variables

POST /v1/gateways/<gateway_token>/verify.<format> HTTPS/1.1
Host: core.spreedly.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Content-Type: application/<format>

{
  "transaction": {
    "payment_method_token": "56wyNnSmuA6CWYP7w0MiYCVIbW6",
    "retain_on_success": true
  }
}
<transaction>
  <payment_method_token>56wyNnSmuA6CWYP7w0MiYCVIbW6</payment_method_token>
  <retain_on_success>true</retain_on_success>
</transaction>

Request variables are displayed as <var_name> with the docs. Anytime a variable exists in an example API request, it will be defined in the associated request/response element tables.

Parameter Description
gateway_token
required
The token of the gateway to execute against
format
required
One of json or xml

Unless a variable is denoted as required, it is optional and can be omitted.