webhook payload does not include my custom field

BruceCrabtree
Contributor
Contributor

I am using the javascript SDK to render my buttons. I am passing a custom field in the createOrder function, for my order number. Here is the code for that:

    createOrder: function(data, actions) {
      return actions.order.create({
        purchase_units: [{
          amount: {
            value: '#total_fees#' // Set the amount here
          }
        }],
application_context: {
                shipping_preference: "NO_SHIPPING"
        },
        custom: ''#submitted.order_id#''        
      });
    },
   ...



My webhook is subscribed to the PAYMENT.CAPTURE.COMPLETED event. The custom field value is not being returned in the webhook payload. It should be in the resource part of the json, but it's not included. I've tried it in the sandbox and also using live credentials. Neither works. What am I missing?

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.