Hello, am having an issue while making a cashout request using nodejs sdk, am getting an environment is not defined error yet am passing development as the environment in the request.
Here is my request:
const result = await Paypack.cashout({
number: phone,
amount: amount,
environment: “development”,
});
One last thing, @shema can you please guide me on how I can use Webhooks using node sdk am using nest to build my application and I checked the documentation but it does not provide much information for someone who is using Webhooks for the first time.
Any help would be highly appreciated. Thank you.
Currently the SDK doesn’t handle webhooks, you have to process them on your system.
To summarize what is explained in more details here:
You provide an endpoint from your system which paypack call with a payload.
In your system you will need to first check the signature to verify that the webhook is coming from us and then perform your logic like updating the transaction status from your system.
@shema does that means I will have to move from using the SDK and do it the other way for both cashIn and CashOut to be able to handle webhooks? or I can continue my current implementation and only provide an endpoint from my system which paypack will call with a payload?