openapi: 3.2.0 info: title: XRPay Cashier Webhooks API version: '2026-08-30' description: 'Server-to-server API for payments, consolidated balances, bank and Mobile Money payouts, payroll, refunds, and signed webhooks. Test credentials use isolated virtual balances: a successful local-currency payment simulation can fund a test payout, and executing that payout never contacts a bank or Mobile Money network. Payment-intent amounts are integer minor units; payout and payroll amounts are exact decimal strings. Provider identities and custody allocations are never exposed.' servers: - url: https://api.xrpay.it security: - bearerAuth: [] tags: - name: Webhooks paths: /api/v1/webhooks: get: tags: - Webhooks summary: List webhook endpoints for the current credential mode operationId: listWebhookEndpoints x-required-scope: webhook.read responses: '200': description: Mode-scoped endpoint list content: application/json: schema: $ref: '#/components/schemas/WebhookEndpointList' post: tags: - Webhooks summary: Register a mode-scoped webhook endpoint description: The signing secret is returned only when the endpoint is first created; updating the same URL never reveals it again. Test and live credentials create separate endpoints, even for the same URL. operationId: createWebhookEndpoint x-required-scope: webhook.write requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/WebhookEndpointCreate' responses: '201': description: Endpoint created content: application/json: schema: $ref: '#/components/schemas/WebhookEndpoint' '200': description: Existing endpoint updated content: application/json: schema: $ref: '#/components/schemas/WebhookEndpoint' '400': $ref: '#/components/responses/Error' delete: tags: - Webhooks summary: Delete a webhook endpoint operationId: deleteWebhookEndpoint x-required-scope: webhook.write parameters: - name: id in: query required: true schema: type: string responses: '200': description: Endpoint deleted '404': $ref: '#/components/responses/Error' /api/v1/webhook-deliveries: get: tags: - Webhooks summary: List webhook delivery status and attempts operationId: listWebhookDeliveries x-required-scope: webhook.read parameters: - name: status in: query schema: enum: - queued - delivering - delivered - failed - name: cursor in: query schema: type: string - name: limit in: query schema: type: integer minimum: 1 maximum: 100 default: 25 responses: '200': description: Delivery list content: application/json: schema: $ref: '#/components/schemas/WebhookDeliveryList' '400': $ref: '#/components/responses/Error' post: tags: - Webhooks summary: Replay one webhook delivery with a fresh delivery-attempt cycle operationId: replayWebhookDelivery x-required-scope: webhook.write requestBody: required: true content: application/json: schema: type: object required: - delivery_id properties: delivery_id: type: string pattern: ^dlv_ responses: '202': description: Replay accepted content: application/json: schema: $ref: '#/components/schemas/WebhookDelivery' '404': $ref: '#/components/responses/Error' '409': $ref: '#/components/responses/Error' /api/v1/webhooks/{id}/secret: post: tags: - Webhooks summary: Rotate a webhook signing secret description: Immediately replaces the endpoint's prior secret. The new secret is returned only in this response. operationId: rotateWebhookSecret x-required-scope: webhook.write parameters: - $ref: '#/components/parameters/ResourceId' responses: '201': description: Secret rotated and revealed once content: application/json: schema: $ref: '#/components/schemas/WebhookSecret' '404': $ref: '#/components/responses/Error' components: parameters: ResourceId: name: id in: path required: true schema: type: string responses: Error: description: Error response content: application/json: schema: $ref: '#/components/schemas/Error' schemas: WebhookEndpointList: type: object required: - object - data properties: object: const: list data: type: array items: $ref: '#/components/schemas/WebhookEndpoint' WebhookEndpointCreate: type: object additionalProperties: false required: - url - events properties: name: type: string maxLength: 200 url: type: string format: uri description: A public HTTPS endpoint. events: type: array minItems: 1 uniqueItems: true items: enum: - payment.created - payment.processing - payment.confirmed - payment.failed - payment.canceled - payment.refunded - payment.swept - refund.created - refund.completed - refund.failed - payout.created - payout.processing - payout.action_required - payout.partially_completed - payout.completed - payout.failed - payroll.run.created - payroll.run.approved - payroll.run.processing - payroll.run.action_required - payroll.run.partially_completed - payroll.run.completed - payroll.run.failed - payroll.payment.completed - payroll.payment.failed - payroll.payment.action_required - checkout.session.completed - checkout.session.expired - escrow.created - escrow.released - escrow.cancelled - invoice.created - invoice.sent - invoice.paid - b2b.order.created - b2b.order.paid - b2b.order.shipped WebhookSecret: type: object required: - object - webhook_id - secret - secret_revealed - livemode - rotated_at properties: object: const: webhook_secret webhook_id: type: string secret: type: string pattern: ^whsec_ secret_revealed: const: true livemode: type: boolean rotated_at: type: string format: date-time WebhookDelivery: type: object required: - object - id - event_id - destination_type - endpoint - status - attempt_count - created_at - updated_at properties: object: const: webhook_delivery id: type: string pattern: ^dlv_ event_id: type: string pattern: ^evt_ event_type: type: - string - 'null' destination_type: enum: - webhook_endpoint - platform_connection destination_id: type: string endpoint: type: string format: uri status: enum: - queued - delivering - delivered - failed attempt_count: type: integer minimum: 0 last_status_code: type: - integer - 'null' last_error: type: - string - 'null' delivered_at: type: - string - 'null' format: date-time created_at: type: string format: date-time updated_at: type: string format: date-time WebhookEndpoint: type: object required: - object - id - url - events - is_active - livemode properties: object: const: webhook_endpoint id: type: string name: type: string url: type: string format: uri events: type: array items: type: string secret: type: string description: Signing secret. Returned only when an endpoint is first created. secret_revealed: type: boolean is_active: type: boolean livemode: type: boolean created_at: type: string format: date-time WebhookDeliveryList: type: object required: - object - data - has_more - next_cursor properties: object: const: list data: type: array items: $ref: '#/components/schemas/WebhookDelivery' has_more: type: boolean next_cursor: type: - string - 'null' pattern: ^dlv_ Error: type: object required: - error properties: error: type: object required: - type - message properties: type: type: string code: type: - string - 'null' message: type: string securitySchemes: bearerAuth: type: http scheme: bearer description: Secret API key or XRPay Connect access token.