Delete a payment method
PreviewDELETE
/admin/v1/paymentMethods/{paymentMethodId}
path parameters
paymentMethodId
string
RequiredThe identifier of the payment method.
query parameters
The identifier of the organization.
Optionally restrict delete to payment methods owned by this organization.
The identifier of the user.
Optionally restrict delete to payment methods owned by this user.
Returns
The general error code (e.g. INVALID_ARGUMENT
).
Possible values:OK
CANCELLED
UNKNOWN
INVALID_ARGUMENT
DEADLINE_EXCEEDED
NOT_FOUND
ALREADY_EXISTS
PERMISSION_DENIED
UNAUTHENTICATED
RESOURCE_EXHAUSTED
FAILED_PRECONDITION
ABORTED
OUT_OF_RANGE
UNIMPLEMENTED
INTERNAL
UNAVAILABLE
DATA_LOSS
A developer-facing error message.
A reason code for the error (e.g. USER_PENDING_DELETION
).
The parameter path related to the error (e.g. member.userId
).
Additional metadata related to the error.
A user-facing error message.
curl https://api.userhub.com/admin/v1/paymentMethods/pm_2kWzaZMKDM1x81 \
-H "Authorization: Bearer $USERHUB_ADMIN_KEY" \
-X DELETE
const res = await adminApi.paymentMethods.delete(
"pm_2kWzaZMKDM1x81",
);
res, err := adminApi.PaymentMethods().Delete(
context.Background(),
"pm_2kWzaZMKDM1x81",
nil,
)
$res = $adminApi->paymentMethods->delete(
paymentMethodId: 'pm_2kWzaZMKDM1x81',
);
res = admin_api.payment_methods.delete(
payment_method_id="pm_2kWzaZMKDM1x81",
)