Update

Update

Update

Updates an existing payment type on an account.

Request

Method
URL
PUT

Path Parameters

Name
Required
Type
Description
accountUniqueId

Guid
The unique ID of the account.
itemUniqueId

Guid
The unique ID of the payment type.

Headers

Name
Required
Type
Description
APIKey

Guid
A valid API key with a scope of AccountLists

Body

Name
Required
Type
Description
paymentType
Text
The name of the payment type. If supplied, it is subject to the same validation as create (maximum 32 characters, cannot be empty). If omitted, the currently stored name is left unchanged.
active
Boolean
Indicates if the payment type is active or inactive. If omitted, the currently stored value is left unchanged.
creditOrDebit
Boolean
Indicates whether this payment type represents a credit/debit card payment (true) versus something else such as cash or check (false). If omitted, the currently stored value is left unchanged.
All fields on this endpoint are optional. As with the other list endpoints, omitting a field leaves its currently stored value unchanged rather than resetting it to a default — this applies to creditOrDebit as well, so it is safe to update just the paymentType name without accidentally flipping a payment type from a credit/debit card type back to false.
{
"paymentType": "Visa/Mastercard/Discover"
}

Remarks

All fields are optional on update. Omitting a field entirely leaves that field's currently stored value unchanged — it is not reset to a default. In the example above, only paymentType is supplied, so the payment type's active and creditOrDebit values are left exactly as they were before the update.
If a field is supplied, it is validated the same way it is on Create. Supplying an empty paymentType value is different from omitting it and will fail validation, since paymentType cannot be empty.
A payment type's name must remain unique within an account. If paymentType is supplied and it matches the name of another payment type on the same account, the request will fail with a 409 Conflict.

Response

Headers

None

Status Code

Code
Description
200 OK
The payment type was updated. The updated payment type is returned.
400 Bad Request
The payment type was not updated. This occurs if paymentType is supplied but is empty or exceeds 32 characters.
401 Unauthorized
The API key is missing, invalid, disabled, or does not have the correct scope.
403 Forbidden
The API key does not belong to this account, the account does not have the API-keys feature, or the key does not have the required scope.
404 Not Found
No payment type was found with that id for this account.
409 Conflict
A payment type with that name already exists for this account.

Body

Name
Type
Description
uniqueId
Guid
The unique ID of the payment type.
paymentType
Text
The name of the payment type.
active
Boolean
Indicates if the payment type is active or inactive.
creditOrDebit
Boolean
Indicates whether this payment type represents a credit/debit card payment (true) or something else (false).