Skip to content

Latest commit

 

History

History
65 lines (46 loc) · 5.94 KB

File metadata and controls

65 lines (46 loc) · 5.94 KB

WebhookEvents

Overview

Available Operations

  • get - Get a Webhook Event

get

Retrieve a single webhook event object by its event ID.

Example Usage

package hello.world;

import com.mollie.mollie.Client;
import com.mollie.mollie.models.components.Security;
import com.mollie.mollie.models.errors.ErrorResponse;
import com.mollie.mollie.models.operations.GetWebhookEventResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws ErrorResponse, Exception {

        Client sdk = Client.builder()
                .testmode(false)
                .security(Security.builder()
                    .organizationAccessToken(System.getenv().getOrDefault("ORGANIZATION_ACCESS_TOKEN", ""))
                    .build())
            .build();

        GetWebhookEventResponse res = sdk.webhookEvents().get()
                .webhookEventId("event_1234567890")
                .idempotencyKey("123e4567-e89b-12d3-a456-426")
                .call();

        if (res.entityWebhookEvent().isPresent()) {
            System.out.println(res.entityWebhookEvent().get());
        }
    }
}

Parameters

Parameter Type Required Description Example
webhookEventId String ✔️ Provide the ID of the related webhook event. event_1234567890
testmode Optional<Boolean> You can enable test mode by setting the testmode query parameter to true.

Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.
idempotencyKey Optional<String> A unique key to ensure idempotent requests. This key should be a UUID v4 string. 123e4567-e89b-12d3-a456-426

Response

GetWebhookEventResponse

Errors

Error Type Status Code Content Type
models/errors/ErrorResponse 404 application/hal+json
models/errors/APIException 4XX, 5XX */*