Class WebhooksServiceImpl

java.lang.Object
vn.payos.core.APIService<PayOSAsync>
vn.payos.service.async.webhook.WebhooksServiceImpl
All Implemented Interfaces:
WebhooksService

public class WebhooksServiceImpl extends APIService<PayOSAsync> implements WebhooksService
WebhooksServiceImpl
  • Constructor Details

    • WebhooksServiceImpl

      public WebhooksServiceImpl(PayOSAsync client)
      WebhooksServiceImpl
      Parameters:
      client - client
  • Method Details

    • confirm

      Description copied from interface: WebhooksService
      Validate and register a webhook URL with payOS. payOS will test the webhook endpoint by sending a validation request to it. If the webhook responds correctly, it will be registered for payment notifications.
      Specified by:
      confirm in interface WebhooksService
      Parameters:
      webhookConfirmRequest - Object containing your webhook URL endpoint that will receive payment notifications.
      options - Additional options.
      Returns:
      Confirm result.
    • confirm

      public CompletableFuture<ConfirmWebhookResponse> confirm(ConfirmWebhookRequest webhookConfirmRequest)
      Description copied from interface: WebhooksService
      Validate and register a webhook URL with payOS. payOS will test the webhook endpoint by sending a validation request to it. If the webhook responds correctly, it will be registered for payment notifications.
      Specified by:
      confirm in interface WebhooksService
      Parameters:
      webhookConfirmRequest - Object containing your webhook URL endpoint that will receive payment notifications.
      Returns:
      Confirm result.
    • confirm

      Description copied from interface: WebhooksService
      Validate and register a webhook URL with payOS. payOS will test the webhook endpoint by sending a validation request to it. If the webhook responds correctly, it will be registered for payment notifications.
      Specified by:
      confirm in interface WebhooksService
      Parameters:
      webhookUrl - Your webhook URL endpoint that will receive payment notifications.
      options - Additional options.
      Returns:
      Confirm result.
    • confirm

      public CompletableFuture<ConfirmWebhookResponse> confirm(String webhookUrl)
      Description copied from interface: WebhooksService
      Validate and register a webhook URL with payOS. payOS will test the webhook endpoint by sending a validation request to it. If the webhook responds correctly, it will be registered for payment notifications.
      Specified by:
      confirm in interface WebhooksService
      Parameters:
      webhookUrl - Your webhook URL endpoint that will receive payment notifications.
      Returns:
      Confirm result.
    • verify

      public CompletableFuture<WebhookData> verify(Object webhook)
      Description copied from interface: WebhooksService
      Verify the webhook data sent from payOS.
      Specified by:
      verify in interface WebhooksService
      Parameters:
      webhook - The request body receive from payOS.
      Returns:
      The verified webhook data.