{"openapi":"3.0.3","info":{"title":"Skyfire Seller Service API","version":"1.0.0","description":"This API verifies a Skyfire token from the 'skyfire-pay-id' header, optionally charges the token if it is a pay token, and returns a message array along with a detailed breakdown of summing the digits of today's UTC date."},"servers":[{"url":"https://skyfire-official-service-1.skyfire.xyz"},{"url":"@API"}],"paths":{"/":{"options":{"summary":"CORS Preflight","responses":{"204":{"description":"CORS preflight successful"}}},"post":{"summary":"Verify JWT, optionally charge token, and sum digits of today's UTC date","description":"Verifies the provided Skyfire JWT from the 'skyfire-pay-id' header. If the token type is 'pay' or 'kya+pay', it charges the token. Always returns a message array and a breakdown of summing the digits of today's UTC date.","parameters":[{"name":"skyfire-pay-id","in":"header","description":"Skyfire JWT token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Token is valid. Returns the message array and the sum of the digits in today's date.","content":{"application/json":{"schema":{"type":"object","properties":{"response":{"type":"array","items":{"type":"string"}},"sumSteps":{"type":"object","properties":{"step1":{"type":"string"},"step2":{"type":"string"},"step3":{"type":"string"},"step4":{"type":"string"},"step5":{"type":"string"},"step6":{"type":"string"},"sum":{"type":"integer"}}}}},"examples":{"success":{"summary":"Example response","value":{"response":["Your pay token is valid! :)","Your pay token was charged $1! :)","The sum of the digits in today's date is: 22"],"sumSteps":{"step1":"Get today's date in UTC: Sat, 08 Jun 2024 00:00:00 GMT","step2":"Format as string: 2024-06-08","step3":"Remove hyphens: 20240608","step4":"Split into digits: [2, 0, 2, 4, 0, 6, 0, 8]","step5":"Sum the digits: 2 + 0 + 2 + 4 + 0 + 6 + 0 + 8 = 22","step6":"Return a string: The sum of the digits in today's date is: 22","sum":22}}}}}}},"400":{"description":"Charging failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}}}}