{"openapi":"3.0.3","info":{"title":"ShaBaasPay Public API","version":"1.0.0","description":"Describes public REST endpoints for authorization, payment agreements, payment initiations,\nrefunds, webhooks, and PayID collection APIs.\n"},"servers":[{"url":"https://dev-api.shabaas.com","description":"Staging"},{"url":"https://api.shabaas.com","description":"Production"}],"tags":[{"name":"Checkout","x-displayName":"Checkout","description":"Generate checkout and pay links for web checkout flows."}],"x-tagGroups":[{"name":"SHABAASPAY PUBLIC API","tags":["API Keys","Payment Agreement","Payment Initiation","Checkout","B2B Collections","Webhooks"]},{"name":"Internal","tags":["Clients"]}],"security":[{"BearerAuth":[]}],"paths":{"/api/get_url":{"post":{"tags":["Checkout"],"summary":"Get Checkout Link","description":"Create an invoice checkout link for a specific amount.\n\n### Error Codes\n| Code | Status | Reason | What to do |\n| ---- | ------ | ------ | ---------- |\n| GN-0000 | 401 | Unauthorized Access to an operation | Send valid API key in `Authorization` header. |\n| M101 | 422 | Amount exceeds platform/merchant threshold | Reduce amount and retry. |\n| GN-0000 | 422 | Checkout is not supported for merchant | Enable standalone checkout for merchant. |\n","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutUrlRequest"},"examples":{"basic":{"value":{"expiry_date":"12-11-2026","amount":"60","notes":"Invoice #1042"}}}}}},"responses":{"200":{"description":"Checkout link generated.","content":{"application/json":{"schema":{"type":"string","example":"https://checkout.shabaas.com/au/staging-demo-merchant/abc123slug"}}}},"401":{"description":"Unauthorized merchant context.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation or business-rule error while creating checkout link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"CheckoutUrlRequest":{"type":"object","required":["expiry_date","amount"],"properties":{"expiry_date":{"type":"string","description":"Link expiry date as accepted by checkout API (for example `DD-MM-YYYY`).","example":"12-11-2026"},"amount":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"Checkout amount.","example":"60"},"notes":{"type":"string","description":"Optional checkout notes.","example":"Invoice"}}},"ErrorResponse":{"type":"object","required":["message","error_code","data"],"properties":{"message":{"type":"string","example":"Payee account cannot receive NPP Payments"},"error_code":{"type":"string","example":"MOV_NPP_PAYMENT_NOT_SUPPORTED"},"data":{"type":"object","additionalProperties":true,"example":{"response_time":"2026-04-08T12:28:26.759Z"}}}}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token returned by `/api/public/authorization`."},"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Merchant API key in `Authorization` header."}}}}