@agentpay-global/sdk 0.3.0 → 0.3.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
@@ -91,7 +91,7 @@ try {
91
91
  ```ts
92
92
  new AgentPay({
93
93
  apiKey: process.env.AGENTPAY_API_KEY!,
94
- baseUrl: 'https://api.joomjoo.com', // optional override
94
+ baseUrl: 'https://api.agentpay.global', // optional override
95
95
  });
96
96
  ```
97
97
 
package/dist/index.d.ts CHANGED
@@ -75,6 +75,30 @@ export interface Checkout {
75
75
  order_total?: string | null;
76
76
  needs_login?: boolean;
77
77
  error_reason?: string | null;
78
+ /** Why the run is paused or ended (2026-11-10). Null while it works and on submitted. Switch on `stop.code`
79
+ * (an open set: accept codes you do not know) and show `stop.message` and `stop.next` to a person. */
80
+ stop?: CheckoutStop | null;
81
+ }
82
+ /** The stop object on a paused or ended checkout. */
83
+ export interface CheckoutStop {
84
+ /** Stable snake_case name, e.g. merchant_code_required, over_cap, insufficient_funds, checkout_blocked. Open set. */
85
+ code: string;
86
+ /** Who can act next. */
87
+ on: 'merchant' | 'bank' | 'approver' | 'you' | 'agentpay' | 'undetermined' | string;
88
+ /** One plain sentence built from verified facts, safe to show a person. */
89
+ message: string;
90
+ /** What to do, with a working link when one exists. */
91
+ next: string;
92
+ /** same_run: the paused run continues once acted on; new_run: start a new checkout; none: do not retry (payment may have been submitted, or nothing to do). */
93
+ continue: 'same_run' | 'new_run' | 'none' | string;
94
+ /** not_attempted: Pay was never clicked; attempted: it was; uncertain: the outcome is in doubt, check the merchant before retrying. */
95
+ payment_state: 'not_attempted' | 'attempted' | 'uncertain' | string;
96
+ /** Every card issued for this run is closed. */
97
+ card_closed: boolean;
98
+ /** Code-specific, masked facts (destination_last4, channel, page, found, expected, choice, kind, also...). */
99
+ details?: Record<string, unknown>;
100
+ /** One id per pause or ending; webhook event ids carry it. */
101
+ transition_id?: string;
78
102
  }
79
103
  export interface Connection {
80
104
  connection_id: string;
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@
11
11
  */
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.AgentPay = exports.AgentPayError = void 0;
14
- const DEFAULT_BASE_URL = 'https://api.joomjoo.com';
14
+ const DEFAULT_BASE_URL = 'https://api.agentpay.global';
15
15
  /** Thrown on any non-2xx response. Carries the HTTP status, the AgentPay error code, and the request id. */
16
16
  class AgentPayError extends Error {
17
17
  constructor(message, status, code, requestId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentpay-global/sdk",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Official AgentPay SDK. Issue capped virtual cards and let your agent complete real checkouts. 3DS handled.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -31,6 +31,6 @@
31
31
  },
32
32
  "repository": {
33
33
  "type": "git",
34
- "url": "https://github.com/Kato-Official/agentpay-skills.git"
34
+ "url": "git+https://github.com/Kato-Official/agentpay-skills.git"
35
35
  }
36
36
  }