Create Charge Keys
Creates a new Charge Key associated with the specified organization and gateway.
| Verb | PUT |
|---|---|
| Endpoint | {base-url}/credit/charge-key |
| Max Page Size | 50 |
Request Body
{
"body": [
{
"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
The ids of the created charge keys.
Response Body
[
1673
]
On Error
| HTTP Code | Error Code | Definition |
|---|---|---|
| 403 | DATA_ACCESS_VIOLATION | One or more of the specified organizationId values belong to an organization you do not have access to. |
| 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. |