JSON API » charges » charges/charge
Charges an existing charge immediately. This should normally only be called after charges/create and setting any required taxes. If the charge's period is set to once, the entire amount is charged. If set to monthly, quarterly, or annually, a pro-rata amount is charged. A transaction is recorded and the customer(s) balance(s) is/are updated.
Input parameters
Requires authentication and the commerce role privilege.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
id | Integer | ID of charge to charge. | Yes |
Responses
Code | Description |
---|---|
204 | Success. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
404 | The charge does not exist, or you do not have permission to view it. |
Data returned
No data is returned.
Example: With required parameters
{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }
Change history
Version | Changes |
---|---|
3.13 | Function added. |