Knowledge Center

Knowledge Center > API > REST API > REST API Reference > Payment Methods > Delete payment method

Delete payment method

Deletes a credit card payment method from the specified customer account.

If the specified payment method is the account's default payment method, the request will fail.  In that case, you must first designate a different payment method for that customer to be the default.

Request

  • Production: DELETE https://api.zuora.com/rest/v1/payment-methods/{payment-method-id}
  • API Sandbox: DELETE https://apisandbox-api.zuora.com/rest/v1/payment-methods/{payment-method-id}

Request parameters

payment-method-id

required

path

Unique identifier of a payment method. (Since this ID is unique, and linked to a customer account in the system, no customer identifier is needed.)

Response

success

Contains true if successful, otherwise false.

processId

Internal process ID to assist Zuora support. Only returned if success is false.

reasons

Information on one or more reasons for the result. Only returned if success is false.

code

Eight-digit numeric error code

message

Description of the error

Examples

HTTP/JSON request:

DELETE https://api.zuora.com/rest/v1/payment-methods/4028e485225d1d5f012662fd6b249c8

JSON response:

{
  "success": true
}

CURL request:

##
## Delete Credit Card
##
echo
echo "=============Delete Credit Card============="
echo
curl -i -k -H "apiAccessKeyId:$USER_NAME" -H "apiSecretAccessKey:$PASSWORD" -H "Accept:application/json" -X DELETE $BASE_URL/v1/payment-methods/ff808081298c6e5401298c76f29a006d

JSON response:

{
  "success": true
}
Last modified
13:35, 8 Oct 2015

Tags

Classifications

(not set)