Skip to content

Instantly share code, notes, and snippets.

@ntalbott
Forked from calvincorreli/spreedly-core-api.txt
Created September 3, 2012 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ntalbott/3606333 to your computer and use it in GitHub Desktop.
Save ntalbott/3606333 to your computer and use it in GitHub Desktop.
Overview of Spreedly Core API endpoints
OPTIONS https://spreedlycore.com/v1/gateways.xml => list supported gateways
POST https://spreedlycore.com/v1/gateways.xml => add a gateway
GET https://spreedlycore.com/v1/gateways.xml => list all added gateways
PUT https://spreedlycore.com/v1/gateways/token.xml => Update gateway
PUT https://spreedlycore.com/v1/gateways/token/redact.xml => Remove sensitive gateway data
POST https://spreedlycore.com/v1/gateways/token/purchase.xml => purchase - supply a payment method token also
POST https://spreedlycore.com/v1/gateways/token/authorize.xml => authorize - supply a payment method token also
POST https://spreedlycore.com/v1/payment_methods => Capture credit card from form - transparent redirect magic
GET https://spreedlycore.com/v1/payment_methods.xml => list all retained credit cards
GET https://spreedlycore.com/v1/payment_methods/token.xml => Details for a specific credit card
POST https://spreedlycore.com/v1/payment_methods/token/retain.xml => Store credit card info
POST https://spreedlycore.com/v1/payment_methods/token/redact.xml => Remove credit card info
POST https://spreedlycore.com/v1/payment_methods/token.xml => Update non-sensitive info about a credit card
GET https://spreedlycore.com/v1/payment_methods/token/transactions.xml => List transactions against a specific credit card
GET https://spreedlycore.com/v1/transactions.xml => List all transactions
GET https://spreedlycore.com/v1/transactions/token.xml => Details for a specific transaction
GET https://spreedlycore.com/v1/transactions/token/transcript => Raw transcript for a transaction
POST https://spreedlycore.com/v1/transactions/token/capture.xml => capture
POST https://spreedlycore.com/v1/transactions/token/void.xml => void
POST https://spreedlycore.com/v1/transactions/token/credit.xml => credit
POST https://spreedlycore.com/v1/transactions/token/purchase.xml => purchase using reference transaction
GET https://spreedlycore.com/v1/callbacks/[callback_id]/conversations.xml => Details of all conversations with a particular callback endpoint. Returned in transaction XML; not meant to be constructed directly.
Normal flow:
Form -> POST -> Redirect -> Call Purchase API -> Success
Offsite flow:
Form -> POST -> Redirect -> Call Purchase API -> Redirect to checkout_url -> Redirect URL OR callback received -> Lookup transaction to check for success
(The callback actually returns signed transaction data, so you can skip the lookup there if you'd like).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment