Get Delivery Settings
Read how a Program delivers Rewards: hold days and the method of each benefit kind. Needs the programs:read key permission.
Authorization
WorkspaceApiKey Workspace-owned Better Auth API key of one environment (Sandbox or Live); it authorizes the Projects of that environment in its Workspace. A Project of the other environment returns 403 ENVIRONMENT_MISMATCH. Never expose it in the browser.
In: header
Path Parameters
\S1 <= length <= 512Query Parameters
1 <= length <= 128Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/programs/string/delivery-settings?projectId=string"{ "success": true, "data": { "programId": "string", "holdDays": 0, "cashMethod": "operator", "creditMethod": "operator", "discountMethod": "operator", "customMethod": "operator", "planUpgrades": [ { "unitKey": "string", "provider": "dodo", "plan": "string", "periods": -9007199254740991 } ], "options": { "cash": [ "operator" ], "credit": [ "operator" ], "discount": [ "operator" ], "custom": [ "operator" ] }, "updatedAt": "string" }}Fulfill Reward POST
Records that your product granted the Reward, or that you paid a cash Reward yourself. Only a Reward whose delivery method is `operator` or `manual` takes it; RefRef delivers the other methods, and they return 400. The Reward ID is the idempotency key: a repeat with the same facts, or after a webhook delivery recorded the fulfillment, returns the Reward; other facts return 409. A Reward voided before its grant has a cancelled delivery, and a fulfillment of it returns 409.
Get Event GET
Read one Event with its facts. Needs the referrals:read key permission.