• Namespace
  • Class

Namespaces

  • Klarna
    • Exceptions
    • Rest
      • Checkout
      • CustomerToken
      • HostedPaymentPage
      • InstantShopping
      • MerchantCardService
      • OrderManagement
      • Payments
      • Settlements
      • Transport
        • Exception

Classes

  • Payouts
  • Reports
  • Transactions

Class Reports

Reports resource.

ArrayObject implements IteratorAggregate, Traversable, ArrayAccess, Serializable, Countable
Extended by Klarna\Rest\Resource
Extended by Klarna\Rest\Settlements\Reports
Namespace: Klarna\Rest\Settlements
Example: docs/examples/SettlementsAPI/Reports/payout_report.php Get payout report with transactions
Example: docs/examples/SettlementsAPI/Reports/summary_report.php Get payouts summary report with transactions
Located at Klarna/Rest/Settlements/Reports.php

Methods summary

public
# __construct( Klarna\Rest\Transport\ConnectorInterface $connector )

Constructs a Reports instance.

Constructs a Reports instance.

Parameters

$connector
HTTP transport connector

Overrides

Klarna\Rest\Resource::__construct
public Klarna\Rest\Settlements\Reports
# fetch( )

Not applicable.

Not applicable.

Returns

Klarna\Rest\Settlements\Reports

Throws

Klarna\Exceptions\NotApplicableException

Overrides

Klarna\Rest\Resource::fetch
public string
# getCSVPayoutReport( string $paymentReference )

Returns CSV payout report

Returns CSV payout report

Parameters

$paymentReference
The reference id of the payout.

Returns

string
CSV Payout report

Throws

Klarna\Rest\Transport\Exception\ConnectorException
When the API replies with an error response
GuzzleHttp\Exception\RequestException
When an error is encountered
RuntimeException
On an unexpected API response
RuntimeException
If the response content type is not JSON
InvalidArgumentException
If the JSON cannot be parsed
LogicException
When Guzzle cannot populate the response
public string
# getPDFPayoutReport( string $paymentReference )

Returns a single settlement summed up in pdf format.

Returns a single settlement summed up in pdf format.

Parameters

$paymentReference
The reference id of the payout.

Returns

string
Binary PDF representation of Payout report

Throws

Klarna\Rest\Transport\Exception\ConnectorException
When the API replies with an error response
GuzzleHttp\Exception\RequestException
When an error is encountered
RuntimeException
On an unexpected API response
RuntimeException
If the response content type is not JSON
InvalidArgumentException
If the JSON cannot be parsed
LogicException
When Guzzle cannot populate the response
public string
# getCSVPayoutsSummaryReport( array $params = [] )

Returns CSV summary.

Returns CSV summary.

Parameters

$params
Additional query params to filter payouts.

Returns

string
CSV Summary report

Throws

Klarna\Rest\Transport\Exception\ConnectorException
When the API replies with an error response
GuzzleHttp\Exception\RequestException
When an error is encountered
RuntimeException
On an unexpected API response
RuntimeException
If the response content type is not JSON
InvalidArgumentException
If the JSON cannot be parsed
LogicException
When Guzzle cannot populate the response

See

https://developers.klarna.com/api/#settlements-api-get-payouts-summary-report-with-transactions
public string
# getPDFPayoutsSummaryReport( array $params = [] )

Returns PDF summary.

Returns PDF summary.

Parameters

$params
Additional query params to filter payouts.

Returns

string
PDF Summary report

Throws

Klarna\Rest\Transport\Exception\ConnectorException
When the API replies with an error response
GuzzleHttp\Exception\RequestException
When an error is encountered
RuntimeException
On an unexpected API response
RuntimeException
If the response content type is not JSON
InvalidArgumentException
If the JSON cannot be parsed
LogicException
When Guzzle cannot populate the response

See

https://developers.klarna.com/api/#settlements-api-get-payouts-summary-report-with-transactions

Methods inherited from Klarna\Rest\Resource

delete(), exchangeArray(), get(), getId(), getLocation(), patch(), post(), put(), request(), setId(), setLocation()

Methods inherited from ArrayObject

append(), asort(), count(), getArrayCopy(), getFlags(), getIterator(), getIteratorClass(), ksort(), natcasesort(), natsort(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), serialize(), setFlags(), setIteratorClass(), uasort(), uksort(), unserialize()

Magic methods summary

Constants summary

Constants inherited from Klarna\Rest\Resource

ID_FIELD

Constants inherited from ArrayObject

ARRAY_AS_PROPS, STD_PROP_LIST

Properties summary

public static string $path

Path to the resource endpoint.

Path to the resource endpoint.

# '/settlements/v1/reports'

Properties inherited from Klarna\Rest\Resource

$connector, $url

API documentation generated by ApiGen