Payments Overview
This series shows how to store a payment method on a customer and charge it, using the same flow the Rev.io web app uses.
- Get a hosted form URL from Rev.io.
GET /payment-accounts/account-form - Show the form in an iframe. The customer types the card into a page hosted by your gateway (Paya or TRX). Card numbers never touch your servers or Rev.io's.
- Store the token on the customer.
POST /payment-accounts/cards(Paya) orPOST /payment-accounts/cards/trx(TRX) - Charge it.
POST /payments - Optional: enroll autopay.
POST /customers/{customerId}/autopay
Bank accounts (ACH) skip steps 1 and 2. See Add a Bank Account.
Two IDs you will need
| Term | What it is | Where you get it |
|---|---|---|
Payment account (paymentAccountId) | A stored card or bank account on one customer. | Returned when you create a card or bank account. List with Get Payment Accounts. |
Payment method (paymentMethodId) | A tenant-level "way to pay" such as Credit Card or ACH, with its fee rules. | Get Payment Methods. Pick the one with isCc: true for cards or isAch: true for bank accounts. |
Every payment needs both: the method says how, the account says with what.
Prerequisites
- A JWT on every call. See API Key Authentication.
- The API user's role must have Customer Billing access. Every endpoint in this series checks that permission.
- An active card processor (Paya or TRX) configured in Rev.io under System Settings > Billing Config > Payment Processors. Confirm with Get Payment Processor Settings. Payment methods and their fees live on the Payments tab of the same page.
- The
customerIdyou are working with. Browse with Customer Summaries, look one up with Get Customer, or type-ahead with Search Customers.
Which gateway is this tenant on?
Ask for the hosted form. The response tells you which processor will handle the card.
curl "https://api.psarev.io/billing/api/v1/payment-accounts/account-form?CustomerId=123" \
-H "Authorization: Bearer $TOKEN"
{ "url": "https://api.payaconnect.com/v2/accountform?...", "paymentProcessor": "Paya", "trackingGuid": "" }
paymentProcessor is Paya or Trx. Follow Add a Card with Paya or Add a Card with TRX accordingly. A 400 Customer does not have a supported payment processor configured. means no active Paya or TRX card processor applies to this customer.
Endpoints at a glance
| Step | Endpoint | Reference |
|---|---|---|
| Get hosted form | GET /billing/api/v1/payment-accounts/account-form | Get Account Form |
| Store a Paya card | POST /billing/api/v1/payment-accounts/cards | Create Card |
| Store a TRX card | POST /billing/api/v1/payment-accounts/cards/trx | Create TRX Card |
| Store a bank account | POST /billing/api/v1/payment-accounts/bank-accounts | Create Bank Account |
| List stored accounts | GET /billing/api/v1/payment-accounts/{customerId} | Get Payment Accounts |
| List payment methods | GET /billing/api/v1/payment-methods | Get Payment Methods |
| Take a payment | POST /billing/api/v1/payments | Create Payment |
| Autopay | GET / POST /billing/api/v1/customers/{customerId}/autopay | Get Autopay, Update Autopay |
All examples use https://api.psarev.io and assume $TOKEN holds your JWT.