devdraftengineer/php
最新稳定版本:v1.0.0
Composer 安装命令:
composer require devdraftengineer/php
包简介
A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
关键字:
README 文档
README
A comprehensive payment processing and business management API that enables seamless integration of cryptocurrency and traditional payment methods.
Installation & Usage
Requirements
PHP 8.1 and later.
Composer
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/devdraftengineer/php.git"
}
],
"require": {
"devdraftengineer/php": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php:
<?php require_once('/path/to/devdraft/vendor/autoload.php');
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: x-client-secret $config = Devdraft\Configuration::getDefaultConfiguration()->setApiKey('x-client-secret', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Devdraft\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-client-secret', 'Bearer'); // Configure API key authorization: x-client-key $config = Devdraft\Configuration::getDefaultConfiguration()->setApiKey('x-client-key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Devdraft\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-client-key', 'Bearer'); $apiInstance = new Devdraft\Api\APIHealthApi( // 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 ); try { $result = $apiInstance->healthControllerCheckV0(); print_r($result); } catch (Exception $e) { echo 'Exception when calling APIHealthApi->healthControllerCheckV0: ', $e->getMessage(), PHP_EOL; }
Examples
This SDK includes comprehensive examples demonstrating common use cases. Each example includes simple usage, advanced workflows, and error handling scenarios.
Quick Start Example
<?php // PHP quick start example // See examples directory for full implementation
Available Example Files
Example Structure
Each example file contains:
- Simple Examples: Basic usage with minimal code
- Advanced Examples: Complex workflows and best practices
- Error Scenarios: How to handle errors and edge cases
For detailed examples, see the examples directory.
API Endpoints
All URIs are relative to https://api.devdraft.ai
| Class | Method | HTTP request | Description |
|---|---|---|---|
| APIHealthApi | healthControllerCheckV0 | GET /api/v0/health | Authenticated health check endpoint |
| APIHealthApi | healthControllerPublicHealthCheckV0 | GET /api/v0/health/public | Public health check endpoint |
| AppBalancesApi | balanceControllerGetAllBalances | GET /api/v0/balance | Get all stablecoin balances for an app |
| AppBalancesApi | balanceControllerGetEURCBalance | GET /api/v0/balance/eurc | Get EURC balance for an app |
| AppBalancesApi | balanceControllerGetUSDCBalance | GET /api/v0/balance/usdc | Get USDC balance for an app |
| CustomersApi | customerControllerCreate | POST /api/v0/customers | Create a new customer |
| CustomersApi | customerControllerFindAll | GET /api/v0/customers | Get all customers with filters |
| CustomersApi | customerControllerFindOne | GET /api/v0/customers/{id} | Get a customer by ID |
| CustomersApi | customerControllerUpdate | PATCH /api/v0/customers/{id} | Update a customer |
| ExchangeRatesApi | exchangeRateControllerGetEURToUSDRate | GET /api/v0/exchange-rate/eur-to-usd | Get EUR to USD exchange rate |
| ExchangeRatesApi | exchangeRateControllerGetExchangeRate | GET /api/v0/exchange-rate | Get exchange rate between specified currencies |
| ExchangeRatesApi | exchangeRateControllerGetUSDToEURRate | GET /api/v0/exchange-rate/usd-to-eur | Get USD to EUR exchange rate |
| InvoicesApi | invoiceControllerCreate | POST /api/v0/invoices | Create a new invoice |
| InvoicesApi | invoiceControllerFindAll | GET /api/v0/invoices | Get all invoices |
| InvoicesApi | invoiceControllerFindOne | GET /api/v0/invoices/{id} | Get an invoice by ID |
| InvoicesApi | invoiceControllerUpdate | PUT /api/v0/invoices/{id} | Update an invoice |
| LiquidationAddressesApi | liquidationAddressControllerCreateLiquidationAddress | POST /api/v0/customers/{customerId}/liquidation_addresses | Create a new liquidation address for a customer |
| LiquidationAddressesApi | liquidationAddressControllerGetLiquidationAddress | GET /api/v0/customers/{customerId}/liquidation_addresses/{liquidationAddressId} | Get a specific liquidation address |
| LiquidationAddressesApi | liquidationAddressControllerGetLiquidationAddresses | GET /api/v0/customers/{customerId}/liquidation_addresses | Get all liquidation addresses for a customer |
| PaymentIntentsApi | paymentIntentControllerCreateBankPaymentIntent | POST /api/v0/payment-intents/bank | Create a bank payment intent |
| PaymentIntentsApi | paymentIntentControllerCreateStablePaymentIntent | POST /api/v0/payment-intents/stablecoin | Create a stable payment intent |
| PaymentLinksApi | paymentLinksControllerCreate | POST /api/v0/payment-links | Create a new payment link |
| PaymentLinksApi | paymentLinksControllerFindAll | GET /api/v0/payment-links | Get all payment links |
| PaymentLinksApi | paymentLinksControllerFindOne | GET /api/v0/payment-links/{id} | Get a payment link by ID |
| PaymentLinksApi | paymentLinksControllerUpdate | PUT /api/v0/payment-links/{id} | Update a payment link |
| ProductsApi | productControllerCreate | POST /api/v0/products | Create a new product |
| ProductsApi | productControllerFindAll | GET /api/v0/products | Get all products |
| ProductsApi | productControllerFindOne | GET /api/v0/products/{id} | Get a product by ID |
| ProductsApi | productControllerRemove | DELETE /api/v0/products/{id} | Delete a product |
| ProductsApi | productControllerUpdate | PUT /api/v0/products/{id} | Update a product |
| ProductsApi | productControllerUploadImage | POST /api/v0/products/{id}/images | Upload images for a product |
| TaxesApi | taxControllerCreate | POST /api/v0/taxes | Create a new tax |
| TaxesApi | taxControllerDeleteWithoutId | DELETE /api/v0/taxes | Tax ID required for deletion |
| TaxesApi | taxControllerFindAll | GET /api/v0/taxes | Get all taxes with filters |
| TaxesApi | taxControllerFindOne | GET /api/v0/taxes/{id} | Get a tax by ID |
| TaxesApi | taxControllerRemove | DELETE /api/v0/taxes/{id} | Delete a tax |
| TaxesApi | taxControllerUpdate | PUT /api/v0/taxes/{id} | Update a tax |
| TaxesApi | taxControllerUpdateWithoutId | PUT /api/v0/taxes | Tax ID required for updates |
| TestPaymentsApi | testPaymentControllerCreatePaymentV0 | POST /api/v0/test-payment | Process a test payment |
| TestPaymentsApi | testPaymentControllerGetPaymentV0 | GET /api/v0/test-payment/{id} | Get payment details by ID |
| TestPaymentsApi | testPaymentControllerRefundPaymentV0 | POST /api/v0/test-payment/{id}/refund | Refund a payment |
| TransfersApi | transferControllerCreateDirectBankTransfer | POST /api/v0/transfers/direct-bank | Create a direct bank transfer |
| TransfersApi | transferControllerCreateDirectWalletTransfer | POST /api/v0/transfers/direct-wallet | Create a direct wallet transfer |
| TransfersApi | transferControllerCreateExternalBankTransfer | POST /api/v0/transfers/external-bank-transfer | Create an external bank transfer |
| TransfersApi | transferControllerCreateExternalStablecoinTransfer | POST /api/v0/transfers/external-stablecoin-transfer | Create an external stablecoin transfer |
| TransfersApi | transferControllerCreateStablecoinConversion | POST /api/v0/transfers/stablecoin-conversion | Create a stablecoin conversion |
| WalletsApi | walletControllerGetWallets | GET /api/v0/wallets | Get wallets for an app |
| WebhooksApi | webhookControllerCreate | POST /api/v0/webhooks | Create a new webhook |
| WebhooksApi | webhookControllerFindAll | GET /api/v0/webhooks | Get all webhooks |
| WebhooksApi | webhookControllerFindOne | GET /api/v0/webhooks/{id} | Get a webhook by id |
| WebhooksApi | webhookControllerRemove | DELETE /api/v0/webhooks/{id} | Delete a webhook |
| WebhooksApi | webhookControllerUpdate | PATCH /api/v0/webhooks/{id} | Update a webhook |
Models
- AggregatedBalanceResponse
- AllBalancesResponse
- BridgeFiatPaymentRail
- BridgePaymentRail
- CreateBankPaymentIntentDto
- CreateCustomerDto
- CreateDirectBankTransferDto
- CreateDirectWalletTransferDto
- CreateExternalBankTransferDto
- CreateExternalStablecoinTransferDto
- CreateInvoiceDto
- CreateLiquidationAddressDto
- CreatePaymentLinkDto
- CreateStablePaymentIntentDto
- CreateStablecoinConversionDto
- CreateTaxDto
- CreateWebhookDto
- CustomerStatus
- CustomerType
- DestinationCurrency
- ExchangeRateResponseDto
- FiatCurrency
- HealthResponseDto
- InvoiceProductDto
- LiquidationAddressResponseDto
- PaymentLinkProductDto
- PaymentRequestDto
- PaymentResponseDto
- PublicHealthResponseDto
- RefundResponseDto
- StableCoinCurrency
- TaxControllerCreate201Response
- TaxControllerDeleteWithoutId400Response
- TaxControllerUpdateWithoutId400Response
- UpdateCustomerDto
- UpdateTaxDto
- UpdateWebhookDto
- WebhookResponseDto
Authorization
Authentication schemes defined for the API:
x-client-key
- Type: API key
- API key parameter name: x-client-key
- Location: HTTP header
x-client-secret
- Type: API key
- API key parameter name: x-client-secret
- Location: HTTP header
idempotency-key
- Type: API key
- API key parameter name: idempotency-key
- Location: HTTP header
Tests
To run the tests, use:
composer install vendor/bin/phpunit
Author
About this package
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
1.0.0- Generator version:
7.17.0
- Generator version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: unlicense
- 更新时间: 2025-11-19