Skip to main content

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.

  1. Get a hosted form URL from Rev.io. GET /payment-accounts/account-form
  2. 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.
  3. Store the token on the customer. POST /payment-accounts/cards (Paya) or POST /payment-accounts/cards/trx (TRX)
  4. Charge it. POST /payments
  5. 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​

TermWhat it isWhere 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 customerId you 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​

StepEndpointReference
Get hosted formGET /billing/api/v1/payment-accounts/account-formGet Account Form
Store a Paya cardPOST /billing/api/v1/payment-accounts/cardsCreate Card
Store a TRX cardPOST /billing/api/v1/payment-accounts/cards/trxCreate TRX Card
Store a bank accountPOST /billing/api/v1/payment-accounts/bank-accountsCreate Bank Account
List stored accountsGET /billing/api/v1/payment-accounts/{customerId}Get Payment Accounts
List payment methodsGET /billing/api/v1/payment-methodsGet Payment Methods
Take a paymentPOST /billing/api/v1/paymentsCreate Payment
AutopayGET / POST /billing/api/v1/customers/{customerId}/autopayGet Autopay, Update Autopay

All examples use https://api.psarev.io and assume $TOKEN holds your JWT.