Delete a Payment Method

Method for deleting a payment method

Staging and Production environment URLs:

EnvironmentAPI Host
Staginghttps://caas-staging.coinme.com
Productionhttps://caas.coinme.com

Sample API request: DELETE

URL: https://caas-staging.coinme.com/services/paymentmethods/{paymentMethodId}?customerId=1234321
headers:
"Authorization":"asdfghj", //authorization token, required
'User-Agent: partnerapi' //required
'Content-Type: application/json'

Sample API Response:

Successful Response:
{
  "data": 
  {
    "paymentMethodId": "123456",
    "providerId": "654987321",
    "providerName": "Provider Name",
    "type": "DEBIT", // could be DEBIT, CREDIT or PREPAID
    "cardProvider": "Visa",
    "card": {
        "cardNumber": "123412321",
        "month": "03",
        "year": "2024"
    },
    "billingAddress": {
        "firstName": "John",
        "lastName": "Doe",
        "country": "US",
        "addressLine1": "11 Creekside St.",
        "addressLine2": "Additional line",
        "zipCode": "33414",
        "city": "West Palm Beach",
        "state": "FL"
    },
    "status": "DELETED", //enum, could be [CREATED, VERIFIED, DECLINED, STAGED, DELETED]
    "buySupported": false,
    "sellSupported": true,
    "createdAt": 1714560970, //timestamp in millis
    "deletedAt": 1714560970 //timestamp in millis
  },
  "errorResponse": null
}
Failure Response:
{
  "data": null,
  "errorResponse": {
    "httpStatus":"200",
    "timestamp":"2022-02-01T18:59:28.297Z",//UTC
    "path":"/external/partners/v1/payment-method",
    "errorData": [
      {
        "errorCode":"123-123-123-123", //The error code is just a sample showing the structure of the error code.
        "message":"Invalid account id"
      }
    ]
  }
}

Error Codes

Error Code

Error Message

430-400-313-608

Payment method not found, invalid paymentMethodId

430-400-313-602

Invalid account id

430-400-313-603

Invalid partner id

430-400-313-667

REST request validation error, such as missing parameter
(header, query param, field in request body)

or invalid param format

430-400-313-666

General REST request malformed error