Skip to content

Latest commit

 

History

History
184 lines (133 loc) · 8.54 KB

PaymentApi.md

File metadata and controls

184 lines (133 loc) · 8.54 KB

Swagger\Client\PaymentApi

All URIs are relative to https://openapi.etsy.com

Method HTTP request Description
getPaymentAccountLedgerEntryPayments GET /v3/application/shops/{shop_id}/payment-account/ledger-entries/payments
getPayments GET /v3/application/shops/{shop_id}/payments
getShopPaymentByReceiptId GET /v3/application/shops/{shop_id}/receipts/{receipt_id}/payments

getPaymentAccountLedgerEntryPayments

\Swagger\Client\Model\Payments getPaymentAccountLedgerEntryPayments($shop_id, $ledger_entry_ids)

General ReleaseReport bug

This endpoint is ready for production use.

Get a Payment from a PaymentAccount Ledger Entry ID, if applicable

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\PaymentApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$shop_id = 56; // int | The unique positive non-zero numeric ID for an Etsy Shop.
$ledger_entry_ids = array(56); // int[] | 

try {
    $result = $apiInstance->getPaymentAccountLedgerEntryPayments($shop_id, $ledger_entry_ids);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentApi->getPaymentAccountLedgerEntryPayments: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
shop_id int The unique positive non-zero numeric ID for an Etsy Shop.
ledger_entry_ids int[]

Return type

\Swagger\Client\Model\Payments

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getPayments

\Swagger\Client\Model\Payments getPayments($shop_id, $payment_ids)

General ReleaseReport bug

This endpoint is ready for production use.

Retrieves a list of payments from a shop identified by `shop_id`. You can also filter results using a list of payment IDs.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\PaymentApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$shop_id = 56; // int | The unique positive non-zero numeric ID for an Etsy Shop.
$payment_ids = array(56); // int[] | A comma-separated array of Payment IDs numbers.

try {
    $result = $apiInstance->getPayments($shop_id, $payment_ids);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentApi->getPayments: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
shop_id int The unique positive non-zero numeric ID for an Etsy Shop.
payment_ids int[] A comma-separated array of Payment IDs numbers.

Return type

\Swagger\Client\Model\Payments

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getShopPaymentByReceiptId

\Swagger\Client\Model\Payments getShopPaymentByReceiptId($shop_id, $receipt_id)

General ReleaseReport bug

This endpoint is ready for production use.

Retrieves a payment from a specific receipt, identified by `receipt_id`, from a specific shop, identified by `shop_id`

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
// Configure OAuth2 access token for authorization: oauth2
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\PaymentApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$shop_id = 56; // int | The unique positive non-zero numeric ID for an Etsy Shop.
$receipt_id = 56; // int | The numeric ID for the [receipt](/documentation/reference#tag/Shop-Receipt) associated to this transaction.

try {
    $result = $apiInstance->getShopPaymentByReceiptId($shop_id, $receipt_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentApi->getShopPaymentByReceiptId: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
shop_id int The unique positive non-zero numeric ID for an Etsy Shop.
receipt_id int The numeric ID for the receipt associated to this transaction.

Return type

\Swagger\Client\Model\Payments

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]