Set the payment method for an invoice
POST/api/v3/invoice/:invoice_id/_action/setPayMethod
Set the payment method for an invoice.
- If the invoice was created from a subscription, this updates the subscription payment method.
- If the invoice has scheduled payments attached, this updates the payment method for the attached scheduled payments.
- If the invoice is not from an invoice, and has no attached scheduled payments, this method does nothing.
If you want to remove any payment methods from the scheduled payments/subscription, you can set a payment method of paymethod: "inv"
.
Request
Path Parameters
invoice_id integerrequired
The ID # of the invoice
- application/json
Body
_comment string
paymethod string
Possible values: [crd
, ach
, tok
, inv
]
creditcard_id integernullable
ach_id integernullable
tokenized_id integernullable
Responses
- 200
- 400
- 401
Action completed successfully
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
code integer
status string
message stringnullable
details objectnullable
response boolean
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 200,
"status": "OK",
"message": "",
"details": {},
"response": true
}
Bad request
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
code integer
status string
message stringnullable
details objectnullable
response boolean
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 400,
"status": "Error",
"message": "Missing or invalid parameter.",
"details": {},
"response": false
}
Authentication error
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
code integer
status string
message stringnullable
details objectnullable
response boolean
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 401,
"status": "Error",
"message": "Invalid or incorrect authorization [Missing (basic) authorization header.]",
"details": {},
"response": false
}
Loading...