Get automatic payments
Overview
Returns the account's saved cards and PayPal accounts in methods, the default first, and enabled, whether every service and postpaid invoice is charged to the default method when it is due. While enabled is false, each service renews the way it was set with the automatic payment endpoint.
pays_from_credit says whether the account credit pays as much of every invoice as it can when it is due, with automatic payments on or off, and the rest is paid the usual way. While it is on, or while automatic payments are on, it replaces each service's own credit setting. credit_available is false where account credit is not offered.
A method's service_ids are the services that renew from it on their own. cards_available and paypal_available say which methods can be added on this installation. Methods are added in the browser, where the customer confirms them with their bank or PayPal, so there is no endpoint for it. A new card is checked with a small hold that is released straight away.
Permissions
Requires the account permission billing.read (View billing).
Authorization
Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.
Send it as Bearer <token>.
Response 200
application/jsonThe record, as a JSON object. There is no envelope.
Whether every service and postpaid invoice is charged to the default method.
Whether the account credit pays as much of every invoice as it can when it is due, with automatic payments on or off.
Whether that can be chosen: account credit is offered and the billing system can apply it to every service.
Saved cards and PayPal accounts, the default first.
Show child attributesHide child attributes
The uuid UUID.
The value of uuid_short.
card or paypal.
How the method is named, such as "Visa ending 4242" or the PayPal account's email address.
The card network as Stripe names it, such as visa or amex. Null for PayPal.
A card's last four digits, null for PayPal.
A card's expiry as MM/YY, null for PayPal.
Whether everything is charged to this method while automatic payments are on for the whole account.
The services whose renewals are charged to it on their own.
The date and time for created at, in UTC.
Whether a card can be added, and whether a PayPal account can.
The value of paypal_available.
Errors
- 401
- The key was missing, malformed, revoked, or belongs to an account that no longer exists.
- 403
- Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
- 429
- Too many requests. The
Retry-Afterheader says how many seconds to wait. Limits are per account, so several keys on one account share them.
Still stuck? Contact our team
View as Markdown