delete
https://www.pelcro.com/api/v1/core/sources/
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Overview
Delete a payment method. Soft-deletes the record.
Example: Remove a customer's expired credit card from their account.
Validation Constraints
| Condition | Result |
|---|---|
| Payment method is associated with an active subscription | Returns 400: "Cannot delete source already associated to a subscription" |
| Payment method does not exist or belongs to a different site | Returns 404 |
Side Effects by Payment Gateway
The delete behavior varies depending on the account's active payment gateway.
Stripe
| Behavior | Detail |
|---|---|
| External API call | Detaches the payment method from the Stripe customer |
| Local effect | Soft-deletes the record |
| Event fired | source.deleted is dispatched asynchronously once Stripe webhook round-trip is received and processed |
Braintree
| Behavior | Detail |
|---|---|
| External API call | Deletes the payment method from Braintree |
| Local effect | Soft-deletes the record |
| Event fired | source.deleted is dispatched synchronously in the same request |
Tap
| Behavior | Detail |
|---|---|
| External API call | External deletion is not yet implemented |
| Local effect | Soft-deletes the record |
| Event fired | source.deleted is dispatched synchronously in the same request |
Vantiv
| Behavior | Detail |
|---|---|
| External API call | External deletion is not yet implemented |
| Local effect | Soft-deletes the record |
| Event fired | source.deleted is dispatched synchronously in the same request |
Cybersource
| Behavior | Detail |
|---|---|
| External API call | External deletion is not yet implemented |
| Local effect | Soft-deletes the record |
| Event fired | source.deleted is dispatched synchronously in the same request |
Important Behaviors
- Deleting a customer's default payment method does not automatically reassign another payment method as the new default. The
default_source_idmay reference a soft-deleted record. - The
source.deletedevent triggers connected webhook and integration listeners (e.g., MailChimp sync). - For Stripe accounts, the event is fired asynchronously via webhook, meaning integrations react after a short delay rather than within the API response.
