Links API DocsLinks API Docs

How to Delete a Payment Method

On this page, you will find a walk-through guide on deleting a payment method and the necessary information to accomplish this task.

Prerequisites

Before making any call to the LINKs API, you first need a merchant account. Contact our team at Discover@LinksMerchantServices.com to get started.

Deleting a Payment Method

To delete a payment method in LINKs, you need to call the Delete a Payment Method endpoint. The following is the required parameter:

ParameterDescriptionRequired
paymentMethodIdentifierThe unique identifier of the payment method to delete.Yes

You can use the code snippet below to make the endpoint call with the required parameter:

curl --request POST \
--url 'https://testapi.linksmerchantservices.com/api/paymentmethod/delete/<PAYMENT_METHOD_IDENTIFIER>' \
--header 'Accept: application/json' \
--header 'Authorization: Basic <your_base64_encoded_credentials>'
Authentication#

Depending on the request, LINKs API offers two forms of authentication, Basic and client token. Refer to the Authentication guide to learn more about it.

This will result in a JSON response exemplified below:

{
  "result": {
    "resultType": "Success",
    "merchantMessage": "Payment method deleted successfully.",
    "logIdentifier": "xyz12345",
    "logAsError": false
  },
  "merchantIdentifier": "<your_merchant_id>",
  "customerIdentifier": "<customer_id>",
  "customerReference": "<customer_reference>",
  "paymentMethodIdentifier": "<payment_method_id>"
}
Irreversible Action#

Deleting a payment method is an irreversible action. Ensure that you really want to delete the payment method before proceeding.