{"id":18384362,"url":"https://github.com/speakeasy-sdks/paddle-php","last_synced_at":"2025-04-11T23:47:29.700Z","repository":{"id":193494630,"uuid":"688911915","full_name":"speakeasy-sdks/paddle-php","owner":"speakeasy-sdks","description":"A php SDK for accessing the Paddle API.","archived":false,"fork":false,"pushed_at":"2024-04-02T21:45:17.000Z","size":1021,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-11T23:47:25.795Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/speakeasy-sdks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-09-08T11:17:50.000Z","updated_at":"2023-09-08T11:19:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"e5eebb4b-b098-4d0a-9b3e-d437ffb39b9b","html_url":"https://github.com/speakeasy-sdks/paddle-php","commit_stats":null,"previous_names":["speakeasy-sdks/paddle-php"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-sdks%2Fpaddle-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-sdks%2Fpaddle-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-sdks%2Fpaddle-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-sdks%2Fpaddle-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/speakeasy-sdks","download_url":"https://codeload.github.com/speakeasy-sdks/paddle-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497891,"owners_count":21113983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T01:14:20.271Z","updated_at":"2025-04-11T23:47:29.676Z","avatar_url":"https://github.com/speakeasy-sdks.png","language":"PHP","readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/speakeasy-sdks/paddle-ts/assets/6267663/929e90c9-ded4-4400-8239-2ffc0f8d9299\" width=\"300\"\u003e\n    \u003ch1\u003ePHP SDK\u003c/h1\u003e\n   \u003cp\u003eOne platform for tax, payments, and subscriptions\u003c/p\u003e\n   \u003ca href=\"https://developer.paddle.com/\"\u003e\u003cimg src=\"https://img.shields.io/static/v1?label=Docs\u0026message=API Ref\u0026color=000\u0026style=for-the-badge\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://speakeasyapi.dev/\"\u003e\u003cimg src=\"https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge\u0026logoColor=FBE331\u0026logo=speakeasy\u0026labelColor=545454\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/speakeasy-sdks/paddle-php.git/actions\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/speakeasy-sdks/paddle-php/speakeasy_sdk_generation.yml?style=for-the-badge\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge\" /\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003c!-- Start SDK Installation [installation] --\u003e\n## SDK Installation\n\n### Composer\n\nTo install the SDK first add the below to your `composer.json` file:\n\n```json\n{\n    \"repositories\": [\n        {\n            \"type\": \"github\",\n            \"url\": \"https://github.com/speakeasy-sdks/paddle-php.git\"\n        }\n    ],\n    \"require\": {\n        \"paddle/paddle\": \"*\"\n    }\n}\n```\n\nThen run the following command:\n\n```bash\ncomposer update\n```\n\u003c!-- End SDK Installation [installation] --\u003e\n\n\u003c!-- Start SDK Example Usage [usage] --\u003e\n## SDK Example Usage\n\n### Example\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\nrequire_once 'vendor/autoload.php';\n\nuse paddle\\Paddle;\nuse paddle\\Paddle\\Models\\Shared;\n\n$security = new Shared\\Security();\n$security-\u003ebearerAuth = 'YOUR_API_KEY';\n\n$sdk = Paddle\\Paddle::builder()\n    -\u003esetSecurity($security)\n    -\u003ebuild();\n\ntry {\n    $request = new Shared\\AdjustmentCreate();\n    $request-\u003eaction = Shared\\SchemaAction::Refund;\n    $request-\u003ecurrencyCode = Shared\\CurrencyCode2::Jpy;\n    $request-\u003ecustomerId = 'ctm_01grnn4zta5a1mf02jjze7y2ys';\n    $request-\u003eid = 'adj_01gya6twkp8y0tv1e19rsgst9m';\n    $request-\u003eitems = [new Shared\\AdjustmentCreateAdjustmentItem()];\n    $request-\u003epayoutTotals = new Shared\\AdjustmentPayoutTotals();\n    $request-\u003epayoutTotals-\u003echargebackFee = new Shared\\ChargebackFee();\n    $request-\u003epayoutTotals-\u003echargebackFee-\u003eamount = '1680';\n    $request-\u003epayoutTotals-\u003echargebackFee-\u003eoriginal = new Shared\\Original();\n    $request-\u003epayoutTotals-\u003echargebackFee-\u003eoriginal-\u003eamount = '1500';\n    $request-\u003epayoutTotals-\u003echargebackFee-\u003eoriginal-\u003ecurrencyCode =\n        Shared\\CurrencyCodeChargeback::Gbp;\n    $request-\u003epayoutTotals-\u003ecurrencyCode = Shared\\CurrencyCodePayouts::Usd;\n    $request-\u003epayoutTotals-\u003eearnings = '15120';\n    $request-\u003epayoutTotals-\u003efee = '300';\n    $request-\u003epayoutTotals-\u003esubtotal = '15000';\n    $request-\u003epayoutTotals-\u003etax = '1500';\n    $request-\u003epayoutTotals-\u003etotal = '16500';\n    $request-\u003ereason = 'string';\n    $request-\u003estatus = Shared\\SchemaStatusAdjustment::Approved;\n    $request-\u003esubscriptionId = 'sub_01h04vsc0qhwtsbsxh3422wjs4';\n    $request-\u003etransactionId = 'string';\n\n    $response = $sdk-\u003eadjustments-\u003ecreate($request);\n\n    if ($response-\u003etwoHundredAndOneApplicationJsonObject !== null) {\n        // handle response\n    }\n} catch (Exception $e) {\n    // handle exception\n}\n\n```\n\u003c!-- End SDK Example Usage [usage] --\u003e\n\n\u003c!-- Start Available Resources and Operations [operations] --\u003e\n## Available Resources and Operations\n\n### [Adjustments](docs/sdks/adjustments/README.md)\n\n* [create](docs/sdks/adjustments/README.md#create) - Create an adjustment\n* [list](docs/sdks/adjustments/README.md#list) - List adjustments\n\n### [Customers](docs/sdks/customers/README.md)\n\n* [create](docs/sdks/customers/README.md#create) - Create a customer\n* [get](docs/sdks/customers/README.md#get) - Get a customer\n* [list](docs/sdks/customers/README.md#list) - List customers\n* [listCreditBalances](docs/sdks/customers/README.md#listcreditbalances) - List credit balances for a customer\n* [update](docs/sdks/customers/README.md#update) - Update a customer\n\n### [Addresses](docs/sdks/addresses/README.md)\n\n* [create](docs/sdks/addresses/README.md#create) - Create an address for a customer\n* [get](docs/sdks/addresses/README.md#get) - Get an address for a customer\n* [list](docs/sdks/addresses/README.md#list) - List addresses for a customer\n* [update](docs/sdks/addresses/README.md#update) - Update an address for a customer\n\n### [Businesses](docs/sdks/businesses/README.md)\n\n* [create](docs/sdks/businesses/README.md#create) - Create a business for a customer\n* [get](docs/sdks/businesses/README.md#get) - Get a business for a customer\n* [list](docs/sdks/businesses/README.md#list) - List businesses for a customer\n* [update](docs/sdks/businesses/README.md#update) - Update a business for a customer\n\n### [Discounts](docs/sdks/discounts/README.md)\n\n* [create](docs/sdks/discounts/README.md#create) - Create a discount\n* [get](docs/sdks/discounts/README.md#get) - Get a discount\n* [list](docs/sdks/discounts/README.md#list) - List discounts\n* [update](docs/sdks/discounts/README.md#update) - Update a discount\n\n### [Events](docs/sdks/events/README.md)\n\n* [list](docs/sdks/events/README.md#list) - List events\n* [listTypes](docs/sdks/events/README.md#listtypes) - List events types\n\n### [Invoices](docs/sdks/invoices/README.md)\n\n* [cancel](docs/sdks/invoices/README.md#cancel) - Cancel an invoice\n* [create](docs/sdks/invoices/README.md#create) - Create a draft invoice\n* [get](docs/sdks/invoices/README.md#get) - Get an invoice\n* [getPdf](docs/sdks/invoices/README.md#getpdf) - Get a PDF for an invoice\n* [issueInvoice](docs/sdks/invoices/README.md#issueinvoice) - Issue an invoice\n* [list](docs/sdks/invoices/README.md#list) - List invoices\n* [update](docs/sdks/invoices/README.md#update) - Update a draft invoice\n\n### [IPAddresses](docs/sdks/ipaddresses/README.md)\n\n* [get](docs/sdks/ipaddresses/README.md#get) - Get Paddle IP addresses\n\n### [Notifications](docs/sdks/notifications/README.md)\n\n* [createSetting](docs/sdks/notifications/README.md#createsetting) - Create a notification setting\n* [deleteSetting](docs/sdks/notifications/README.md#deletesetting) - Delete a notification setting\n* [get](docs/sdks/notifications/README.md#get) - Get a notification\n* [getSetting](docs/sdks/notifications/README.md#getsetting) - Get a notification setting\n* [list](docs/sdks/notifications/README.md#list) - List notifications\n* [listLogs](docs/sdks/notifications/README.md#listlogs) - List logs for a notification\n* [listSettings](docs/sdks/notifications/README.md#listsettings) - List notification settings\n* [replay](docs/sdks/notifications/README.md#replay) - Replay a notification\n* [replayBySetting](docs/sdks/notifications/README.md#replaybysetting) - Replay notifications by notification setting\n* [updateSettings](docs/sdks/notifications/README.md#updatesettings) - Update a notification setting\n\n### [Prices](docs/sdks/prices/README.md)\n\n* [create](docs/sdks/prices/README.md#create) - Create a price\n* [get](docs/sdks/prices/README.md#get) - Get a price\n* [list](docs/sdks/prices/README.md#list) - List prices\n* [update](docs/sdks/prices/README.md#update) - Update a price\n\n### [Transactions](docs/sdks/transactions/README.md)\n\n* [create](docs/sdks/transactions/README.md#create) - Create a transaction\n* [get](docs/sdks/transactions/README.md#get) - Get a transaction\n* [getInvoice](docs/sdks/transactions/README.md#getinvoice) - Get a PDF invoice for a transaction\n* [list](docs/sdks/transactions/README.md#list) - List transactions\n* [previewTransaction](docs/sdks/transactions/README.md#previewtransaction) - Preview a transaction\n* [pricePreview](docs/sdks/transactions/README.md#pricepreview) - Preview prices\n* [update](docs/sdks/transactions/README.md#update) - Update a transaction\n\n### [TransactionService](docs/sdks/transactionservice/README.md)\n\n* [create](docs/sdks/transactionservice/README.md#create) - Create a transaction\n* [get](docs/sdks/transactionservice/README.md#get) - Get a transaction\n* [list](docs/sdks/transactionservice/README.md#list) - List transactions\n* [previewTransaction](docs/sdks/transactionservice/README.md#previewtransaction) - Preview a transaction\n* [pricePreview](docs/sdks/transactionservice/README.md#pricepreview) - Preview prices\n* [update](docs/sdks/transactionservice/README.md#update) - Update a transaction\n\n### [Products](docs/sdks/products/README.md)\n\n* [create](docs/sdks/products/README.md#create) - Create a product\n* [get](docs/sdks/products/README.md#get) - Get a product\n* [list](docs/sdks/products/README.md#list) - List products\n* [update](docs/sdks/products/README.md#update) - Update a product\n\n### [Subscriptions](docs/sdks/subscriptions/README.md)\n\n* [cancel](docs/sdks/subscriptions/README.md#cancel) - Cancel a subscription\n* [create](docs/sdks/subscriptions/README.md#create) - Create a one-time charge for a subscription\n* [createPreview](docs/sdks/subscriptions/README.md#createpreview) - Preview one-off charge for a subscription\n* [get](docs/sdks/subscriptions/README.md#get) - Get a subscription\n* [getUpdatedPaymentMethodTransaction](docs/sdks/subscriptions/README.md#getupdatedpaymentmethodtransaction) - Get a transaction to update payment method\n* [list](docs/sdks/subscriptions/README.md#list) - List subscriptions\n* [pause](docs/sdks/subscriptions/README.md#pause) - Pause a subscription\n* [previewSubscription](docs/sdks/subscriptions/README.md#previewsubscription) - Preview an update to a subscription\n* [resumeSubscription](docs/sdks/subscriptions/README.md#resumesubscription) - Resume a paused subscription\n* [update](docs/sdks/subscriptions/README.md#update) - Update a subscription\n\u003c!-- End Available Resources and Operations [operations] --\u003e\n\n\n\n\u003c!-- Start Server Selection [server] --\u003e\n## Server Selection\n\n## Server Selection\n\n### Select Server by Index\n\nYou can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:\n\n| # | Server | Variables |\n| - | ------ | --------- |\n| 0 | `https://api.paddle.com` | None |\n| 1 | `https://sandbox-api.paddle.com` | None |\n\n\n\n\n### Override Server URL Per-Client\n\nThe default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:\n\u003c!-- End Server Selection [server] --\u003e\n\n\u003c!-- Placeholder for Future Speakeasy SDK Sections --\u003e\n\n\n\n### Maturity\n\nThis SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage\nto a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally\nlooking for the latest version.\n\n### Contributions\n\nWhile we value open-source contributions to this SDK, this library is generated programmatically.\nFeel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release!\n\n### SDK Created by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeakeasy-sdks%2Fpaddle-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspeakeasy-sdks%2Fpaddle-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeakeasy-sdks%2Fpaddle-php/lists"}