Saved Payments

GET /sales2/orders/bill/savedPayments?id={{billId}}

Returns the saved cards and verified ACH bank accounts that can be used to pay an invoice. These belong to the account (company) that the invoice's order is on. Pass an id from this list as saved_payment to Pay Invoice (POST /sales2/orders/bill/pay) to charge it.

Invoicing must be enabled on the store, and the invoice's order must be on an account.

Query Parameters

ParameterTypeRequiredDescription
idintegerYesThe invoice (bill) ID. This is the same ID used by /sales2/orders/bill/print.

Permissions

The API user's role needs the List Saved Payments For Invoice resource (sales/order/invoice/getBillSavedPayments).

Response

200 OK: an array of saved payments. The array is empty if the account has no saved payments that can be charged.

FieldTypeDescription
idstringReference to pass as saved_payment to Pay Invoice. Format: :.
typestringcard or ach.
methodstringPayment method the payment is saved under: cim, authorizenet, cryozonic_stripe, gene_braintree_creditcard, cryozonic_achpayments, or cryozonic_achpayments_ach.
labelstringDisplay label. Uses the nickname if one is set, otherwise e.g. Visa ending in 4242.
brandstringnull
last4stringnull
exp_monthstringnull
exp_yearstringnull

Only payment methods that AutoPay supports are listed (Authorize.Net CIM, Stripe, Braintree, Stripe ACH). ACH accounts that haven't been verified yet are left out.

Example Response

[
  {
    "id": "cim:11",
    "type": "card",
    "method": "cim",
    "label": "Visa ending in 1111",
    "brand": "Visa",
    "last4": "1111",
    "exp_month": "04",
    "exp_year": "2029"
  },
  {
    "id": "cryozonic_stripe:card_abc",
    "type": "card",
    "method": "cryozonic_stripe",
    "label": "Office card",
    "brand": "MasterCard",
    "last4": "4444",
    "exp_month": null,
    "exp_year": null
  },
  {
    "id": "cryozonic_achpayments:pm_bank_1",
    "type": "ach",
    "method": "cryozonic_achpayments",
    "label": "Chase ending in 6789",
    "brand": "Chase",
    "last4": "6789",
    "exp_month": null,
    "exp_year": null
  }
]

Errors

All errors return 400 Bad Request with a message.

CauseMessage
Invoicing is not enabled on the storeInvoicing is not enabled.
id is missing or not numericid must be an invoice ID.
No invoice with that IDInvoice with ID {id} not found.
The invoice's order is not on an accountThis invoice is not on an account. Saved payments can only be used for invoices on an account.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string

The invoice (bill) ID. This is the same ID used by /sales2/orders/bill/print.

Response
200

OK (no example documented yet)

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!