{
  "openapi": "3.1.0",
  "info": {
    "title": "Fina Pay API",
    "version": "1.0.0",
    "description": "Accept payments from Fina users in your store, app or backend.\n\nCreate a charge with your secret key, send the customer to `payment_url`, and get a signed webhook when it is paid.\nThe customer pays from their Fina Pay balance after confirming with their wallet PIN; the money lands in your Fina Pay wallet\nminus the collection fee of your plan, and is booked as income in your business.\n\nAmounts are integers in minor units (centavos). Currency is DOP."
  },
  "servers": [
    {
      "url": "https://new.fina.do/api/wallet/v1"
    }
  ],
  "security": [
    {
      "secretKey": []
    }
  ],
  "tags": [
    {
      "name": "Charges",
      "description": "Create, read and cancel payment charges."
    },
    {
      "name": "Payment page",
      "description": "Public lookup used by checkout pages (public key, safe in the browser)."
    },
    {
      "name": "Payouts",
      "description": "Pay Fina Pay users from your own wallet balance (off by default, enabled per connection)."
    }
  ],
  "components": {
    "securitySchemes": {
      "secretKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "sk_live_…",
        "description": "Secret key of a Fina Pay connector (`sk_live_…`). Server-side only — never ship it in a browser or mobile app."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Stable, machine-readable error code. Branch on this value; it never changes meaning."
          }
        }
      },
      "ChargeStatus": {
        "type": "string",
        "enum": [
          "pending",
          "paid",
          "expired",
          "cancelled",
          "refunded"
        ],
        "description": "`pending` → `paid` | `expired` | `cancelled`; a paid charge can later become `refunded`."
      },
      "CreateChargeRequest": {
        "type": "object",
        "required": [
          "amount_minor"
        ],
        "properties": {
          "amount_minor": {
            "type": "integer",
            "minimum": 1,
            "description": "Amount in minor units (centavos). `150000` = RD$1,500.00. Never a decimal."
          },
          "description": {
            "type": "string",
            "description": "Shown to the customer on the payment page."
          },
          "reference": {
            "type": "string",
            "description": "Your own id (order number…). Idempotent per connection: repeating a reference returns the existing charge instead of creating a duplicate."
          },
          "expires_in_seconds": {
            "type": "integer",
            "minimum": 1,
            "default": 86400,
            "description": "Lifetime of the charge. Default 24 h."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "Free-form JSON stored with the charge."
          }
        }
      },
      "CreatedCharge": {
        "type": "object",
        "required": [
          "id",
          "status",
          "payment_url",
          "amount_minor",
          "currency_code",
          "reference",
          "expires_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "paid",
              "expired",
              "cancelled",
              "refunded"
            ],
            "description": "`pending` → `paid` | `expired` | `cancelled`; a paid charge can later become `refunded`."
          },
          "payment_url": {
            "type": "string",
            "format": "uri",
            "description": "Send the customer here: `https://fina.do/pay/c/<token>`."
          },
          "amount_minor": {
            "type": "integer",
            "minimum": 1,
            "description": "Amount in minor units (centavos). `150000` = RD$1,500.00. Never a decimal."
          },
          "currency_code": {
            "type": "string",
            "example": "DOP"
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Charge": {
        "type": "object",
        "required": [
          "id",
          "status",
          "amount_minor",
          "fee_minor",
          "net_minor",
          "currency_code",
          "reference",
          "transfer_id",
          "payment_url",
          "expires_at",
          "paid_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "paid",
              "expired",
              "cancelled",
              "refunded"
            ],
            "description": "`pending` → `paid` | `expired` | `cancelled`; a paid charge can later become `refunded`."
          },
          "amount_minor": {
            "type": "integer",
            "minimum": 1,
            "description": "Amount in minor units (centavos). `150000` = RD$1,500.00. Never a decimal."
          },
          "fee_minor": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Collection fee kept by Fina. `null` until the charge is paid."
          },
          "net_minor": {
            "type": [
              "integer",
              "null"
            ],
            "description": "`amount_minor - fee_minor`: what lands in your wallet. `null` until paid."
          },
          "currency_code": {
            "type": "string",
            "example": "DOP"
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "transfer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Wallet transfer that settled the charge."
          },
          "payment_url": {
            "type": "string",
            "format": "uri"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "paid_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "PublicCharge": {
        "type": "object",
        "required": [
          "token",
          "status",
          "amount_minor",
          "currency_code"
        ],
        "properties": {
          "token": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "paid",
              "expired",
              "cancelled",
              "refunded"
            ],
            "description": "`pending` → `paid` | `expired` | `cancelled`; a paid charge can later become `refunded`."
          },
          "amount_minor": {
            "type": "integer",
            "minimum": 1,
            "description": "Amount in minor units (centavos). `150000` = RD$1,500.00. Never a decimal."
          },
          "currency_code": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "business_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "paid_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "CreatePayoutRequest": {
        "type": "object",
        "required": [
          "account",
          "amount_minor",
          "reference"
        ],
        "properties": {
          "account": {
            "type": "string",
            "description": "Recipient: Fina Pay account number (10 digits) or the phone linked to their wallet."
          },
          "amount_minor": {
            "type": "integer",
            "minimum": 1,
            "description": "Amount in minor units (centavos). `150000` = RD$1,500.00. Never a decimal.",
            "maximum": 2147483647
          },
          "reference": {
            "type": "string",
            "maxLength": 64,
            "description": "Your own id (withdrawal id…). Required and idempotent per connection: repeating it returns the existing payout and never pays twice."
          },
          "description": {
            "type": "string",
            "maxLength": 140,
            "description": "Shown to the recipient in their notification and wallet history."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "Free-form JSON stored with the payout (max 4 KB)."
          }
        }
      },
      "Payout": {
        "type": "object",
        "required": [
          "id",
          "status",
          "amount_minor",
          "currency_code",
          "reference",
          "recipient",
          "created_at",
          "duplicate"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "completed"
            ],
            "description": "Payouts settle instantly: a payout that exists is `completed`."
          },
          "amount_minor": {
            "type": "integer",
            "minimum": 1,
            "description": "Amount in minor units (centavos). `150000` = RD$1,500.00. Never a decimal."
          },
          "currency_code": {
            "type": "string",
            "example": "DOP"
          },
          "reference": {
            "type": "string"
          },
          "recipient": {
            "type": "object",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Display name of the recipient."
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "duplicate": {
            "type": "boolean",
            "description": "`true` when this `reference` had already been paid and nothing new was sent."
          }
        }
      },
      "Recipient": {
        "type": "object",
        "required": [
          "name",
          "account"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Display name, the same one Fina users see when they send money."
          },
          "account": {
            "type": "string",
            "description": "Fina Pay account number (10 digits). Never the phone or email."
          }
        }
      },
      "ChargeEvent": {
        "type": "object",
        "description": "Body of a `charge.*` webhook. Signed with `x-fina-sig` = hex(HMAC-SHA512(ipn_secret, JSON.stringify(body, Object.keys(body).sort()))).",
        "required": [
          "event",
          "charge_id",
          "amount_minor",
          "currency_code",
          "status",
          "timestamp"
        ],
        "properties": {
          "event": {
            "type": "string",
            "enum": [
              "charge.paid",
              "charge.expired",
              "charge.cancelled",
              "charge.refunded"
            ]
          },
          "charge_id": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount_minor": {
            "type": "integer",
            "minimum": 1,
            "description": "Amount in minor units (centavos). `150000` = RD$1,500.00. Never a decimal."
          },
          "fee_minor": {
            "type": [
              "integer",
              "null"
            ]
          },
          "net_minor": {
            "type": [
              "integer",
              "null"
            ]
          },
          "currency_code": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "paid",
              "expired",
              "cancelled",
              "refunded"
            ],
            "description": "`pending` → `paid` | `expired` | `cancelled`; a paid charge can later become `refunded`."
          },
          "transfer_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "paid_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When this delivery was queued."
          }
        }
      },
      "SubscriptionEvent": {
        "type": "object",
        "description": "Body of a `subscription.*` / `mandate.*` webhook for Fina Pay subscriptions (rolling out: enabled per platform flag). Same signature header and retries as charge events.",
        "required": [
          "event",
          "event_id",
          "subscription_id",
          "plan_code",
          "status",
          "timestamp"
        ],
        "properties": {
          "event": {
            "type": "string"
          },
          "event_id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique per event — use it to deduplicate."
          },
          "subscription_id": {
            "type": "string",
            "format": "uuid"
          },
          "plan_code": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "cancel_at_period_end": {
            "type": "boolean"
          },
          "entitled": {
            "type": "boolean",
            "description": "Should the customer have access right now?"
          },
          "entitled_until": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "period": {
            "type": [
              "object",
              "null"
            ]
          },
          "charge": {
            "type": [
              "object",
              "null"
            ]
          },
          "external_customer_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    }
  },
  "paths": {
    "/charges": {
      "post": {
        "tags": [
          "Charges"
        ],
        "operationId": "createCharge",
        "summary": "Create a charge and get its payment URL",
        "description": "Creates a `pending` charge. Redirect or share `payment_url` with your customer. Idempotent by `reference`: retrying with the same reference returns the existing charge (201) instead of a duplicate.",
        "security": [
          {
            "secretKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateChargeRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Charge created (or the existing one for this reference).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedCharge"
                }
              }
            }
          },
          "400": {
            "description": "invalid_json, invalid_amount, missing_params, connection_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized — missing, invalid or inactive secret key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited — more than 60 requests per minute for this connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Payment page"
        ],
        "operationId": "lookupCharge",
        "summary": "Look up a charge by payment token (public key)",
        "description": "Public, read-only lookup for a payment page. Authenticated with your public key (`pk_live_…`) in the query string, never the secret.",
        "security": [],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Token at the end of `payment_url`."
          },
          {
            "name": "public_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Your `pk_live_…` key."
          }
        ],
        "responses": {
          "200": {
            "description": "Public view of the charge.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCharge"
                }
              }
            }
          },
          "400": {
            "description": "invalid_json, invalid_amount, missing_params, connection_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found — the charge does not exist or belongs to another connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/charges/{id}": {
      "get": {
        "tags": [
          "Charges"
        ],
        "operationId": "getCharge",
        "summary": "Get a charge (poll its status, fee and net)",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The charge.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Charge"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized — missing, invalid or inactive secret key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found — the charge does not exist or belongs to another connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited — more than 60 requests per minute for this connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/charges/{id}/cancel": {
      "post": {
        "tags": [
          "Charges"
        ],
        "operationId": "cancelCharge",
        "summary": "Cancel a pending charge",
        "description": "Only `pending` charges can be cancelled; anything else answers `409 not_cancellable`. Emits `charge.cancelled`.",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cancelled.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized — missing, invalid or inactive secret key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "not_cancellable — the charge is no longer pending",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited — more than 60 requests per minute for this connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/payouts": {
      "post": {
        "tags": [
          "Payouts"
        ],
        "operationId": "createPayout",
        "summary": "Pay a Fina Pay user from your wallet",
        "description": "Moves `amount_minor` from the Fina Pay wallet of the connection owner to the recipient, instantly and atomically. Off by default: the owner turns on **Payouts via API** for the connection. Idempotent by `reference`: a repeat answers `200` with `duplicate: true` and the original payout.",
        "security": [
          {
            "secretKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePayoutRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "This reference was already paid (`duplicate: true`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payout"
                }
              }
            }
          },
          "201": {
            "description": "Paid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payout"
                }
              }
            }
          },
          "400": {
            "description": "invalid_json, invalid_amount, reference_required, invalid_reference, invalid_description, invalid_metadata, same_account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized — missing, invalid or inactive secret key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "payouts_disabled — turn on Payouts via API for this connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "recipient_not_found — no active Fina Pay wallet with that account or phone",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "insufficient_funds, currency_mismatch, wallet_blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited — more than 60 requests per minute for this connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/payouts/{id}": {
      "get": {
        "tags": [
          "Payouts"
        ],
        "operationId": "getPayout",
        "summary": "Get a payout of this connection",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The payout (`duplicate` is always `false` here).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payout"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized — missing, invalid or inactive secret key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found — the payout does not exist or belongs to another connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited — more than 60 requests per minute for this connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/recipients": {
      "get": {
        "tags": [
          "Payouts"
        ],
        "operationId": "lookupRecipient",
        "summary": "Look up who will receive a payout",
        "description": "Resolve an account number or phone before paying, to show your user the name the money goes to. Never returns the phone or email.",
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "account",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account number (10 digits) or phone."
          }
        ],
        "responses": {
          "200": {
            "description": "The recipient.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Recipient"
                }
              }
            }
          },
          "400": {
            "description": "same_account — that is the wallet of the connection owner",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized — missing, invalid or inactive secret key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "recipient_not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited — more than 60 requests per minute for this connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "charge.paid": {
      "post": {
        "summary": "Webhook: charge.paid",
        "description": "Sent to the webhook URL of your connector. Answer any 2xx within 15 s; otherwise it is retried after 1 min, 5 min, 30 min, 2 h and 24 h.",
        "parameters": [
          {
            "name": "x-fina-sig",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Hex HMAC-SHA512 signature."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChargeEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged."
          }
        }
      }
    },
    "charge.expired": {
      "post": {
        "summary": "Webhook: charge.expired",
        "description": "Sent to the webhook URL of your connector. Answer any 2xx within 15 s; otherwise it is retried after 1 min, 5 min, 30 min, 2 h and 24 h.",
        "parameters": [
          {
            "name": "x-fina-sig",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Hex HMAC-SHA512 signature."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChargeEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged."
          }
        }
      }
    },
    "charge.cancelled": {
      "post": {
        "summary": "Webhook: charge.cancelled",
        "description": "Sent to the webhook URL of your connector. Answer any 2xx within 15 s; otherwise it is retried after 1 min, 5 min, 30 min, 2 h and 24 h.",
        "parameters": [
          {
            "name": "x-fina-sig",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Hex HMAC-SHA512 signature."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChargeEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged."
          }
        }
      }
    },
    "charge.refunded": {
      "post": {
        "summary": "Webhook: charge.refunded",
        "description": "Sent to the webhook URL of your connector. Answer any 2xx within 15 s; otherwise it is retried after 1 min, 5 min, 30 min, 2 h and 24 h.",
        "parameters": [
          {
            "name": "x-fina-sig",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Hex HMAC-SHA512 signature."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChargeEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged."
          }
        }
      }
    },
    "subscription.*": {
      "post": {
        "summary": "Webhook: subscription lifecycle (rolling out)",
        "description": "subscription.created, trial_will_end, renewed, payment_failed, past_due, cancel_scheduled, reactivated, paused, resumed, plan_changed, canceled, expired and mandate.revoked.",
        "parameters": [
          {
            "name": "x-fina-sig",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriptionEvent"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged."
          }
        }
      }
    }
  }
}