stop

View as MarkdownOpen in Claude

Stop payment collection.

Returns

Promise<Record<string, unknown>> — Server acknowledgment.

Example

1import { RelayClient } from '@signalwire/sdk';
2
3const client = new RelayClient({
4 project: process.env.SIGNALWIRE_PROJECT_ID!,
5 token: process.env.SIGNALWIRE_TOKEN!,
6 contexts: ['default']
7});
8
9client.onCall(async (call) => {
10 await call.answer();
11 const action = await call.pay('https://example.com/payment-connector', {
12 chargeAmount: '29.99',
13 currency: 'USD',
14 });
15
16 // Stop payment collection
17 await action.stop();
18});
19
20await client.run();