DELETE
/
admin
/
payment-collections
/
{id}
JS SDK
import Medusa from "@medusajs/js-sdk"

export const sdk = new Medusa({
  baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
  debug: import.meta.env.DEV,
  auth: {
    type: "session",
  },
})

sdk.admin.paymentCollection.delete("paycol_123")
.then(({ deleted }) => {
  console.log(deleted)
})
{
"id": "<string>",
"object": "payment-collection",
"deleted": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The payment collection's ID.

Response

OK

The result of deleting the payment collection.

id
string
required

The payment collection's ID.

object
string
default:payment-collection
required

The name of the object that was deleted.

deleted
boolean
required

Whether the object was deleted.