Is it possible to push payments through Xero’s Payments API in Retool? 🤔

Hey Retool community! :wave:

I’m building a single interface to handle client payments from our app into Xero (and out through GoCardless/Wise/Stripe). Before I dive in, I want to make sure this “push payment” flow is supported:

OAuth2 setup: Using Retool’s REST resource with Xero’s authorize/token URLs
POST /Payments: Sending JSON like:

{
  "Payments": [{
    "Invoice":  { "InvoiceID": "<invoice-id>" },
    "Account":  { "AccountID": "<bank-account-id>" },
    "Date":     "YYYY-MM-DD",
    "Amount":   123.45,
    "Reference":"Retool push"
  }]
}

Payment Services: Xero is already connected to GoCardless/Wise/Stripe
Flow I expect:

  1. Form → Retool POST to Xero
  2. Xero pushes to our linked provider
  3. Bank feed comes back, we reconcile in our PMS

I’ve read a bunch of posts about sending invoices and querying the API to pull data, but haven’t found anything on actually pushing payments from Retool. If there already exists documentation on this, forgive my ignorance and please point me in the right direction.

  1. Has anyone successfully driven real “push payments” via Retool → Xero?
  2. Are there any gotchas around Payment Services or idempotency keys?
  3. Best practices for polling vs. webhooks on bank feeds after the POST?

TIA for any examples, sample queries, or pointers! :pray:

Hi there @ArT1,

I've frequently used Xero's endpoints and I'm familiar with the documentation. I don't think I've ever seen a way for Xero to push to linked providers though.

In fact, the POST /Payments API endpoint in Xero only records a payment as having been made — it’s a bookkeeping operation.

Unless I'm mistaken, when you talk about your linked providers, you are referring to this functionality, right? If so, I haven't seen any other functionality apart from Xero adding a Pay button to the invoice, linked to those providers.

Assuming the above is accurate, you will have to push payments directly using your provider's API, e.g.

  1. Form - Retool Post Invoice to Xero (Status Authorized)
  2. Push payment via Stripe/Wise
  3. Receive payment confirmation and update Xero's invoice status with payment data (for this part, you may want to set up a workflow that receives the webhook triggered upon payment)

This is just me thinking out loud, there may be other ways to achieve this, but I'm almost 100% sure that what you asked for (i.e. Xero pushing payments directly to linked providers) is not possible.

Hope this helps!

1 Like

This has definitely helped. Thank you so much for your the detailed answer.

1 Like