Autopay
Autopay charges a stored payment account automatically. You need a paymentAccountId first. See Add a Card with Paya, Add a Card with TRX, or Add a Bank Account.
Check current enrollment
curl https://api.psarev.io/billing/api/v1/customers/123/autopay \
-H "Authorization: Bearer $TOKEN"
{
"isEnrolled": true,
"paymentAccountId": 4570,
"dayOfMonth": 15,
"lastProcessedDate": "2026-09-15"
}
Enroll or change the account
curl -X POST https://api.psarev.io/billing/api/v1/customers/123/autopay \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "isEnrolled": true, "paymentAccountId": 4570, "dayOfMonth": 15 }'
Returns 204 No Content.
| Field | Notes |
|---|---|
isEnrolled | true to enroll, false to cancel. |
paymentAccountId | Required when enrolling. Must belong to this customer. |
dayOfMonth | 1 to 28 to charge on a fixed day each month. Omit it to charge relative to each invoice's due date, using the tenant's autopay offset. |
Cancel autopay
curl -X POST https://api.psarev.io/billing/api/v1/customers/123/autopay \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "isEnrolled": false }'
Which account is on autopay?
Get Payment Accounts returns isAutopay: true on the enrolled account, so you can mark it in your UI without a second call.
Reference: Get Autopay, Update Autopay