Skip to Content
veriom

Check promotion code

Say what a promotion code takes off before an admin opens Checkout with it. Answers 422 ``promotion_code_invalid`` for a code Stripe does not have, or no longer accepts. Checkout checks the code again when it opens.

POST
/v1/workspaces/{workspace_id}/plan/promotion-code

Say what a promotion code takes off before an admin opens Checkout with it.

Answers 422 promotion_code_invalid for a code Stripe does not have, or no longer accepts. Checkout checks the code again when it opens.

Authorization

workspaceToken
headerAuthorizationBearer <vat_<opaque-token>>

Expiring, hashed workspace token with explicit scopes.

Path Parameters

workspace_id*Workspace Id
Formatuuid

Request Body

application/json
  1. body
code*Code
Match^[A-Za-z0-9]{3,40}$

Response Body

Successful Response

application/json
  1. response
amount_off_usd*string|null
code*Code

The code as Stripe stores it.

duration*Duration
Value in"once""repeating""forever"
duration_in_months*integer|null
expires_at*|null
percent_off*string|null
summary*Summary

What it takes off, in words: '20% off for 3 months'.

Example Request
curl -X POST 'https://api.veriom.ai/v1/workspaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/plan/promotion-code' \  -H 'Content-Type: application/json' \  -d '{  "code": "string"}'
Example Response
{  "amount_off_usd": "string",  "code": "string",  "duration": "once",  "duration_in_months": 0,  "expires_at": "2019-08-24T14:15:22Z",  "percent_off": "string",  "summary": "string"}