Create a sandbox goal
create_test_goalCreates a goal with POST /goals/create using the test key. No money moves. Returns goalId, paymentUrl (hosted checkout) and clientSecret (embedded checkout). Amounts are integer cents, USD.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deadline | No | ISO 8601 due date, 24h to 2 years out (one-time goals only) | |
| imageUrl | No | ||
| metadata | No | Echoed verbatim in every webhook, e.g. { orderId } | |
| cancelUrl | No | ||
| frequency | No | Makes it a recurring subscription; omit for a one-time purchase | |
| callbackUrl | No | Where the buyer returns after confirming; localhost is allowed in test mode | |
| description | Yes | What the buyer is saving for, max 500 characters | |
| targetAmount | Yes | Price in cents, e.g. 2999 = $29.99 | |
| depositAmount | No | Upfront card charge in cents. One-time: ≥ 50 and < targetAmount. Subscription: = targetAmount or omit | |
| providerLinkCode | Yes | From register_test_provider | |
| depositRefundable | No |