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
Range
0 < value <= 9007199254740991bonusRules*array<>
Items
items <= 10Response 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"}