{"openapi":"3.1.0","info":{"title":"RazCrypto Gateway API","version":"1.0.0","description":"Non-custodial crypto payments. Authenticate with a secret key: `Authorization: Bearer sk_live_…` (or `sk_test_…` for test mode). See https://razcryptogateway.com/docs.","license":{"name":"AGPL-3.0","url":"https://www.gnu.org/licenses/agpl-3.0.html"}},"components":{"securitySchemes":{"secretKey":{"type":"http","scheme":"bearer","description":"`sk_live_…` / `sk_test_…`"},"checkoutToken":{"type":"apiKey","in":"query","name":"t"}},"schemas":{}},"paths":{"/checkout/v1/sessions":{"post":{"tags":["checkout"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","maxLength":100},"payment_id":{"type":"string","pattern":"^pay_[0-9A-Za-z]{20}$"}},"required":["key","payment_id"],"additionalProperties":false}}}},"security":[{"checkoutToken":[]}],"responses":{"200":{"description":"Default Response"}}}},"/checkout/v1/payments/{id}":{"get":{"tags":["checkout"],"parameters":[{"schema":{"type":"string","pattern":"^pay_[0-9A-Za-z]{20}$"},"in":"path","name":"id","required":true}],"security":[{"checkoutToken":[]}],"responses":{"200":{"description":"Default Response"}}}},"/checkout/v1/payments/{id}/methods":{"get":{"tags":["checkout"],"parameters":[{"schema":{"type":"string","pattern":"^pay_[0-9A-Za-z]{20}$"},"in":"path","name":"id","required":true}],"security":[{"checkoutToken":[]}],"responses":{"200":{"description":"Default Response"}}}},"/checkout/v1/payments/{id}/quote":{"post":{"tags":["checkout"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"string","maxLength":40},"coin":{"type":"string","maxLength":20}},"required":["chain","coin"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","pattern":"^pay_[0-9A-Za-z]{20}$"},"in":"path","name":"id","required":true}],"security":[{"checkoutToken":[]}],"responses":{"200":{"description":"Default Response"}}}},"/checkout/v1/payments/{id}/cancel":{"post":{"tags":["checkout"],"parameters":[{"schema":{"type":"string","pattern":"^pay_[0-9A-Za-z]{20}$"},"in":"path","name":"id","required":true}],"security":[{"checkoutToken":[]}],"responses":{"200":{"description":"Default Response"}}}},"/checkout/v1/payments/{id}/qr.{format}":{"get":{"tags":["checkout"],"parameters":[{"schema":{"default":"uri","type":"string","enum":["uri","address"]},"in":"query","name":"type","required":false},{"schema":{"type":"string","pattern":"^pay_[0-9A-Za-z]{20}$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","enum":["svg","png"]},"in":"path","name":"format","required":true}],"security":[{"checkoutToken":[]}],"responses":{"200":{"description":"Default Response"}}}},"/checkout/v1/payments/{id}/claim":{"post":{"tags":["checkout"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tx_hash":{"type":"string","maxLength":300}},"required":["tx_hash"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","pattern":"^pay_[0-9A-Za-z]{20}$"},"in":"path","name":"id","required":true}],"security":[{"checkoutToken":[]}],"responses":{"200":{"description":"Default Response"}}}},"/checkout/v1/payments/{id}/closed":{"post":{"tags":["checkout"],"parameters":[{"schema":{"type":"string","pattern":"^pay_[0-9A-Za-z]{20}$"},"in":"path","name":"id","required":true}],"security":[{"checkoutToken":[]}],"responses":{"200":{"description":"Default Response"}}}},"/checkout/v1/payments/{id}/events":{"get":{"tags":["checkout"],"parameters":[{"schema":{"type":"string","pattern":"^pay_[0-9A-Za-z]{20}$"},"in":"path","name":"id","required":true}],"security":[{"checkoutToken":[]}],"responses":{"200":{"description":"Default Response"}}}},"/checkout/v1/links/{slug}":{"get":{"tags":["checkout"],"parameters":[{"schema":{"type":"string","pattern":"^[0-9A-Za-z]{6,40}$"},"in":"path","name":"slug","required":true}],"security":[{"checkoutToken":[]}],"responses":{"200":{"description":"Default Response"}}}},"/checkout/v1/links/{slug}/payments":{"post":{"tags":["checkout"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","maxLength":40},"name":{"type":"string","maxLength":100},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":30}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","pattern":"^[0-9A-Za-z]{6,40}$"},"in":"path","name":"slug","required":true}],"security":[{"checkoutToken":[]}],"responses":{"200":{"description":"Default Response"}}}},"/checkout/v1/products/{slug}/thanks":{"get":{"tags":["checkout"],"parameters":[{"schema":{"type":"string","maxLength":40},"in":"query","name":"payment_id","required":true},{"schema":{"type":"string","pattern":"^[0-9A-Za-z]{6,40}$"},"in":"path","name":"slug","required":true}],"security":[{"checkoutToken":[]}],"responses":{"200":{"description":"Default Response"}}}},"/checkout/v1/products/{slug}/download":{"get":{"tags":["checkout"],"parameters":[{"schema":{"type":"string","maxLength":40},"in":"query","name":"payment_id","required":true},{"schema":{"type":"string","pattern":"^[0-9A-Za-z]{6,40}$"},"in":"path","name":"slug","required":true}],"security":[{"checkoutToken":[]}],"responses":{"200":{"description":"Default Response"}}}},"/v1/merchant":{"get":{"tags":["merchant"],"responses":{"200":{"description":"Default Response"}}}},"/v1/chains":{"get":{"tags":["chains"],"responses":{"200":{"description":"Default Response"}}}},"/v1/rates":{"get":{"tags":["rates"],"parameters":[{"schema":{"type":"string","maxLength":300},"in":"query","name":"coins","required":true},{"schema":{"type":"string","pattern":"^[A-Za-z]{3}$"},"in":"query","name":"currency","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/v1/rates/convert":{"get":{"tags":["rates"],"parameters":[{"schema":{"type":"string","pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$"},"in":"query","name":"amount","required":true},{"schema":{"type":"string","maxLength":10},"in":"query","name":"from","required":true},{"schema":{"type":"string","maxLength":10},"in":"query","name":"to","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/payments":{"post":{"tags":["payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$"},"currency":{"type":"string","minLength":3,"maxLength":10},"reference_id":{"type":"string","minLength":1,"maxLength":64},"description":{"type":"string","maxLength":255},"customer":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":30}},"additionalProperties":false},"allowed_chains":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":40}},"allowed_coins":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":20}},"chain":{"type":"string","maxLength":40},"coin":{"type":"string","maxLength":20},"expires_in":{"type":"integer","minimum":300,"maximum":604800},"redirect_url":{"type":"string","maxLength":2000},"cancel_url":{"type":"string","maxLength":2000},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["amount","currency"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response"}}},"get":{"tags":["payments"],"parameters":[{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"starting_after","required":false},{"schema":{"type":"string","enum":["pending","confirming","paid","underpaid","expired","cancelled"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":64},"in":"query","name":"reference_id","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"chain","required":false},{"schema":{"type":"string","maxLength":20},"in":"query","name":"coin","required":false},{"schema":{},"in":"query","name":"created[gte]","required":false},{"schema":{},"in":"query","name":"created[lte]","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/v1/payments/{id}":{"get":{"tags":["payments"],"parameters":[{"schema":{"type":"string","pattern":"^pay_[0-9A-Za-z]{20}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/payments/{id}/methods":{"get":{"tags":["payments"],"parameters":[{"schema":{"type":"string","pattern":"^pay_[0-9A-Za-z]{20}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/payments/{id}/quote":{"post":{"tags":["payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"string","maxLength":40},"coin":{"type":"string","maxLength":20}},"required":["chain","coin"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","pattern":"^pay_[0-9A-Za-z]{20}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/payments/{id}/cancel":{"post":{"tags":["payments"],"parameters":[{"schema":{"type":"string","pattern":"^pay_[0-9A-Za-z]{20}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/payments/{id}/simulate":{"post":{"tags":["payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["paid","underpaid","overpaid","expired","cancelled"]}},"required":["outcome"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","pattern":"^pay_[0-9A-Za-z]{20}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/webhooks/test":{"post":{"tags":["webhooks"],"responses":{"200":{"description":"Default Response"}}}},"/v1/events":{"get":{"tags":["events"],"parameters":[{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","maxLength":60},"in":"query","name":"type","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"starting_after","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/v1/events/{id}":{"get":{"tags":["events"],"parameters":[{"schema":{"type":"string","pattern":"^evt_[0-9A-Za-z]{20}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/payment_links":{"post":{"tags":["payment_links"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["link","button"]},"title":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"customer_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"amount_type":{"type":"string","enum":["fixed","custom"]},"amount":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$"},{"type":"null"}]},"currency":{"type":"string","minLength":3,"maxLength":10},"min_amount":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$"},{"type":"null"}]},"max_amount":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)(\\.\\d+)?$"},{"type":"null"}]},"collect":{"type":"object","properties":{"name":{"type":"string","enum":["off","optional","required"]},"email":{"type":"string","enum":["off","optional","required"]},"phone":{"type":"string","enum":["off","optional","required"]}},"additionalProperties":false},"usage":{"type":"string","enum":["one_time","reusable"]},"allowed_chains":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":40}},"allowed_coins":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":20}},"redirect_url":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"expires_at":{"anyOf":[{},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500}}},"required":["title","amount_type","currency"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response"}}},"get":{"tags":["payment_links"],"parameters":[{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","enum":["active","inactive","completed","expired"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","enum":["link","button"]},"in":"query","name":"kind","required":false},{"schema":{"type":"string","enum":["live","test"]},"in":"query","name":"mode","required":false},{"schema":{"type":"string","pattern":"^lnk_[0-9A-Za-z]{20}$"},"in":"query","name":"starting_after","required":false},{"schema":{"type":"string","minLength":1,"maxLength":100},"in":"query","name":"q","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/v1/payment_links/{id}":{"get":{"tags":["payment_links"],"parameters":[{"schema":{"type":"string","pattern":"^lnk_[0-9A-Za-z]{20}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"patch":{"tags":["payment_links"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"expires_at":{"anyOf":[{},{"type":"null"}]},"redirect_url":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":500}},"status":{"type":"string","enum":["active","inactive"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","pattern":"^lnk_[0-9A-Za-z]{20}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/payment_links/{id}/deactivate":{"post":{"tags":["payment_links"],"parameters":[{"schema":{"type":"string","pattern":"^lnk_[0-9A-Za-z]{20}$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}}},"servers":[{"url":"https://razcryptogateway.com"}],"security":[{"secretKey":[]}]}