Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Desigining the new GoCardless API
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Harry Marr
August 13, 2014
Technology
170
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Desigining the new GoCardless API
Harry Marr
August 13, 2014
More Decks by Harry Marr
See All by Harry Marr
Build your own Heroku
hmarr
1
130
CodeCube: Runnable Gists
hmarr
1
200
Other Decks in Technology
See All in Technology
Compose 新機能総まとめ / What's New in Jetpack Compose
yanzm
0
150
なぜ私たちのSREプラクティスはなかなか機能しないのか 〜システムより先に組織を見る〜 / Why our SRE practices aren't really working
vtryo
3
3.1k
NDIAS CTF 2026 問題解説会資料
bata_24
0
180
生成AIの活用/high_school2026
okana2ki
0
110
なぜ人は自分のプロジェクトを 「なんちゃってアジャイル」と 自嘲するのか
kozotaira
0
270
AIDLC_ヤフーショッピングの取り組み
lycorptech_jp
PRO
0
580
環境凍結という Toil を倒す -セルフサービス型 Ephemeral テスト環境の 設計と実践
shirouz
1
1.9k
AI時代のエンジニアキャリアについて今一度考える
sakamoto_582
2
1.4k
[2026-07-15] AI Ready なはずだったアーキテクチャと、見えてきた課題・次に目指す状態
wxyzzz
2
360
最適な自走を最小限の支援で — M&Aで拡大する組織で少人数SREが挑んだ1年 / SRE NEXT 2026
genda
0
690
攻撃者がいなくてもAIエージェントはインシデントを起こす
nomizone
0
210
Foxgloveについて 実際にExtensionを開発して公開するまでの話 / About Foxglove: The Story of Developing and Releasing an Extension
ry0_ka
0
190
Featured
See All Featured
Faster Mobile Websites
deanohume
310
32k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
380
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
310
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
How to train your dragon (web standard)
notwaldorf
97
6.7k
How GitHub (no longer) Works
holman
316
150k
Design in an AI World
tapps
1
260
Crafting Experiences
bethany
1
210
Optimizing for Happiness
mojombo
378
71k
Site-Speed That Sticks
csswizardry
13
1.2k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
360
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Transcript
Designing the new GoCardless API Harry Marr and Philip Harrison
None
GrouPAY API
GrAPI
None
1. Agile API development 2. Build your framework 3. Prepare
for change
HOW TO BUILD PRODUCTS
None
None
None
None
Work out what people want Build it
Work out what people want Build it Work out what
people really want
Work out what people want Build it Work out what
people really want
HOW TO BUILD APIS
Work out what people want Build it
Work out what people want Build it Work out what
people really want
Work out what people want Build it Work out what
people really want Uh oh!
Changing a product is easy Changing your API is hard
1. Agile API development 2. Build your framework 3. Prepare
for change
MAKING IT LAST
• Content Type • Document/url structure • TLS/SSL • Pagination
• Rate-limiting • Errors
CONTENT TYPE
{ "payment": { "xmlns": "urn:ns:payment", "amount": { "$t": 20000 },
"metadata": { "type": "metadata", "xmlns": "urn:ns:metadata", "description": { "$t": "Rent" } } } }
{ "payment": { "amount": 20000, "metadata": { "description": "Rent" }
} } https://www.mnot.net/blog/2012/04/13/json_or_xml_just_decide
DOCUMENT/URL STRUCTURE
{ "linked": { "author": { "id": "12" } }, "posts":
[{ "id": "1", "title": "API", "links": { "author": "12" } }] } http://jsonapi.org/format/
/customers/1/bank_accounts/2/mandates/1 Don’t map database relations to urls
/mandates?bank_account=2 /customer_bank_accounts?customer=1 Flexible relationships
TLS/SSL All traffic including web hooks https://istlsfastyet.com/
PAGINATION
/payments { "meta": { "cursors": { "after": "abcd1234", "before": "wxyz0987"
}, "limit": 50 }, "payments": [{ ... }] } /payments?limit=50&after=abcd1234
RATE-LIMITING
X-Rate-Limit-Limit: 5000 X-Rate-Limit-Remaining: 0 X-Rate-Limit-Reset: Thu, 01 May 2014 16:00:00
GMT Content-Type: application/json; charset=utf-8 Connection: keep-alive Retry-After: Thu, 01 May 2014 16:00:00 GMT
ERRORS
{ "error": { "documentation_url": “https://errors", "id": “ERROR_ID”, "type": "validation_failed”, "code":
422, "errors": [{ "field": "account_number", "type": "missing_field", "message": "is required" }] } }
GoCardless API design https://github.com/gocardless/http-api-design
1. Agile API development 2. Build your framework 3. Prepare
for change
Work out what people want Build it Work out what
people really want Uh oh!
Work out what people want Build it Work out what
people really want
✓ Adding resources ✓ Adding attributes ✗ Removing attributes ✗
Changing attributes ✗ Removing resources ✗ Changing behaviour
/v1
/v1
v1
2014-08-13
/2014-08-13
2014-08-13
You are currently using version 2014-‐05-‐12. ! Click here
to view all changes since 2014-‐05-‐12. To:
[email protected]
From:
[email protected]
GoCardless API Update Available
In summary, • Developing an API is hard • Think
about what you can’t change • And plan for incremental updates
QUESTIONS? ! @harrymarr @harrisonphilip