Create a reward rule (cashback, accrual, or conversion)
Creates a cashback, accrual or conversion rule, scoped to merchants, categories or one offering, and capped per transaction and per user per day.
/v1/reward_rulesCreates a cashback, accrual or conversion rule, scoped to merchants, categories or one offering, and capped per transaction and per user per day. Requires rewards:manage. Rules are evaluated as of the instant a payment was captured, not when the reward job runs, so a rule created after a capture never earns on it. invalid_request (400) covers a missing body, an unknown kind and parameters the rule engine rejects.
Authorization
bearerAuth A tenant API key (sk_{env}_{id}_{secret}), a wallet user token, or an IdP access token. Which principal the credential resolves to decides the scopes it carries; see the authentication guide.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/v1/reward_rules" \ -H "Content-Type: application/json" \ -d '{ "kind": "cashback", "params": {} }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "string", "params": {}, "scope": {}, "caps": {}, "starts_at": "2019-08-24T14:15:22Z", "ends_at": "2019-08-24T14:15:22Z", "version": 0, "status": "string", "created_at": "2019-08-24T14:15:22Z", "disabled_at": "2019-08-24T14:15:22Z"}