Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

mutation query to remove and alter a payment customization rule

mutation query to remove and alter a payment customization rule

gajenderdh947
Shopify Partner
13 0 1

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
363 90 90

 

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.

Are you looking for Shopify Developer then your search is over I will help you


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

:-

❤️Tip❤️

Contect On My Mail :-Mail@gmail.com