Orders/create webhook data for payment_gateway_names

The payment_gateway_names data contained in the webhook for orders/create contains gateway names that were not successfully applied to the order.

For example, a customer attempted to purchase with their credit card, but it was declined. They switched to a different payment method (invoice) and completed their order with it.

The webhook data shows:

    "payment_gateway_names": [
        "shopify_payments",
        "Invoice"
    ],

Is this expected since they did not successfully process any credit card charge on their order?

1 Like

Hey @Adam,

That does sound like it would be expected. To confirm, when you look at the transactions do you see the failed Shopify Payments attempt? Even if it failed, it was still part of the order that was created.

Hi @KyleG-Shopify - I do see the failed charge on the order, but no successful charges were applied using this method. For example, “Unable to authorize $500.00 USD using a Bogus ending in •• 2.” is all we see in the order history.

It seems I am misunderstanding the purpose of the payment_gateway_names array. I assumed that everything listed there was successfully applied to the order since there is nothing to indicate success or failure, but that doesn’t appear to be the case.

Yeah, the graphql docs clarify this a little further. That field would be all of the gateways used, successful or not. Order - GraphQL Admin

A list of the names of all payment gateways used for the order. For example, “Shopify Payments” and “Cash on Delivery (COD)”.