#hoffemberg_java-webhook-handler
1 messages ยท Page 1 of 1 (latest)
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.
- hoffemberg_api, 2 days ago, 28 messages
๐ 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.
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?
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.
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?
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);
}
}
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?
Yes, here's the command I'm using to listen: stripe listen --skip-verify --forward-to local.fundycentral.com:8080/client-order/stripe-webhook
Maybe I have to add the http? Let me try...
Nope, even when I listen with stripe listen --skip-verify --forward-to http://local.fundycentral.com:8080/client-order/stripe-webhook it gives the 403
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.