HomeGuidesReference↗ Forage Dashboard
Log In
Reference

Delete a PaymentMethod

A DELETE request to /payment_methods/{payment_method_ref}/ deletes a representation of a customer’s payment instrument in Forage’s database.

Returns an empty object if the operation was successful.

Cannot Delete Succeeded PaymentMethod

If a PaymentMethod has any associated payments in the succeeded state, then the PaymentMethod cannot be deleted.

Deleting PaymentMethod

Deleting a PaymentMethod cannot be undone. Use this endpoint with caution.

Path Params
string
required

A unique reference hash for the Forage PaymentMethod, returned when the PaymentMethod was created.

Headers
string
required

An OAuth 2.0 authentication token that validates the request. Send a POST to the /o/token/ endpoint to generate an authentication token. Pass the token in this header after the word Bearer and a whitespace, for example Bearer <api_key>.

string
required

A unique merchant ID that Forage provides during onboarding, as in 123ab45c67. The Merchant ID can be found in the Forage sandbox or production dashboard.

Pass a Merchant-Account header to create a PaymentMethod associated with a specific merchant account for routing and reporting purposes. This header does not restrict PaymentMethods to a single merchant account. PaymentMethods are tenant-scoped and can be used across all merchant accounts within the same tenant.

Responses

Language
Credentials
OAuth2
URL
LoadingLoading…
Response
Choose an example:
application/json