webhook payload does not include my custom field
BruceCrabtree
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Oct-04-2023
01:16 PM
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?
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.
Related Content
- Assistance Needed: Passing and Retrieving Custom Data in PayPal Webhook Payload in PayPal Payments Standard
- How to get the custom field from a payment with webhook/API? in REST APIs
- Paypal does not send line item data in Sandbox Environment
- How do I set up webhooks in my PayPal account? in REST APIs
- Passing Internal Order ID Between Webhooks (CHECKOUT.ORDER.APPROVED & PAYMENT.CAPTURE.COMPLETED) in REST APIs