{"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_business_pay_link":{"post":{"tags":["Checkout"],"summary":"Get Pay Link","description":"Create a business PayID pay link for merchant checkout.\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| GN-0000 | 404 | Payment method not found | Configure merchant payment method first. |\n| GN-0000 | 422 | Missing or invalid `pay_id` | Provide a valid `pay_id` (without `@`). |\n| GN-0000 | 422 | PayID already exists | Use a different `pay_id` value. |\n","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessPayLinkRequest"},"examples":{"basic":{"value":{"pay_id":"buss.fees"}}}}}},"responses":{"200":{"description":"Business PayID link created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessPayLinkResponse"},"examples":{"created":{"value":{"message":"Business Payid created successfully","data":{"business_payid":"buss.fees@sbpay.au","business_payid_name":"buss.fees","status":"Enabled"}}}}}}},"401":{"description":"Unauthorized merchant context.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Merchant payment method missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation or provider error while creating business pay link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"BusinessPayLinkRequest":{"type":"object","required":["pay_id"],"properties":{"pay_id":{"type":"string","description":"Requested business PayID alias (must not contain `@`).","example":"buss.fees"}}},"BusinessPayLinkResponse":{"type":"object","properties":{"message":{"type":"string","example":"Business Payid created successfully"},"data":{"type":"object","properties":{"business_payid":{"type":"string","example":"buss.fees@sbpay.au"},"business_payid_name":{"type":"string","example":"buss.fees"},"status":{"type":"string","example":"Enabled"}}}}},"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."}}}}