NAME

Business::Payr::Request - abstract class to handle low level request traffic to the Payr API, you probably don't need to use this and should use the main Business::Payr module instead.

ATTRIBUTES

api_token (Str, required)

Your Payr server API token. Included in every request as Authorization: Token <api_token>.

api_host (Str)

The Payr API hostname. Defaults to api.mypayr.co.uk (production). Set to sandbox-api.mypayr.co.uk for sandbox testing.

iframe_host (Str)

The Payr iframe hostname. Defaults to mypayr.co.uk (production). Set to sandbox.mypayr.co.uk for sandbox testing.

METHODS

api_post

Performs an authenticated POST request to the given path under the /thirdparty base path. Returns the decoded JSON response on success, or throws an exception on failure.

my $res = $self->api_post( '/onboarding/', \%body );