novinzodevelopers
Your store's APIApps referenceReseller finance

Put Credit Variant

PUT/admin/credit-variants/{variantId}

Sells this variant as reseller credit: core is told this plugin delivers it, and each unit bought credits minorPerUnit to the buyer's balance. A unit is credited at minorPerUnit as it stands when core delivers the order, which may be after a change made since it was paid.

Path Parameters

variantId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

minorPerUnit*integer
Range0 < value <= 9007199254740991
bonusRules*array<>
Itemsitems <= 10

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/admin/credit-variants/string" \  -H "Content-Type: application/json" \  -d '{    "minorPerUnit": 1,    "bonusRules": [      {        "minUnits": 1,        "bonusBps": 0      }    ]  }'
{  "variantId": "string",  "minorPerUnit": 1,  "bonusRules": [    {      "minUnits": 1,      "bonusBps": 0    }  ],  "createdAt": "string",  "updatedAt": "string"}