Automate payments with flows
Everything the payment screen does is driven by records, so Salesforce Flow can drive it too. An automation can create a Pay Order and have REDA Pay process it in the background, pay an owner when a statement is posted, email a payment link the moment it is created, or alert finance when a payment is rejected. This article lists the hooks REDA Pay exposes to flows and the rules each one needs. No code is required; for Apex, see Apex API for developers.
Hook 1 — Process Pay Order: charge an order created by automation
A Pay Order saved with the checkbox Process Pay Order ticked is processed by REDA Pay in the background, exactly as if Pay had been pressed on screen. The order must be complete and valid:
| Field | Value |
|---|---|
| Pay Profile | An active profile |
| Pay Customer | A customer on that profile, registered with Payload (has paid or been synced before) |
| Processing Account | An active account on the profile that allows the transfer type |
| Pay Method | An active, reusable method of that customer that allows the transfer type (bank account for disbursements) |
| Transfer Type | Receipt or Disbursement |
| Order Type | Immediate |
| Principal Amount | The amount |
| Process Pay Order | ticked |
Save the record; a batch starts within moments and the order gets its Pay Transaction and Processed Datetime. If the order is already processed, saving with the flag is refused with "Pay Order is already processed." A failure produces a failed transaction under the order, like a failed screen payment. Fees are calculated from the account's Fee Setups on save, as on screen.
Flag one order per operation. The background processing is designed for single records: flag orders one at a time (one flow interview, one record), not in bulk from a data load. Bulk-flagging many orders in one save is not supported in this release.
A Flow pattern: a record-triggered flow on your billing record (an invoice, a charge, an owner statement) that, when it becomes due, Gets the Pay Customer for the Account, Gets the customer's Default Pay Method, Creates a Pay Order with the fields above, and sets Process Pay Order to true.
Hook 2 — Default Pay Method (Disbursement): find what to pay into
REDA Pay keeps Default Pay Method (Disbursement) on the Account, Contact and Lead in step with the Pay Customer's default method whenever the customer is allowed disbursements. A payout flow reads that lookup from the Account, checks it is not empty, and uses it as the Pay Order's Pay Method. Vendors fill it in themselves through Request bank details from a vendor.
Hook 3 — Attribute 1–4: carry your reference
Orders have four free-text Attribute fields, set by the payment component's settings or by the URL parameters rpay__att1–rpay__att4 — and by your flow when it creates the order. Use them to carry the invoice number, the lease, the property or the charge type, so a flow on the resulting Pay Transaction knows what was paid.
Hook 4 — Record-triggered flows on REDA Pay records
The records change in predictable ways; build flows on them:
| Trigger | Typical automation |
|---|---|
| Pay Transaction created with Status processed | Post the payment to your accounting records; email a receipt; update the invoice |
| Pay Transaction Status changes to rejected or declined | Alert collections; flag the customer |
| Pay Transaction created with Type refund | Reverse the posting |
| Pay Order created with Order Type Link | Email the customer the Link URL with the amount and Customer Notes — REDA Pay does not send it |
| Pay Order Status changes to Link - Processed | Close the request that needed the payment |
| Statement Activity Status changes to Completed | Notify finance that a deposit is ready to reconcile |
| REDA Pay Log created with Attention Needed | Post to a team channel |
When a flow reads Attribute 1–4 or the related Account, Contact and Lead on the order, it knows what the payment was for.
Hook 5 — The Update Payload Customer action
Flow Builder offers an Action named Update Payload Customer (an Apex action from the REDA Pay package). Give it a Pay Customer Id and it sends the customer's current name, email and phone to Payload and stores Payload's customer identifier if it was missing. REDA Pay's own flow calls it when a customer's details change; call it from your flow after you update a Pay Customer by automation.
REDA Pay's own flows can be replaced
REDA Pay's fifteen flows — defaults on new orders, fee selection, link activation, customer creation from a parent record, default-method propagation, notifications, the revoke and add-method screens — are marked overridable. An administrator can deactivate one and replace it with their own version, for example to send a different notification. Do this only when you need to; an upgrade of REDA Pay does not reverse your override, so you must reconcile changes yourself after each upgrade.
Worked example: pay owners on the 5th
A property manager pays each owner their net proceeds on the 5th of the month.
- A scheduled-triggered flow runs on the 5th over Owner Statement records with a positive balance.
- For each: Get the owner's Account; stop if Default Pay Method (Disbursement) is empty (create a task to request bank details); Get the Pay Customer for the Account on the profile.
- Create a Pay Order: Pay Profile, Pay Customer, Processing Account (the operating account), Pay Method (the default disbursement method), Transfer Type Disbursement, Order Type Immediate, Principal Amount = balance, Attribute 1 = the statement number, Process Pay Order = true.
- A second flow on Pay Transaction (Status processed, Type credit) marks the statement paid using Attribute 1.
Because disbursements are involved, the flow runs as a user with REDA Pay - Enable Disbursements ticked.
Mistakes to avoid
| Mistake | What happens | Fix |
|---|---|---|
| Flagging orders in bulk | Not supported; orders may be processed incorrectly | One order per operation |
| Creating an order for a customer never registered with Payload | Processing fails | Run Update Payload Customer or take one screen payment first |
| Flow user without the right permission set or switches | The order is refused ("You are not authorized to process disbursements.") | Run the flow as a user with REDA Pay - Admin User and the switches |
| Re-flagging a processed order | "Pay Order is already processed." | Create a new order |
| Overriding a REDA Pay flow and forgetting it at upgrade time | Your version keeps old logic | Keep a list of overridden flows |
FAQ
Yes: an Order Type Schedule order with the schedule fields set, a registered customer and an active method becomes Schedule - Active and runs with the daily job.
Yes: an Order Type Link order on an account with Link Site Public URL and Link Expiration (Minutes) gets its Link URL and activates on save; your flow can then email it.
No. Card and bank details are entered only on the screens (or through the Apex API by a developer). Flows work with saved Pay Methods.