@proxy-checkout/server-js 0.0.4-pr-76.34.1 → 0.0.4-prx-88.37.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -41,6 +41,9 @@ const handoff = await proxy.sessions.createHandoff({
41
41
  items: [{ product_id: "prod_123", quantity: 1 }],
42
42
  },
43
43
  idempotencyKey: "order_123",
44
+ // Optional: omit in normal production flows to use the dashboard default.
45
+ // Preview/staging/multi-origin environments may override the merchant payer page.
46
+ payerDestinationUrl: "https://preview.example.com/checkout",
44
47
  });
45
48
 
46
49
  console.log(handoff.handoffUrl);
@@ -79,6 +82,14 @@ if (event.type === "subscription.renewed") {
79
82
  Production calls default to `https://api.proxycheckout.com`. Tests, local
80
83
  development, and previews can pass `apiHost`.
81
84
 
85
+ Configure a production/default payer destination and allowed hosts in the Proxy
86
+ dashboard. `payerDestinationUrl` is optional. Most production integrations can
87
+ omit it and use the dashboard default. Preview, staging, or multi-origin
88
+ environments may pass `payerDestinationUrl` to `sessions.createHandoff(...)`;
89
+ Proxy validates the host against the configured allowed hosts, stores the
90
+ destination on the handoff session, and forwards the payer there when the hosted
91
+ handoff opens.
92
+
82
93
  ## First Publish Decisions
83
94
 
84
95
  The first public package versions are intentionally `0.0.x` because the SDK API is
@@ -18,6 +18,7 @@ export interface CreateProxySessionInput extends CreateProxySessionOptions {
18
18
  };
19
19
  }
20
20
  export interface CreateProxySessionHandoffInput extends CreateProxySessionInput {
21
+ readonly payerDestinationUrl?: string;
21
22
  readonly payHost?: string;
22
23
  readonly publishableKey?: string;
23
24
  }
@@ -18,6 +18,7 @@ export interface CreateProxySessionInput extends CreateProxySessionOptions {
18
18
  };
19
19
  }
20
20
  export interface CreateProxySessionHandoffInput extends CreateProxySessionInput {
21
+ readonly payerDestinationUrl?: string;
21
22
  readonly payHost?: string;
22
23
  readonly publishableKey?: string;
23
24
  }
@@ -68,6 +68,9 @@ class ProxySessionsResource {
68
68
  }
69
69
  const response = await this.httpClient.request("POST", "/proxy_sessions/handoff", {
70
70
  ...toCreateProxySessionBody(input),
71
+ ...(input.payerDestinationUrl !== undefined
72
+ ? { payer_destination_url: input.payerDestinationUrl }
73
+ : {}),
71
74
  publishable_key: publishableKey,
72
75
  }, {
73
76
  idempotencyKey: input.idempotencyKey,
@@ -1,3 +1,3 @@
1
1
  export declare const proxyCheckoutServerSdkName = "@proxy-checkout/server-js";
2
- export declare const proxyCheckoutServerSdkVersion = "0.0.4-pr-76.34.1";
3
- export declare const proxyCheckoutServerSdkUserAgent = "@proxy-checkout/server-js/0.0.4-pr-76.34.1";
2
+ export declare const proxyCheckoutServerSdkVersion = "0.0.4-prx-88.37.1";
3
+ export declare const proxyCheckoutServerSdkUserAgent = "@proxy-checkout/server-js/0.0.4-prx-88.37.1";
@@ -1,3 +1,3 @@
1
1
  export declare const proxyCheckoutServerSdkName = "@proxy-checkout/server-js";
2
- export declare const proxyCheckoutServerSdkVersion = "0.0.4-pr-76.34.1";
3
- export declare const proxyCheckoutServerSdkUserAgent = "@proxy-checkout/server-js/0.0.4-pr-76.34.1";
2
+ export declare const proxyCheckoutServerSdkVersion = "0.0.4-prx-88.37.1";
3
+ export declare const proxyCheckoutServerSdkUserAgent = "@proxy-checkout/server-js/0.0.4-prx-88.37.1";
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.proxyCheckoutServerSdkUserAgent = exports.proxyCheckoutServerSdkVersion = exports.proxyCheckoutServerSdkName = void 0;
4
4
  exports.proxyCheckoutServerSdkName = "@proxy-checkout/server-js";
5
- exports.proxyCheckoutServerSdkVersion = "0.0.4-pr-76.34.1";
5
+ exports.proxyCheckoutServerSdkVersion = "0.0.4-prx-88.37.1";
6
6
  exports.proxyCheckoutServerSdkUserAgent = `${exports.proxyCheckoutServerSdkName}/${exports.proxyCheckoutServerSdkVersion}`;
@@ -18,6 +18,7 @@ export interface CreateProxySessionInput extends CreateProxySessionOptions {
18
18
  };
19
19
  }
20
20
  export interface CreateProxySessionHandoffInput extends CreateProxySessionInput {
21
+ readonly payerDestinationUrl?: string;
21
22
  readonly payHost?: string;
22
23
  readonly publishableKey?: string;
23
24
  }
@@ -65,6 +65,9 @@ export class ProxySessionsResource {
65
65
  }
66
66
  const response = await this.httpClient.request("POST", "/proxy_sessions/handoff", {
67
67
  ...toCreateProxySessionBody(input),
68
+ ...(input.payerDestinationUrl !== undefined
69
+ ? { payer_destination_url: input.payerDestinationUrl }
70
+ : {}),
68
71
  publishable_key: publishableKey,
69
72
  }, {
70
73
  idempotencyKey: input.idempotencyKey,
@@ -1,3 +1,3 @@
1
1
  export declare const proxyCheckoutServerSdkName = "@proxy-checkout/server-js";
2
- export declare const proxyCheckoutServerSdkVersion = "0.0.4-pr-76.34.1";
3
- export declare const proxyCheckoutServerSdkUserAgent = "@proxy-checkout/server-js/0.0.4-pr-76.34.1";
2
+ export declare const proxyCheckoutServerSdkVersion = "0.0.4-prx-88.37.1";
3
+ export declare const proxyCheckoutServerSdkUserAgent = "@proxy-checkout/server-js/0.0.4-prx-88.37.1";
@@ -1,3 +1,3 @@
1
1
  export const proxyCheckoutServerSdkName = "@proxy-checkout/server-js";
2
- export const proxyCheckoutServerSdkVersion = "0.0.4-pr-76.34.1";
2
+ export const proxyCheckoutServerSdkVersion = "0.0.4-prx-88.37.1";
3
3
  export const proxyCheckoutServerSdkUserAgent = `${proxyCheckoutServerSdkName}/${proxyCheckoutServerSdkVersion}`;
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "sideEffects": false,
8
8
  "type": "module",
9
9
  "types": "./dist/esm/index.d.ts",
10
- "version": "0.0.4-pr-76.34.1",
10
+ "version": "0.0.4-prx-88.37.1",
11
11
  "devDependencies": {
12
12
  "@types/node": "^24.12.4",
13
13
  "@vitest/coverage-v8": "4.1.7",