We also recommend a consistent way of informing callers when they do not include the required KYAPay
token in their requests.
- When a KYAPay token is missing
- Return an HTTP
402
Status Code - In the body include a message on how to create these tokens e.g.
ERROR: Missing KYAPay token in the skyfire-pay-id header. Please create an account at https://app.skyfire.xyz and create a kya | pay | kya+pay token - https://docs.skyfire.xyz/reference/create-token and include it in your request in the skyfire-pay-id header.
- Return an HTTP
- When a KYAPay token is invalid
- Return an HTTP
402
Status Code - In the body include a message on how to create these tokens e.g.
ERROR: Missing KYAPay token in the skyfire-pay-id header. Please create an account at https://app.skyfire.xyz and create a kya | pay | kya+pay token - https://docs.skyfire.xyz/reference/create-token and include it in your request in the skyfire-pay-id header.
- Return an HTTP
- Specifically when a pay token is missing
- Return an HTTP
402
Status Code - In the body include a message on how to create these tokens e.g.
ERROR: Missing pay token in the skyfire-pay-id header. Please create an account at https://app.skyfire.xyz and create a pay token - https://docs.skyfire.xyz/reference/create-token and include it in your request in the skyfire-pay-id header. The required amount is ...
- Return an HTTP
- Specifically when a pay token is depleted
- Return an HTTP
402
Status Code - In the body include a message e.g.
ERROR: The given pay token is depleted. Please create and send a new pay token. The required amount is ...
- Return an HTTP