#hoffemberg_java-webhook-handler

1 messages ยท Page 1 of 1 (latest)

uneven loomBOT
weak gateBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

uneven loomBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1252286265412554863

๐Ÿ“ Have more to share? Add details, code, screenshots, videos, etc. below.

atomic verge
#

Hello

#

When you use the CLI are you using the Webhook secret that is returned from the CLI?

#

Also have you logged out the acutal error message that corresponds with that 403 that your server is returning?

uneven loomBOT
charred birch
#

Hey, sorry I missed this, it was below the scroll or something. What I am doing is just stripe trigger payment_intent.succeeded, and then the response is :[403] POST http://local.fundycentral.com:8080/client-order/stripe-webhook [evt_3PShQDIzJqdgXYvP2S8q9GpO]; The 403 in the dash says No data
The endpoint did not respond with a body attached to the response. But I am returning a body. The Postman logs it out.

#

I'm not using the secret; I'm in test mode so I haven't implemented any security yet.

lethal stump
#

Hi ๐Ÿ‘‹

My colleague had to go so I'm stepping in.

#

I'm not using the secret; I'm in test mode so I haven't implemented any security yet.
What does the code in your webhook endpoint do?

charred birch
#

Just logs out the request body.
@RestController
@RequestMapping("/client-order")
@Log4j2
public class ClientOrderController {
@PostMapping("/stripe-webhook")
public ResponseEntity<String> stripeWebhook(@RequestBody Map<String, Object> payload) {

    payload.forEach((key, value) -> System.out.println(key + ": " + value));

    return new ResponseEntity<>("Response received", HttpStatus.OK);
}

}

lethal stump
#

And you are using stripe listen --forward-to http://local.fundycentral.com:8080/client-order/stripe-webhook and leaving that running while you use stripe trigger in a separate terminal?

charred birch
#

Maybe I have to add the http? Let me try...

lethal stump
#

That response is coming from your server somewhere. I recommend, to get you started, you copy our webhook builder code here: https://docs.stripe.com/webhooks/quickstart

  • Verify this runs without any modification
  • Then start changing it to fit your use case and see if/when it breaks.
charred birch
#

Okay. I was trying not to add a bunch of new packages...

#

Just curious why Postman doesn't get the 403 but Stripe does.

#

Thanks for the advice, and for checking it out...