mutation query to remove and alter a payment customization rule

gajenderdh947
Shopify Partner
8 0 0

Hi dev

 

i am trying to create app with payment customization extension, i successfully created 

 

Please find logs below for same , my question is that how can i remove or alter created rule

/*====================Request ================*/

mutation {
paymentCustomizationCreate(paymentCustomization: {
title: "Hide payment method by cart total",
enabled: true,
functionId: "02f40882-9820-4052-8e65-96eaa3557b8f",
}) {
paymentCustomization {
id
}
userErrors {
message
}
}
}

/*====================Response ================*/

 

{
"data": {
"paymentCustomizationCreate": {
"paymentCustomization": {
"id": "gid://shopify/PaymentCustomization/66191670"
},
"userErrors": []
}
},
"extensions": {
"cost": {
"requestedQueryCost": 10,
"actualQueryCost": 10,
"throttleStatus": {
"maximumAvailable": 2000,
"currentlyAvailable": 1990,
"restoreRate": 100
}
}
}
}

 

Reply 1 (1)

Raj-webdesigner
Shopify Partner
250 55 60

 

1.Removing a Rule:

 

 

mutation {
  paymentCustomizationDelete(id: "gid://shopify/PaymentCustomization/66191670") {
    deletedPaymentCustomizationId
    userErrors {
      message
    }
  }
}

 

 
2.Altering a Rule:

 

 
 

 

mutation {
  paymentCustomizationUpdate(id: "gid://shopify/PaymentCustomization/66191670", input: {
    title: "New title",
    enabled: true,
    functionId: "new-function-id"
  }) {
    paymentCustomization {
      id
      title
      enabled
      functionId
    }
    userErrors {
      message
    }
  }
}

 

Replace "New title" and "new-function-id" with the new values you want to set for the rule. Also, ensure that you provide all required fields for the mutation.

If you require further help to optimize your store, please don’t hesitate to reach out.


This contribution will always benefit you and you will get my full help easily and you can contact me easily.


Your Willpower Contribution Link

:- Contribution

Contect On My Mail :-Mail@gmail.com