Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the webhook documentation #118

Open
andywwright opened this issue Jan 15, 2020 · 2 comments
Open

Update the webhook documentation #118

andywwright opened this issue Jan 15, 2020 · 2 comments

Comments

@andywwright
Copy link

The actual webhook event looks nothing like in the docs and it differs depending on the other party (i.e. webhook for a movement from a pot would be quite different from webhook for a faster payment).

The code below is a cut from a real working app in Rust and as you can see it is very different from one in the docs:

struct Data {
  id: String,
  created: String,
  description: String,
  amount: i64,
  fees: Fees,
  currency: String,
  merchant: ::serde_json::Value,
  notes: String,
  metadata: Metadata,
  labels: ::serde_json::Value,
  account_balance: i64,
  attachments: ::serde_json::Value,
  international: ::serde_json::Value,
  category: String,
  categories: ::serde_json::Value,
  is_load: bool,
  settled: String,
  local_amount: i64,
  local_currency: String,
  updated: String,
  account_id: String,
  user_id: String,
  counterparty: Counterparty,
  scheme: String,
  dedupe_id: String,
  originator: bool,
  include_in_spending: bool,
  can_be_excluded_from_breakdown: bool,
  can_be_made_subscription: bool,
  can_split_the_bill: bool,
  can_add_to_tab: bool,
  amount_is_pending: bool,
}

struct Fees {}

struct Metadata {
  faster_payment: String,
  fps_fpid: String,
  fps_payment_id: String,
  insertion: String,
  notes: String,
  trn: String,
}

struct Counterparty {
  account_number: String,
  name: String,
  sort_code: String,
  user_id: String,
}
@sjasct
Copy link

sjasct commented Aug 6, 2020

+1

On top of webhooks, a number of other response examples need updating as well. From what I could find, the following responses have been updated with 0 documentation on the docs site:

  • Transaction
    • Including the new virtual card object
  • Transaction Merchant + address
  • Counter Party
  • Balance
  • Pot

@Matthew-Beckett
Copy link

The webhook documentation is also missing endpoints which webhooks are coming from, adding this would be helpful for verifying incoming requests as genuine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants