{"openapi":"3.1.0","info":{"title":"Venda Wallet API","version":"1.1.0","description":"Prepaid vendor cards for markets and events. The app never holds money: shoppers pay vendors by Zelle and Venda Wallet keeps the tally. Amounts are whole US cents; timestamps are UTC ISO 8601."},"servers":[{"url":"https://vendawallet.com/api/v1"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Create a key in the app under Settings, then send Authorization: Bearer vw_... Each key has scopes; see x-required-scope on each operation."},"connect":{"type":"oauth2","description":"Connect with Venda: authorization code with PKCE (S256), no client registration. Send client_name with the request. The token is a long-lived API key the person can remove in Settings.","flows":{"authorizationCode":{"authorizationUrl":"https://vendawallet.com/app/connect","tokenUrl":"https://vendawallet.com/api/v1/connect/token","scopes":{"account:read":"See your account","account:write":"See and change your account","wallet:read":"See your wallet","wallet:write":"See and change your wallet","vendor:read":"See your stall","vendor:write":"See and change your stall","organizer:read":"See your markets","organizer:write":"See and change your markets","rent:read":"See your rent receipts","rent:write":"See and change your rent receipts","webhooks:read":"See webhooks","webhooks:write":"See and change webhooks"}}}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]},"Money":{"type":"integer"},"WebhookEvent":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"created_at":{"type":"string"},"api_version":{"type":"string"},"data":{"type":"object"}},"required":["id","type","created_at","data"]}}},"paths":{"/auth/email/start":{"post":{"summary":"Send a 6-digit sign-in code by email","tags":["Sign-in"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"turnstile":{"type":"string"}},"required":["email","turnstile"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/email/verify":{"post":{"summary":"Check a sign-in code and start a session","tags":["Sign-in"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"code":{"type":"string"}},"required":["email","code"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/signout":{"post":{"summary":"End the session","tags":["Sign-in"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me":{"get":{"summary":"The caller, their vendors and the events they organize","tags":["Account"],"x-required-scope":"account:read","security":[{"apiKey":["account:read"]},{"connect":["account:read"]},{}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update the name on the caller's bank account","tags":["Account"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"account:write","security":[{"apiKey":["account:write"]},{"connect":["account:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"bank_name":{"type":"string"}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/notifications":{"get":{"summary":"Recent notifications","tags":["Account"],"x-required-scope":"account:read","security":[{"apiKey":["account:read"]},{"connect":["account:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/directory":{"get":{"summary":"Vendors across events. Query: event, category, q","tags":["Directory"],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/events/{slug}":{"get":{"summary":"One market or event","tags":["Directory"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/events":{"get":{"summary":"Markets and events. Query: q searches every US farmers market by name, city, state or ZIP (up to 50)","tags":["Directory"],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendors/{slug}":{"get":{"summary":"One vendor by slug or ID","tags":["Directory"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendors/{id}/remove-listing":{"post":{"summary":"The business asks for its unclaimed listing to be removed","tags":["Directory"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"account:write","security":[{"apiKey":["account:write"]},{"connect":["account:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"boolean"},"note":{"type":"string"}},"required":["confirm"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/cards":{"get":{"summary":"The caller's cards with balances","tags":["Shopper"],"x-required-scope":"wallet:read","security":[{"apiKey":["wallet:read"]},{"connect":["wallet:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Get a card for a vendor","tags":["Shopper"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"wallet:write","security":[{"apiKey":["wallet:write"]},{"connect":["wallet:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"vendor_id":{"type":"string"},"vendor_slug":{"type":"string"}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/cards/order":{"put":{"summary":"Set the order of the caller's cards in their wallet, first to last","tags":["Shopper"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"wallet:write","security":[{"apiKey":["wallet:write"]},{"connect":["wallet:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"card_ids":{"type":"array","items":{"type":"string"}}},"required":["card_ids"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/cards/{id}":{"get":{"summary":"One card with its activity","tags":["Shopper"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"wallet:read","security":[{"apiKey":["wallet:read"]},{"connect":["wallet:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/activity":{"get":{"summary":"Activity across all the caller's cards, newest first","tags":["Shopper"],"x-required-scope":"wallet:read","security":[{"apiKey":["wallet:read"]},{"connect":["wallet:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/cards/{id}/topups":{"post":{"summary":"Tell the vendor you sent money by Zelle. Usable after the vendor confirms.","tags":["Shopper"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"wallet:write","security":[{"apiKey":["wallet:write"]},{"connect":["wallet:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"integer","description":"Whole US cents","minimum":1},"bank_name":{"type":"string"}},"required":["amount"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/topups/{id}/remind":{"post":{"summary":"Ask the vendor to check again after Not yet","tags":["Shopper"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"wallet:write","security":[{"apiKey":["wallet:write"]},{"connect":["wallet:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/cards/{id}/pay":{"post":{"summary":"Pay a vendor from the directory","tags":["Shopper"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"wallet:write","security":[{"apiKey":["wallet:write"]},{"connect":["wallet:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"integer","description":"Whole US cents","minimum":1}},"required":["amount"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/charge-requests/pending":{"get":{"summary":"Charges waiting for the caller's approval","tags":["Shopper"],"x-required-scope":"wallet:read","security":[{"apiKey":["wallet:read"]},{"connect":["wallet:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/charge-requests/{id}/approve":{"post":{"summary":"Approve a charge, or split it with cash or Zelle","tags":["Shopper"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"wallet:write","security":[{"apiKey":["wallet:write"]},{"connect":["wallet:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"split":{"type":"boolean"},"rest_method":{"enum":["cash","zelle"]}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/charge-requests/{id}/decline":{"post":{"summary":"Decline a charge","tags":["Shopper"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"wallet:write","security":[{"apiKey":["wallet:write"]},{"connect":["wallet:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"enum":["declined","add_first"]}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ledger/{id}":{"get":{"summary":"A receipt","tags":["Shopper"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"wallet:read","security":[{"apiKey":["wallet:read"]},{"connect":["wallet:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ledger/{id}/flag":{"post":{"summary":"Report a problem with a receipt","tags":["Shopper"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"wallet:write","security":[{"apiKey":["wallet:write"]},{"connect":["wallet:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"},"details":{"type":"string"}},"required":["reason"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/cards/{id}/gifts":{"post":{"summary":"Send a gift card from your balance","tags":["Shopper"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"wallet:write","security":[{"apiKey":["wallet:write"]},{"connect":["wallet:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"integer","description":"Whole US cents","minimum":1},"to_name":{"type":"string"},"to_email":{"type":"string"},"note":{"type":"string"}},"required":["amount","to_name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/gifts/{token}":{"get":{"summary":"A gift card","tags":["Shopper"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/gifts/{token}/claim":{"post":{"summary":"Add a gift card to the caller's wallet","tags":["Shopper"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"wallet:write","security":[{"apiKey":["wallet:write"]},{"connect":["wallet:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendor/setup":{"post":{"summary":"Set up a vendor","tags":["Vendor"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"vendor:write","security":[{"apiKey":["vendor:write"]},{"connect":["vendor:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"event_ids":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"sells":{"type":"string"},"category":{"type":"string"},"booth":{"type":"string"},"zelle_address":{"type":"string"},"zelle_name":{"type":"string"},"color":{"type":"string"},"claim_vendor_id":{"type":"string"},"accept_vendor_terms":{"type":"boolean"},"zelle_business":{"type":"boolean"}},"required":["name","zelle_address","zelle_name","accept_vendor_terms","zelle_business"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendor":{"get":{"summary":"The caller's vendor","tags":["Vendor"],"x-required-scope":"vendor:read","security":[{"apiKey":["vendor:read"]},{"connect":["vendor:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Edit the vendor's card","tags":["Vendor"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"vendor:write","security":[{"apiKey":["vendor:write"]},{"connect":["vendor:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"sells":{"type":"string"},"website":{"type":"string"},"bank":{"type":"string"},"category":{"type":"string"},"booth":{"type":"string"},"color":{"type":"string"},"card_style":{"enum":["solid","photo"]},"card_texture":{"enum":["glass","beams","rays","grain","waves","silk","linen","dots","carbon","plain"]}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendor/events":{"put":{"summary":"Set the markets and events the vendor sells at (can be none)","tags":["Vendor"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"vendor:write","security":[{"apiKey":["vendor:write"]},{"connect":["vendor:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"event_ids":{"type":"array","items":{"type":"string"}}},"required":["event_ids"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendor/today":{"get":{"summary":"Today's sales, money added, credit held and Zelle payments to confirm","tags":["Vendor"],"x-required-scope":"vendor:read","security":[{"apiKey":["vendor:read"]},{"connect":["vendor:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendor/activity":{"get":{"summary":"Recent balance changes. Query: after (ledger ID)","tags":["Vendor"],"x-required-scope":"vendor:read","security":[{"apiKey":["vendor:read"]},{"connect":["vendor:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendor/charges":{"post":{"summary":"Charge a scanned pay code","tags":["Vendor"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"vendor:write","security":[{"apiKey":["vendor:write"]},{"connect":["vendor:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"integer","description":"Whole US cents","minimum":1},"code":{"type":"string"},"topup_action":{"enum":["confirm","skip"]}},"required":["amount","code"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendor/charge-requests/{id}":{"get":{"summary":"Status of a charge waiting for approval","tags":["Vendor"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"vendor:read","security":[{"apiKey":["vendor:read"]},{"connect":["vendor:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendor/topups":{"get":{"summary":"Money shoppers say they sent by Zelle","tags":["Vendor"],"x-required-scope":"vendor:read","security":[{"apiKey":["vendor:read"]},{"connect":["vendor:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendor/topups/{id}/confirm":{"post":{"summary":"Confirm money added after checking your bank","tags":["Vendor"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"vendor:write","security":[{"apiKey":["vendor:write"]},{"connect":["vendor:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendor/topups/{id}/not-yet":{"post":{"summary":"Say a Zelle payment hasn't arrived yet","tags":["Vendor"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"vendor:write","security":[{"apiKey":["vendor:write"]},{"connect":["vendor:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendor/customers":{"get":{"summary":"Card holders and balances","tags":["Vendor"],"x-required-scope":"vendor:read","security":[{"apiKey":["vendor:read"]},{"connect":["vendor:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendor/customers/{card_id}":{"get":{"summary":"One customer: balance, totals, Zelle payments to confirm and activity","tags":["Vendor"],"parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"vendor:read","security":[{"apiKey":["vendor:read"]},{"connect":["vendor:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendor/ledger/{id}/refund":{"post":{"summary":"Refund a payment to the shopper's card, all that's left or part; refunds can't add up past what was paid","tags":["Vendor"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"vendor:write","security":[{"apiKey":["vendor:write"]},{"connect":["vendor:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"integer","description":"Whole US cents. Leave out to refund all that's left","minimum":1},"reason":{"type":"string"}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/vendor/customers/{card_id}/cash-out":{"post":{"summary":"Take money off a card after sending it back to the customer by Zelle","tags":["Vendor"],"parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"vendor:write","security":[{"apiKey":["vendor:write"]},{"connect":["vendor:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"integer","description":"Whole US cents. Leave out for the whole balance","minimum":1},"reason":{"type":"string"},"sent":{"type":"boolean","description":"Must be true: you already sent it by Zelle"}},"required":["sent"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizer/events":{"get":{"summary":"Events the caller organizes","tags":["Organizer"],"x-required-scope":"organizer:read","security":[{"apiKey":["organizer:read"]},{"connect":["organizer:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizer/events/{id}":{"get":{"summary":"Event details and the vendors who sell there","tags":["Organizer"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"organizer:read","security":[{"apiKey":["organizer:read"]},{"connect":["organizer:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizer/events/{id}/vendors":{"post":{"summary":"List a vendor who isn't on Venda Wallet yet","tags":["Organizer"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"organizer:write","security":[{"apiKey":["organizer:write"]},{"connect":["organizer:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"sells":{"type":"string"},"category":{"type":"string"},"booth":{"type":"string"}},"required":["name","category"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizer/events/{id}/vendors/import":{"post":{"summary":"List many vendors from CSV: name, sells, category, booth","tags":["Organizer"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"organizer:write","security":[{"apiKey":["organizer:write"]},{"connect":["organizer:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string"},"dry_run":{"type":"boolean"}},"required":["csv"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/organizer/vendors/{id}/unlist":{"post":{"summary":"Remove a listing nobody has claimed","tags":["Organizer"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"organizer:write","security":[{"apiKey":["organizer:write"]},{"connect":["organizer:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/events":{"get":{"summary":"Every webhook event with what it means","tags":["Webhooks"],"x-required-scope":"webhooks:read","security":[{"apiKey":["webhooks:read"]},{"connect":["webhooks:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks":{"get":{"summary":"The caller's webhooks","tags":["Webhooks"],"x-required-scope":"webhooks:read","security":[{"apiKey":["webhooks:read"]},{"connect":["webhooks:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Add a webhook. The answer has its signing secret, shown this once","tags":["Webhooks"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"webhooks:write","security":[{"apiKey":["webhooks:write"]},{"connect":["webhooks:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Public https address"},"events":{"type":"array","items":{"type":"string"},"description":"Event names, or [\"*\"] for all"},"description":{"type":"string"}},"required":["url"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}":{"patch":{"summary":"Change a webhook, or turn it off and on","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"webhooks:write","security":[{"apiKey":["webhooks:write"]},{"connect":["webhooks:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"enabled":{"type":"boolean"}},"required":[]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a webhook","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"webhooks:write","security":[{"apiKey":["webhooks:write"]},{"connect":["webhooks:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/test":{"post":{"summary":"Send a ping event now","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"x-required-scope":"webhooks:write","security":[{"apiKey":["webhooks:write"]},{"connect":["webhooks:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{id}/deliveries":{"get":{"summary":"The last 50 deliveries and how they went","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"webhooks:read","security":[{"apiKey":["webhooks:read"]},{"connect":["webhooks:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/connect/token":{"post":{"summary":"Connect with Venda: swap a one-time code (with its PKCE verifier) for an API key","tags":["Connect"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retry safely: the first answer is replayed for 24 hours"}],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"grant_type":{"enum":["authorization_code"]},"code":{"type":"string"},"redirect_uri":{"type":"string"},"code_verifier":{"type":"string"}},"required":["grant_type","code","redirect_uri","code_verifier"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"topup.claimed":{"post":{"summary":"A buyer says they sent you money by Zelle. Check your bank, then confirm it.","parameters":[{"name":"Venda-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the webhook secret>"},{"name":"Venda-Event","in":"header","required":true,"schema":{"type":"string"}},{"name":"Venda-Delivery","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx answer marks it delivered"}}}},"topup.reminded":{"post":{"summary":"A buyer asks you to check again after you said Not yet.","parameters":[{"name":"Venda-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the webhook secret>"},{"name":"Venda-Event","in":"header","required":true,"schema":{"type":"string"}},{"name":"Venda-Delivery","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx answer marks it delivered"}}}},"topup.confirmed":{"post":{"summary":"Money added was confirmed and is on the buyer's card.","parameters":[{"name":"Venda-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the webhook secret>"},{"name":"Venda-Event","in":"header","required":true,"schema":{"type":"string"}},{"name":"Venda-Delivery","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx answer marks it delivered"}}}},"payment.created":{"post":{"summary":"A buyer paid you from their card (scanned, approved or from the directory).","parameters":[{"name":"Venda-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the webhook secret>"},{"name":"Venda-Event","in":"header","required":true,"schema":{"type":"string"}},{"name":"Venda-Delivery","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx answer marks it delivered"}}}},"charge_request.updated":{"post":{"summary":"A charge waiting for the buyer was approved or declined.","parameters":[{"name":"Venda-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the webhook secret>"},{"name":"Venda-Event","in":"header","required":true,"schema":{"type":"string"}},{"name":"Venda-Delivery","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx answer marks it delivered"}}}},"refund.created":{"post":{"summary":"You refunded a payment back to a buyer's card.","parameters":[{"name":"Venda-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the webhook secret>"},{"name":"Venda-Event","in":"header","required":true,"schema":{"type":"string"}},{"name":"Venda-Delivery","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx answer marks it delivered"}}}},"cash_out.created":{"post":{"summary":"You took money off a card after sending it back by Zelle.","parameters":[{"name":"Venda-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"t=<unix seconds>,v1=<hex HMAC-SHA256 of `${t}.${body}` with the webhook secret>"},{"name":"Venda-Event","in":"header","required":true,"schema":{"type":"string"}},{"name":"Venda-Delivery","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx answer marks it delivered"}}}}}}