Make a payment
POST/api/v3/transaction/_action/pay
Attempt to make a payment for a customer, using a credit card.
If you specify one or more paymethods
then those specific payment methods will be used.
If you do not specify, then:
- If the invoice is from a subscription, the payment method for the subscription will be tried.
- Otherwise, if the customer has a default payment method specified, the default payment method will be tried.
- Otherwise, all payment methods for the customer will be tried.
Alternatively, you can specify an existing creditcard_id
or ach_id
within paymethods
if you wish to attempt the transaction on an existing pay method.
Valid paymethods
values:
- New credit card
- New ACH
- Existing
creditcard_id
- Existing
ach_id
The returned id
value will be the transaction_id
value of the resulting transaction.
Requirements
- You must specify an existing
customer_id
,customer_token
, orcustomer_external_key
. - You must specify either an
amount
or at least oneinvoice_id
to pay.
Attempt to make a payment for a customer, using a bank account (ACH/direct debit/PAD).
Note that bank account payments (ACH/direct debit/PAD) do not return a real-time response from the bank. Payments will go to a "Pending" status, and take an average of 2-5 business days to settle (or be returned by the bank), at which time the status will update to either "Success" or "Failed (decline)".
If you specify one or more paymethods
then those specific payment methods will be used.
If you do not specify, then:
- If the invoice is from a subscription, the payment method for the subscription will be tried.
- Otherwise, if the customer has a default payment method specified, the default payment method will be tried.
- Otherwise, all payment methods for the customer will be tried.
Alternatively, you can specify an existing creditcard_id
or ach_id
within paymethods
if you wish to attempt the transaction on an existing pay method.
Valid paymethods
values:
- New credit card
- New ACH
- Existing
creditcard_id
- Existing
ach_id
The returned id
value will be the transaction_id
value of the resulting transaction.
Requirements
- You must specify an existing
customer_id
,customer_token
, orcustomer_external_key
. - You must specify either an
amount
or at least oneinvoice_id
to pay.
Attempt to make a payment for a customer, against a scheduled payment or installment.
If you are using ChargeOver's scheduled payments features (scheduling payments or installments against an invoice) then you can take payments using the API, against a particular scheduled payment.
You will specify the invoice_schedule_id
of the scheduled payment you want to pay against, along with
the amount of the payment to apply to that scheduled payment.
Request
- application/json
Body
applied_to
object
0
object
paymethods
object
0
object
1
object
2
object
Responses
- 200
- 400
- 401
Action completed successfully
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
{
"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": 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": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 401,
"status": "Error",
"message": "Invalid or incorrect authorization [Missing (basic) authorization header.]",
"details": {},
"response": false
}