{"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":"Webhooks","x-displayName":"Webhooks","description":"Configure notification endpoints for agreement and payment events."}],"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/public/webhooks":{"get":{"tags":["Webhooks"],"summary":"Get Webhook","description":"Retrieve currently configured webhook endpoints for the merchant.\n\n### Error Codes\n| Code | Status | Reason | What to do |\n| ---- | ------ | ------ | ---------- |\n| WEBHOOK_NOT_FOUND | 404 | No webhook configuration exists for this merchant | Configure webhooks first using create/update endpoint. |\n","responses":{"200":{"description":"Webhook configuration returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Success"},"data":{"$ref":"#/components/schemas/WebhookConfig"}}},"examples":{"configured":{"summary":"Existing webhook settings","value":{"message":"Success","data":{"payment_agreement":"https://staging.abc.co/payment_agreement","payment_initiation":"https://staging.abc.co/payment_initiation","direct_debit_accepted":"https://staging.abc.co/direct_debit_accepted","direct_debit_rejected":"https://staging.abc.co/direct_debit_rejected"}}}}}}},"404":{"description":"No webhook configuration exists for this merchant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"not_found":{"summary":"Webhook configuration missing","value":{"message":"Webhook not found","error_code":"GN-0000","data":{"response_time":"2026-04-29T08:00:00.000Z"}}}}}}}}}}},"components":{"schemas":{"WebhookConfig":{"type":"object","description":"Stored webhook endpoint configuration for the authenticated merchant.","properties":{"payment_agreement":{"type":"string","format":"uri","description":"Configured payment agreement callback endpoint.","example":"https://staging.abc.co/payment_agreement"},"payment_initiation":{"type":"string","format":"uri","description":"Configured payment initiation callback endpoint.","example":"https://staging.abc.co/payment_initiation"},"direct_debit_accepted":{"type":"string","format":"uri","description":"Configured direct debit accepted callback endpoint.","example":"https://staging.abc.co/direct_debit_accepted"},"direct_debit_rejected":{"type":"string","format":"uri","description":"Configured direct debit rejected callback endpoint.","example":"https://staging.abc.co/direct_debit_rejected"}}},"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`."}}}}