Update Charge Keys
Updates the specified charge key(s).
| Verb | PATCH |
|---|---|
| Endpoint | {base-url}/credit/charge-key |
| Max Page Size | N/A |
Request Body
{
"body": [
{
"id": 160,
"gatewayId": 1,
"organizationId": 1,
"merchant": "VendNovation",
"name": "Main Street Diner - Primary",
"key": "025pk8fxrhh3PeJ04vO2uPtkATWju7qw"
}
]
}
Note
All changes in this request are atomic. If any item fails, the entire batch is rolled back and no changes are made.
Returns
On Success
Returns the updated charge keys.
Response Body
[
{
"id": 160,
"gatewayId": 1,
"organizationId": 1,
"merchant": "VendNovation",
"name": "Main Street Diner - Primary",
"key": "025pk8fxrhh3PeJ04vO2uPtkATWju7qw"
}
]
On Error
| HTTP Code | Error Code | Definition |
|---|---|---|
| 403 | DATA_ACCESS_VIOLATION | One or more of the specified charge key ids belong to an organization you do not have access to. The organizationId in the body cannot move a charge key between organizations and is ignored on update. |
| 404 | MISSING_RECORD | One or more of the specified charge key ids do not exist. |
| 422 | VALIDATION_ERROR | gatewayId, organizationId, merchant, name, or key is missing; or merchant or name exceeds 50 characters; or gatewayId is less than 1. |
| 422 | DATA_VALIDATION_ERROR | One or more of the specified gatewayId values do not refer to existing gateways. |