Skip to main content

Delete Payment Method

Permanently removes a stored payment method at both Azotte and the PSP. Not reversible.

URL

DELETE /api/c2a/customer/payment/methods/delete

Request Parameters

NameTypeDescription
pstringQuery parameter, required. Payment method URN.

Response Parameters

PaymentMethodRemoveResponse wraps the removed AzottePaymentMethod snapshot.

NameTypeDescription
resultobject (AzottePaymentMethod)Removed method snapshot with state = Deleted. Null if not found.
statusobject (AzotteStatus)Operation status envelope. PAYMENT_METHOD_NOT_FOUND on idempotent re-delete.

Sample Response

{
"result": {
"paymentMethodUrn": "pm.00.482.7",
"state": "Deleted"
},
"status": { "messageCode": "SUCCESS" }
}

Not Found

{
"result": null,
"status": { "messageCode": "PAYMENT_METHOD_NOT_FOUND" }
}

Behaviour

  • If the URN is referenced by an active subscription's billing instrument, the call still succeeds but the subscription's next renewal fails authorization and moves to PastDue. Re-attach a method via the Subscription API before deleting.
  • Idempotent: deleting an already-deleted URN returns PAYMENT_METHOD_NOT_FOUND.

Sample Codes

curl --location --request DELETE \
'https://acme.sandbox.azotte.com/api/v1/c2a/customer/payment/methods/delete?p=pm.00.482.7' \
--header 'x-tn: e2a1c7b2-4f3a-4b8e-9c2d-1a2b3c4d5e6f' \
--header 'x-api-key: sk_dev_acme_sample_123456789'