{"openapi":"3.1.0","info":{"title":"Doname API","version":"1.0.0","summary":"Public read API for Doname causes.","description":"Doname is an open source tool for causes in Latin America to receive monthly and one-time donations with 0% platform fee. This API lists approved public cause pages. Creating a page, donating, and contacting the team happen on the website so a person can confirm the story and the payment.","contact":{"name":"Doname","url":"https:\/\/dona.me\/contacto","email":"alfonso@vexilo.com"},"license":{"name":"MIT","url":"https:\/\/github.com\/alfonsobries\/doname"}},"servers":[{"url":"https:\/\/dona.me","description":"This Doname instance"}],"tags":[{"name":"causes","description":"Approved public cause pages."}],"paths":{"\/api\/v1\/causes":{"get":{"operationId":"listCauses","tags":["causes"],"summary":"List public causes","description":"Returns every approved cause, ordered by monthly supporters, descending. Unapproved or unpublished pages are omitted.","parameters":[],"responses":{"200":{"description":"Approved public causes.","content":{"application\/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Cause"}}}}}}}}}},"\/api\/v1\/causes\/{slug}":{"get":{"operationId":"getCause","tags":["causes"],"summary":"Get a public cause","description":"Returns one approved cause by slug. Unknown or unpublished slugs return 404.","parameters":[{"name":"slug","in":"path","required":true,"description":"Cause slug, matching the subdomain of the public page.","schema":{"type":"string","minLength":1,"example":"patitas-libres"}}],"responses":{"200":{"description":"The approved cause.","content":{"application\/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#\/components\/schemas\/Cause"}}}}}},"404":{"description":"No approved cause uses that slug.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorMessage"}}}}}}},"\/api\/v1\/causes\/{slug}\/quote":{"post":{"operationId":"quoteDonation","tags":["causes"],"summary":"Quote a donation","description":"Returns the fee breakdown for a donor's choices. The client sends choices, never final amounts. Amounts are integer minor units.","parameters":[{"name":"slug","in":"path","required":true,"description":"Cause slug, matching the subdomain of the public page.","schema":{"type":"string","minLength":1,"example":"patitas-libres"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["donation_amount","tip_choice","cover_fees","payment_method","frequency"],"properties":{"donation_amount":{"type":"integer","minimum":1,"description":"Donation to the cause in minor units."},"tip_choice":{"type":"string","description":"none, preset:0, or custom:<minor>.","examples":["none","preset:0","custom:1000"]},"cover_fees":{"type":"boolean"},"payment_method":{"type":"string","enum":["card","oxxo","spei","ach"]},"frequency":{"type":"string","enum":["one_time","monthly","quarterly","yearly","weekly"]},"fee_table_version":{"type":["string","null"]},"locale":{"type":["string","null"],"enum":["es","en"]}}}}}},"responses":{"200":{"description":"Fee breakdown. The UI only paints these numbers.","content":{"application\/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#\/components\/schemas\/FeeBreakdown"}}}}}},"404":{"description":"No published cause uses that slug.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ErrorMessage"}}}},"422":{"description":"Amount, tip or method is not allowed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/FeeQuoteError"}}}}}}}},"components":{"schemas":{"Cause":{"type":"object","additionalProperties":false,"required":["name","slug","url","headline","about","category","city","founded_year","monthly_supporters_count","monthly_amounts","accepts_one_time","avatar_url","cover_url"],"properties":{"name":{"type":"string","description":"Public name of the cause.","examples":["Patitas Libres"]},"slug":{"type":"string","description":"URL slug. The public page lives at {slug}.dona.me.","examples":["patitas-libres"]},"url":{"type":"string","format":"uri","description":"Absolute URL of the cause page."},"headline":{"type":["string","null"],"description":"Short public headline."},"about":{"type":["string","null"],"description":"Longer public story of the cause."},"category":{"type":["string","null"],"description":"Cause category key."},"city":{"type":["string","null"],"description":"City where the cause operates."},"founded_year":{"type":["integer","null"],"description":"Year the cause started."},"monthly_supporters_count":{"type":"integer","minimum":0,"description":"How many people currently give every month."},"monthly_amounts":{"type":"array","items":{"type":"integer"},"description":"Suggested monthly amounts in minor units (cents) of the cause currency. $50 MXN is 5000."},"accepts_one_time":{"type":"boolean","description":"Whether the cause also accepts one-time donations."},"avatar_url":{"type":["string","null"],"format":"uri"},"cover_url":{"type":["string","null"],"format":"uri"}}},"ErrorMessage":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}},"FeeBreakdown":{"type":"object","additionalProperties":false,"required":["donation_amount","tip_amount","fee_cover_amount","stripe_fee_estimate","total","application_fee_amount","cause_net_estimate","currency","platform","fee_table_version"],"properties":{"donation_amount":{"type":"integer","description":"Amount to the cause in minor units."},"tip_amount":{"type":"integer","description":"Tip to Doname in minor units. This is the application fee."},"fee_cover_amount":{"type":"integer"},"stripe_fee_estimate":{"type":"integer","description":"Estimated Stripe processing fee for a national card, including tax on mx."},"total":{"type":"integer"},"application_fee_amount":{"type":"integer"},"cause_net_estimate":{"type":"integer"},"currency":{"type":"string","enum":["MXN","USD"]},"platform":{"type":"string","enum":["mx","us"]},"fee_table_version":{"type":"string"}}},"FeeQuoteError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string"},"code":{"type":"string"}}}}}}