diff --git a/.changeset/young-rings-speak.md b/.changeset/young-rings-speak.md new file mode 100644 index 0000000..17f11ec --- /dev/null +++ b/.changeset/young-rings-speak.md @@ -0,0 +1,5 @@ +--- +"@oaknetwork/payments-sdk": minor +--- + +updated new cs domain diff --git a/packages/payments/README.md b/packages/payments/README.md index de55a43..2551714 100644 --- a/packages/payments/README.md +++ b/packages/payments/README.md @@ -81,7 +81,7 @@ The SDK ships 17 service modules. Import the factory function for each service y | [Payment Methods](https://www.oaknetwork.org/docs/sdk/payment-methods) | `createPaymentMethodService(client)` | Add, list, get, delete payment methods | | [Webhooks](https://www.oaknetwork.org/docs/sdk/webhooks) | `createWebhookService(client)` | Register, manage, and monitor webhooks | | [Transactions](https://www.oaknetwork.org/docs/sdk/transactions) | `createTransactionService(client)` | List, get, and settle transactions | -| [Transfers](https://www.oaknetwork.org/docs/sdk/transfers) | `createTransferService(client)` | Create provider transfers (Stripe, PagarMe, BRLA) | +| [Transfers](https://www.oaknetwork.org/docs/sdk/transfers) | `createTransferService(client)` | Create provider transfers (Stripe, PagarMe, BRLA) | | [Plans](https://www.oaknetwork.org/docs/sdk/plans) | `createPlanService(client)` | CRUD subscription plans | | [Subscriptions](https://www.oaknetwork.org/docs/sdk/subscriptions) | `createSubscriptionService(client)` | Subscribe, cancel, list, pay subscriptions | | [Refunds](https://www.oaknetwork.org/docs/sdk/refunds) | `createRefundService(client)` | Refund a payment (full or partial) | @@ -387,10 +387,10 @@ if (result.ok) { ### Environments -| Environment | API Base URL | Description | -| ------------ | ----------------------------------- | -------------------------------- | -| `sandbox` | `https://api-stage.usecrowdpay.xyz` | Testing — all operations allowed | -| `production` | `https://app.usecrowdpay.xyz` | Live — test operations blocked | +| Environment | API Base URL | Description | +| ------------ | --------------------------------------- | -------------------------------- | +| `sandbox` | `https://stage-payments.oaknetwork.org` | Testing — all operations allowed | +| `production` | `https://payments.oaknetwork.org` | Live — test operations blocked | ```typescript const client = createOakClient({ diff --git a/packages/payments/src/types/environment.ts b/packages/payments/src/types/environment.ts index 8a5178a..b259f0e 100644 --- a/packages/payments/src/types/environment.ts +++ b/packages/payments/src/types/environment.ts @@ -6,15 +6,17 @@ export interface EnvironmentConfig { } export const ENVIRONMENT_URLS: Record = { - sandbox: "https://api-stage.usecrowdpay.xyz", - production: "https://app.usecrowdpay.xyz", + sandbox: "https://stage-payments.oaknetwork.org", + production: "https://payments.oaknetwork.org", }; /** * @param environment - Target environment * @returns Configuration for the specified environment */ -export function getEnvironmentConfig(environment: OakEnvironment): EnvironmentConfig { +export function getEnvironmentConfig( + environment: OakEnvironment, +): EnvironmentConfig { return { apiUrl: ENVIRONMENT_URLS[environment], allowsTestOperations: environment === "sandbox", @@ -28,7 +30,7 @@ export function getEnvironmentConfig(environment: OakEnvironment): EnvironmentCo */ export function resolveBaseUrl( environment: OakEnvironment, - customUrl?: string + customUrl?: string, ): string { if (customUrl) { return customUrl;