# Solidgate API Reference

Solidgate API v2 follows a consistent, predictable endpoint structure across all operations.

<br>
<p><strong>OpenAPI specification</strong></p>
<p>Full schema for programmatic integration: endpoint paths, request/response shapes, and field definitions.</p>

<div style="display:flex;flex-wrap:wrap;gap:8px;margin-bottom:24px;">

  <a href="/_bundle/api/@v2/index.yaml?download" class="sg-lang-btn" style="display:inline-flex;align-items:center;gap:5px;background:#000;color:#fff;padding:6px 14px;border-radius:6px;text-decoration:none;font-size:13px;font-family:'Inter',sans-serif;width:96px;justify-content:flex-start;transition:opacity 0.2s ease;">
    <svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;">
      <rect x="1" y="1" width="12" height="12" rx="1.5" stroke="#fff" stroke-width="0.9" fill="none"/>
      <text x="7" y="6.5" fill="#fff" font-family="Arial,sans-serif" font-size="4" font-weight="bold" text-anchor="middle">YA</text>
      <text x="7" y="11" fill="#fff" font-family="Arial,sans-serif" font-size="4" font-weight="bold" text-anchor="middle">ML</text>
    </svg>
    YAML
  </a>

  <a href="/_bundle/api/@v2/index.json?download" class="sg-lang-btn" style="display:inline-flex;align-items:center;gap:5px;background:#000;color:#fff;padding:6px 14px;border-radius:6px;text-decoration:none;font-size:13px;font-family:'Inter',sans-serif;width:96px;justify-content:flex-start;transition:opacity 0.2s ease;">
    <svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;">
      <path d="M5.5 2C4.3 2 3.8 2.5 3.8 3.8V5.2C3.8 6.2 3.3 6.5 2.3 6.7V7.3C3.3 7.5 3.8 7.8 3.8 8.8V10.2C3.8 11.5 4.3 12 5.5 12" stroke="#fff" stroke-width="1" stroke-linecap="round" fill="none"/>
      <path d="M8.5 2C9.7 2 10.2 2.5 10.2 3.8V5.2C10.2 6.2 10.7 6.5 11.7 6.7V7.3C10.7 7.5 10.2 7.8 10.2 8.8V10.2C10.2 11.5 9.7 12 8.5 12" stroke="#fff" stroke-width="1" stroke-linecap="round" fill="none"/>
    </svg>
    JSON
  </a>

</div>

<br>
<p><strong>Frontend SDK</strong></p>
<p>These are the primary frontend libraries. Use them to embed payment forms directly in your client-side application</p>

<div style="display:flex;flex-wrap:wrap;gap:8px;margin-bottom:24px;">

  <a href="https://github.com/solidgate-tech/react-sdk" target="_blank" class="sg-lang-btn" style="display:inline-flex;align-items:center;gap:5px;background:#000;color:#fff;padding:6px 14px;border-radius:6px;text-decoration:none;font-size:13px;font-family:'Inter',sans-serif;width:96px;justify-content:flex-start;transition:opacity 0.2s ease;">
    <svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;">
      <circle cx="7" cy="7" r="1.2" fill="#fff"/>
      <ellipse cx="7" cy="7" rx="6" ry="2" stroke="#fff" stroke-width="0.9" fill="none"/>
      <ellipse cx="7" cy="7" rx="6" ry="2" stroke="#fff" stroke-width="0.9" fill="none" transform="rotate(60,7,7)"/>
      <ellipse cx="7" cy="7" rx="6" ry="2" stroke="#fff" stroke-width="0.9" fill="none" transform="rotate(120,7,7)"/>
    </svg>
    React
  </a>

  <a href="https://github.com/solidgate-tech/vue-sdk" target="_blank" class="sg-lang-btn" style="display:inline-flex;align-items:center;gap:5px;background:#000;color:#fff;padding:6px 14px;border-radius:6px;text-decoration:none;font-size:13px;font-family:'Inter',sans-serif;width:96px;justify-content:flex-start;transition:opacity 0.2s ease;">
    <svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;">
      <path d="M1 2L7 12.5L13 2H10.5L7 8L3.5 2Z" fill="#fff"/>
      <path d="M3.5 2L7 8L10.5 2H8.5L7 5L5.5 2Z" fill="#000"/>
    </svg>
    Vue
  </a>

  <a href="https://github.com/solidgate-tech/angular-sdk" target="_blank" class="sg-lang-btn" style="display:inline-flex;align-items:center;gap:5px;background:#000;color:#fff;padding:6px 14px;border-radius:6px;text-decoration:none;font-size:13px;font-family:'Inter',sans-serif;width:96px;justify-content:flex-start;transition:opacity 0.2s ease;">
    <svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;">
      <path d="M7 1L1.5 3L2.5 10.5L7 13.5L11.5 10.5L12.5 3Z" fill="#fff"/>
      <path d="M7 3.5L4.5 10H5.8L6.4 8.5H7.6L8.2 10H9.5L7 3.5ZM7 5.5L7.3 7.5H6.7Z" fill="#000"/>
    </svg>
    Angular
  </a>

</div>

<br>

<p><strong>Backend SDK</strong></p>
<p>Multiple backend libraries to manage server-side processing, advanced integrations, form resign flows, and reconciling orders.</p>

<div style="display:flex;flex-wrap:wrap;gap:8px;">

  <a href="https://github.com/solidgate-tech/php-sdk" target="_blank" class="sg-lang-btn" style="display:inline-flex;align-items:center;gap:5px;background:#000;color:#fff;padding:6px 14px;border-radius:6px;text-decoration:none;font-size:13px;font-family:'Inter',sans-serif;width:96px;justify-content:flex-start;transition:opacity 0.2s ease;">
    <svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;">
      <ellipse cx="7" cy="7" rx="6" ry="3.5" stroke="#fff" stroke-width="0.9"/>
      <text x="7" y="8.5" fill="#fff" font-family="Arial,sans-serif" font-size="3.5" font-weight="bold" text-anchor="middle">php</text>
    </svg>
    PHP
  </a>

  <a href="https://github.com/solidgate-tech/nodejs-sdk" target="_blank" class="sg-lang-btn" style="display:inline-flex;align-items:center;gap:5px;background:#000;color:#fff;padding:6px 14px;border-radius:6px;text-decoration:none;font-size:13px;font-family:'Inter',sans-serif;width:96px;justify-content:flex-start;transition:opacity 0.2s ease;">
    <svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;">
      <path d="M7 1L13 4.5V9.5L7 13L1 9.5V4.5Z" stroke="#fff" stroke-width="0.9"/>
      <text x="7" y="8.5" fill="#fff" font-family="Arial,sans-serif" font-size="3.5" font-weight="bold" text-anchor="middle">JS</text>
    </svg>
    Node.js
  </a>

  <a href="https://github.com/solidgate-tech/go-sdk" target="_blank" class="sg-lang-btn" style="display:inline-flex;align-items:center;gap:5px;background:#000;color:#fff;padding:6px 14px;border-radius:6px;text-decoration:none;font-size:13px;font-family:'Inter',sans-serif;width:96px;justify-content:flex-start;transition:opacity 0.2s ease;">
    <svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;">
      <path d="M6.5 4C4 4 2.5 5.5 2.5 7C2.5 8.5 4 10 6.5 10V7H4.5" stroke="#fff" stroke-width="0.9" stroke-linecap="round" stroke-linejoin="round"/>
      <ellipse cx="10.5" cy="7" rx="2" ry="3" stroke="#fff" stroke-width="0.9"/>
    </svg>
    Go
  </a>

  <a href="https://github.com/solidgate-tech/kotlin-sdk" target="_blank" class="sg-lang-btn" style="display:inline-flex;align-items:center;gap:5px;background:#000;color:#fff;padding:6px 14px;border-radius:6px;text-decoration:none;font-size:13px;font-family:'Inter',sans-serif;width:96px;justify-content:flex-start;transition:opacity 0.2s ease;">
    <svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;">
      <path d="M2 2H12L2 12Z" fill="#fff"/>
      <path d="M2 12L7 7L12 12Z" fill="#fff"/>
    </svg>
    Kotlin
  </a>

  <a href="https://github.com/solidgate-tech/python-sdk" target="_blank" class="sg-lang-btn" style="display:inline-flex;align-items:center;gap:5px;background:#000;color:#fff;padding:6px 14px;border-radius:6px;text-decoration:none;font-size:13px;font-family:'Inter',sans-serif;width:96px;justify-content:flex-start;transition:opacity 0.2s ease;">
    <svg width="14" height="14" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;">
      <path d="M7 1C4.5 1 3.5 2 3.5 4V6H7V6.5H4C2.5 6.5 1.5 7.5 1.5 9.5V10.5" stroke="#fff" stroke-width="0.9" stroke-linecap="round" fill="none"/>
      <path d="M7 13C9.5 13 10.5 12 10.5 10V8H7V7.5H10C11.5 7.5 12.5 6.5 12.5 4.5V3.5" stroke="#fff" stroke-width="0.9" stroke-linecap="round" fill="none"/>
      <circle cx="5.5" cy="3.5" r="0.6" fill="#fff"/>
      <circle cx="8.5" cy="10.5" r="0.6" fill="#fff"/>
    </svg>
    Python
  </a>

</div>

<div style="display:flex; flex-wrap:wrap; gap:8px; margin-top: 20px;">
    <p>Enhance understanding with our <a href="https://docs.solidgate.com/payments/" target="_blank">payment guide</a>. <br>
    For help, write to <a href="https://solidgate.com/support/" target="_blank">support@solidgate.com.</a></p>
</div>


Version: 2.0.0
License: Terms and policies

## Servers

Solidgate API
```
https://api.solidgate.com/v2
```

## Security

### bearerAuth

Secret value sent in the `Authorization` header using the `Bearer` scheme.

Type: http
Scheme: bearer
Bearer Format: SECRET

### signatureAuth

Base64-encoded HMAC-SHA256 of the raw request body, computed with the webhook endpoint's secret key.

Type: apiKey
In: header
Name: Signature

## Download OpenAPI description

[Solidgate API Reference](https://api-docs.solidgate.com/_bundle/api/@v2/index.yaml)

## API keys

Create, list, retrieve, and rotate API keys so you can securely authenticate requests and control access to the API.

### Create API key

 - [POST /api-keys/create](https://api-docs.solidgate.com/api/v2/api-keys/create-api-key.md): Creates a new API key for authentication and authorization. This endpoint requires an account-level API key.

### List API keys

 - [POST /api-keys/list](https://api-docs.solidgate.com/api/v2/api-keys/list-api-key.md): Retrieves a paginated list of API keys for the specified account. This endpoint requires an account-level API key.

### Get API key

 - [POST /api-keys/get](https://api-docs.solidgate.com/api/v2/api-keys/get-api-key.md): Returns details and permissions for the specified API key. This endpoint requires an account-level API key.

### Rotate API key

 - [POST /api-keys/rotate](https://api-docs.solidgate.com/api/v2/api-keys/rotate-api-key.md): Rotates the secret key for the specified API key. Returns a new secret in the rotate_secret field, which becomes valid within a few seconds. The previous secret remains valid during the rotation period and expires once the period ends. This endpoint requires an account-level API key.

## Channels

List the channels available to your account so you can use them in API operations, such as configuring API keys.

### List channels

 - [POST /channels/list](https://api-docs.solidgate.com/api/v2/channels/list-channel.md): Retrieves a paginated list of channels for the specified account. This endpoint requires an account-level API key.

## Webhooks

Create, list, patch, delete, and retrieve webhook endpoints, manage secret keys, and receive events when customer or invoice records change.

### Create webhook

 - [POST /webhooks/create](https://api-docs.solidgate.com/api/v2/webhooks/create-webhook.md): Creates a new webhook endpoint to receive payment and order events. Webhook endpoints are inactive until activated by calling the patch endpoint with the status set to ACTIVE.

### List webhooks

 - [POST /webhooks/list](https://api-docs.solidgate.com/api/v2/webhooks/list-webhook.md): Retrieves a paginated list of webhook endpoints.

### Get webhook

 - [POST /webhooks/get](https://api-docs.solidgate.com/api/v2/webhooks/get-webhook.md): Retrieves webhook endpoint details by ID.

### Patch webhook

 - [POST /webhooks/patch](https://api-docs.solidgate.com/api/v2/webhooks/patch-webhook.md): Updates an existing webhook endpoint configuration.

### Delete webhook

 - [POST /webhooks/delete](https://api-docs.solidgate.com/api/v2/webhooks/delete-webhook.md): Deletes a webhook endpoint.

### Rotate webhook key

 - [POST /webhooks/rotate-key](https://api-docs.solidgate.com/api/v2/webhooks/rotate-webhook-key.md): Rotates the secret for the specified webhook key. Returns a new secret in the rotate_secret field, which becomes valid within a few seconds. The previous secret remains valid during the rotation period and expires once the period ends.

## Customers

Create, update, and retrieve customer records to keep data consistent across payments and billing.

### Create customer

 - [POST /customers/create](https://api-docs.solidgate.com/api/v2/customers/create-customer.md): Creates a new customer.

### Update customer

 - [POST /customers/update](https://api-docs.solidgate.com/api/v2/customers/update-customer.md): Updates specified customer fields.

### Get customer

 - [POST /customers/get](https://api-docs.solidgate.com/api/v2/customers/get-customer.md): Returns the customer for the provided identifier.

### List customers

 - [POST /customers/list](https://api-docs.solidgate.com/api/v2/customers/list-customers.md): Returns a paginated list of customers.

### Customer created

 - [POST CustomerCreated](https://api-docs.solidgate.com/api/v2/customers/on-customer-created.md): Webhook sent when a new customer is created.

### Customer updated

 - [POST CustomerUpdated](https://api-docs.solidgate.com/api/v2/customers/on-customer-updated.md): Webhook sent when a customer is updated.

## Payment instruments

List, retrieve, and revoke customer payment instruments and receive events when payment instruments change.

### Get payment instrument

 - [POST /payment-instruments/get](https://api-docs.solidgate.com/api/v2/payment-instruments/get-payment-instrument.md): Returns the payment instrument for the provided identifier.

### List payment instruments

 - [POST /payment-instruments/list](https://api-docs.solidgate.com/api/v2/payment-instruments/list-payment-instruments.md): Returns a paginated list of payment instruments for the specified customer.

### Revoke payment instrument

 - [POST /payment-instruments/revoke](https://api-docs.solidgate.com/api/v2/payment-instruments/revoke-payment-instrument.md): Revokes an active payment instrument and prevents it from being used for future payments.

### Payment instrument created

 - [POST PaymentInstrumentCreated](https://api-docs.solidgate.com/api/v2/payment-instruments/on-payment-instrument-created.md): Webhook sent when a new payment instrument is created.

### Payment instrument revoked

 - [POST PaymentInstrumentRevoked](https://api-docs.solidgate.com/api/v2/payment-instruments/on-payment-instrument-revoked.md): Webhook sent when a payment instrument is revoked.

### Payment instrument expired

 - [POST PaymentInstrumentExpired](https://api-docs.solidgate.com/api/v2/payment-instruments/on-payment-instrument-expired.md): Webhook sent when a payment instrument expires.

## Invoices

Create, update, finalize, void, pay using a saved payment instrument, and retrieve invoices to issue and track billing for your customers.

### Create invoice

 - [POST /invoices/create](https://api-docs.solidgate.com/api/v2/invoices/create-invoice.md): Creates a new invoice.

### Update invoice

 - [POST /invoices/update](https://api-docs.solidgate.com/api/v2/invoices/update-invoice.md): Updates specified fields of a draft invoice.

### Finalize invoice

 - [POST /invoices/finalize](https://api-docs.solidgate.com/api/v2/invoices/finalize-invoice.md): Finalizes a draft invoice.

### Void invoice

 - [POST /invoices/void](https://api-docs.solidgate.com/api/v2/invoices/void-invoice.md): Voids an unpaid invoice.

### Delete invoice

 - [POST /invoices/delete](https://api-docs.solidgate.com/api/v2/invoices/delete-invoice.md): Deletes a draft invoice.

### Get invoice

 - [POST /invoices/get](https://api-docs.solidgate.com/api/v2/invoices/get-invoice.md): Returns the invoice for the provided identifier.

### List invoices

 - [POST /invoices/list](https://api-docs.solidgate.com/api/v2/invoices/list-invoices.md): Returns a paginated list of invoices.

### Pay invoice

 - [POST /invoices/pay](https://api-docs.solidgate.com/api/v2/invoices/pay-invoice.md): Pays a finalized invoice using a saved payment instrument.

### Invoice created

 - [POST InvoiceCreated](https://api-docs.solidgate.com/api/v2/invoices/on-invoice-created.md): Webhook sent when a new invoice is created.

### Invoice updated

 - [POST InvoiceUpdated](https://api-docs.solidgate.com/api/v2/invoices/on-invoice-updated.md): Webhook sent when an invoice is updated.

### Invoice finalized

 - [POST InvoiceFinalized](https://api-docs.solidgate.com/api/v2/invoices/on-invoice-finalized.md): Webhook sent when an invoice is finalized.

### Invoice finalization failed

 - [POST InvoiceFinalizationFailed](https://api-docs.solidgate.com/api/v2/invoices/on-invoice-finalization-failed.md): Webhook sent when an invoice finalization fails.

### Invoice paid

 - [POST InvoicePaid](https://api-docs.solidgate.com/api/v2/invoices/on-invoice-paid.md): Webhook sent when an invoice is paid.

### Invoice voided

 - [POST InvoiceVoided](https://api-docs.solidgate.com/api/v2/invoices/on-invoice-voided.md): Webhook sent when an invoice is voided.

### Invoice deleted

 - [POST InvoiceDeleted](https://api-docs.solidgate.com/api/v2/invoices/on-invoice-deleted.md): Webhook sent when an invoice is deleted.

### Invoice payment failed

 - [POST InvoicePaymentFailed](https://api-docs.solidgate.com/api/v2/invoices/on-invoice-payment-failed.md): Webhook sent when an invoice payment fails.

### Invoice payment refunded

 - [POST InvoicePaymentRefunded](https://api-docs.solidgate.com/api/v2/invoices/on-invoice-payment-refunded.md): Webhook sent when an invoice payment is refunded.

### Invoice dunning started

 - [POST InvoiceDunningStarted](https://api-docs.solidgate.com/api/v2/invoices/on-invoice-dunning-started.md): Webhook sent when an invoice enters the dunning process.

### Invoice unpaid

 - [POST InvoiceUnpaid](https://api-docs.solidgate.com/api/v2/invoices/on-invoice-unpaid.md): Webhook sent when an invoice becomes unpaid.

## Subscriptions

Create subscriptions and retrieve them to view status, line items, and recurring billing details for your customers.

### Create subscription

 - [POST /subscriptions/create](https://api-docs.solidgate.com/api/v2/subscriptions/create-subscription.md): Creates a new subscription.

### Get subscription

 - [POST /subscriptions/get](https://api-docs.solidgate.com/api/v2/subscriptions/get-subscription.md): Returns the subscription for the provided identifier.

### List subscriptions

 - [POST /subscriptions/list](https://api-docs.solidgate.com/api/v2/subscriptions/list-subscriptions.md): Returns a paginated list of subscriptions.

### Cancel subscription

 - [POST /subscriptions/cancel](https://api-docs.solidgate.com/api/v2/subscriptions/cancel-subscription.md): Cancels the subscription immediately or schedules cancellation for the end of the current billing period.

### Delete subscription cancellation

 - [POST /subscriptions/delete-cancellation](https://api-docs.solidgate.com/api/v2/subscriptions/delete-subscription-cancellation.md): Removes the cancellation scheduled for the end of the current billing period by the subscription cancel operation with mode PERIOD_END, keeping the subscription active.

### Update subscription

 - [POST /subscriptions/update](https://api-docs.solidgate.com/api/v2/subscriptions/update-subscription.md): Applies targeted updates to an active subscription, including updating the payment instrument, discount, description, and metadata, ending a trial period, and managing line items. For example, trial end uses an explicit mode, and line items are managed by adding, updating, and removing entries instead of full replacement. Each update is applied only when its corresponding field is present in the request.

### Subscription created

 - [POST SubscriptionCreated](https://api-docs.solidgate.com/api/v2/subscriptions/on-subscription-created.md): Webhook sent when a new subscription is created.

### Subscription updated

 - [POST SubscriptionUpdated](https://api-docs.solidgate.com/api/v2/subscriptions/on-subscription-updated.md): Webhook sent when a subscription is updated.

### Subscription scheduled for cancellation

 - [POST SubscriptionScheduledForCancellation](https://api-docs.solidgate.com/api/v2/subscriptions/on-subscription-scheduled-for-cancellation.md): Webhook sent when a subscription is scheduled for cancellation.

### Subscription cancelled

 - [POST SubscriptionCancelled](https://api-docs.solidgate.com/api/v2/subscriptions/on-subscription-cancelled.md): Webhook sent when a subscription is cancelled.

### Subscription trial activated

 - [POST SubscriptionTrialActivated](https://api-docs.solidgate.com/api/v2/subscriptions/on-subscription-trial-activated.md): Webhook sent when a subscription trial is activated.

### Subscription activated

 - [POST SubscriptionActivated](https://api-docs.solidgate.com/api/v2/subscriptions/on-subscription-activated.md): Webhook sent when a subscription is activated.

### Subscription expired

 - [POST SubscriptionExpired](https://api-docs.solidgate.com/api/v2/subscriptions/on-subscription-expired.md): Webhook sent when a subscription expires.

## Antifraud lists

Manage lists and items to allow or block transactions and reduce chargebacks and fraud.

### Create antifraud list

 - [POST /antifraud-lists/create](https://api-docs.solidgate.com/api/v2/antifraud-lists/create-antifraud-list.md): Creates a new antifraud list.

### Update antifraud list

 - [POST /antifraud-lists/update](https://api-docs.solidgate.com/api/v2/antifraud-lists/update-antifraud-list.md): Updates the antifraud list.

### List antifraud lists

 - [POST /antifraud-lists/list](https://api-docs.solidgate.com/api/v2/antifraud-lists/list-antifraud-list.md): Retrieves a paginated list of antifraud lists.

### Get antifraud list

 - [POST /antifraud-lists/get](https://api-docs.solidgate.com/api/v2/antifraud-lists/get-antifraud-list.md): Returns the antifraud list for the provided identifier.

### Create antifraud list item

 - [POST /antifraud-lists/create-item](https://api-docs.solidgate.com/api/v2/antifraud-lists/create-item-antifraud-list.md): Creates a new antifraud list item.

### Delete antifraud list item

 - [POST /antifraud-lists/delete-item](https://api-docs.solidgate.com/api/v2/antifraud-lists/delete-item-antifraud-list.md): Deletes the antifraud list item for the provided identifier.

### List antifraud list items

 - [POST /antifraud-lists/list-item](https://api-docs.solidgate.com/api/v2/antifraud-lists/list-item-antifraud-list.md): Retrieves a paginated list of antifraud list items.

## Fraud alerts

Receive events when fraud alerts are reported for payments.

### Fraud alert received

 - [POST FraudAlertReceived](https://api-docs.solidgate.com/api/v2/fraud-alerts/on-fraud-alert-received.md): Webhook sent when a fraud alert is received for a payment.

## Prevention alerts

Receive events when prevention alerts are reported for payments.

### Prevention alert received

 - [POST PreventionAlertReceived](https://api-docs.solidgate.com/api/v2/prevention-alerts/on-prevention-alert-received.md): Webhook sent when a prevention alert is received for a payment.

## Routing

Retrieve routing configurations and their versions to inspect how transactions are routed across payment providers, and receive events when routing configuration versions are published.

### Get routing configuration

 - [POST /routing-configs/get](https://api-docs.solidgate.com/api/v2/routing/get-routing-config.md): Returns the routing configuration for the provided identifier.

### Get routing configuration version

 - [POST /routing-configs/get-version](https://api-docs.solidgate.com/api/v2/routing/get-routing-config-version.md): Returns the routing configuration version with the full route tree for the provided identifier.

### Routing configuration version published

 - [POST RoutingConfigVersionPublished](https://api-docs.solidgate.com/api/v2/routing/on-routing-config-version-published.md): Webhook sent when a new routing configuration version is published.

## Reports

Reports export your account data in bulk as a CSV file.

Each report covers one `report_type` and one date range. Records are selected by their creation date, where
`date_from` is inclusive and `date_to` is exclusive. Reports contain only the account and channels the API key
can access. Reports expire 30 days after creation.

Column layout of each report file, by report type.

<details class="cl-month" style="margin: 12px 0">
<summary>

<div style="padding: 12px 16px">
<strong>INVOICES</strong><br>
Invoices created in the date range, with one row per invoice line item. Deleted invoices are excluded.
</div>

</summary>

<div style="margin: 0">
<div style="padding: 4px">

| Column | Type | Description |
| --- | --- | --- |
| <code style="white-space: nowrap">id</code> | string | Unique invoice identifier. |
| <code style="white-space: nowrap">status</code> | string | Current invoice status: `DRAFT`, `OPEN`, `PAID`, `VOIDED`, `DUNNING`, `UNPAID`. |
| <code style="white-space: nowrap">currency</code> | string | Three-letter ISO-4217 currency code. |
| <code style="white-space: nowrap">total_amount</code> | integer | Total invoice amount in minor units. |
| <code style="white-space: nowrap">notes</code> | string | Additional notes for the invoice. |
| <code style="white-space: nowrap">merchant_reference</code> | string | Merchant-defined reference for the invoice. |
| <code style="white-space: nowrap">pdf_url</code> | string | URL to download the invoice PDF. |
| <code style="white-space: nowrap">created_at</code> | datetime | Date and time when the invoice was created. |
| <code style="white-space: nowrap">updated_at</code> | datetime | Date and time when the invoice was updated. |
| <code style="white-space: nowrap">due_at</code> | datetime | Date and time when the invoice is due. |
| <code style="white-space: nowrap">customer_id</code> | string | Unique customer identifier. |
| <code style="white-space: nowrap">customer_first_name</code> | string | Customer first name. |
| <code style="white-space: nowrap">customer_last_name</code> | string | Customer last name. |
| <code style="white-space: nowrap">customer_email</code> | string | Customer email. |
| <code style="white-space: nowrap">customer_phone</code> | string | Customer phone number. |
| <code style="white-space: nowrap">customer_address_city</code> | string | Customer city. |
| <code style="white-space: nowrap">customer_address_country</code> | string | Customer country. |
| <code style="white-space: nowrap">customer_address_line1</code> | string | Customer address line 1. |
| <code style="white-space: nowrap">customer_address_line2</code> | string | Customer address line 2. |
| <code style="white-space: nowrap">customer_address_state</code> | string | Customer state. |
| <code style="white-space: nowrap">customer_address_postal_code</code> | string | Customer postal code. |
| <code style="white-space: nowrap">customer_tax_taxability</code> | string | Customer taxability: `EXEMPT`, `TAXABLE`. |
| <code style="white-space: nowrap">amount_details_subtotal</code> | integer | Subtotal amount in minor units before discounts and taxes. |
| <code style="white-space: nowrap">amount_details_discount</code> | integer | Discount amount in minor units. |
| <code style="white-space: nowrap">amount_details_taxable</code> | integer | Taxable amount in minor units. |
| <code style="white-space: nowrap">amount_details_tax</code> | integer | Tax amount in minor units. |
| <code style="white-space: nowrap">discounts</code> | json | Discounts applied to the invoice, each with `coupon_id` and `coupon_code`. |
| <code style="white-space: nowrap">line_item_product_price_id</code> | string | Identifier of the associated product price. |
| <code style="white-space: nowrap">line_item_description</code> | string | Line item description. |
| <code style="white-space: nowrap">line_item_amount</code> | integer | Line item amount in minor units. |
| <code style="white-space: nowrap">line_item_currency</code> | string | Three-letter ISO-4217 currency code. |
| <code style="white-space: nowrap">line_item_quantity</code> | integer | Number of product units. |
| <code style="white-space: nowrap">line_item_amount_details_subtotal</code> | integer | Line item subtotal in minor units before discounts and taxes. |
| <code style="white-space: nowrap">line_item_amount_details_discount</code> | integer | Line item discount amount in minor units. |
| <code style="white-space: nowrap">line_item_amount_details_taxable</code> | integer | Line item taxable amount in minor units. |
| <code style="white-space: nowrap">line_item_amount_details_tax</code> | integer | Line item tax amount in minor units. |
| <code style="white-space: nowrap">line_item_tax_category_id</code> | string | Identifier of the tax category. |
| <code style="white-space: nowrap">line_item_tax_mode</code> | string | Tax calculation mode: `EXCLUSIVE`, `INCLUSIVE`. |
| <code style="white-space: nowrap">line_item_tax_rate</code> | number | Tax rate as a percentage. |

</div>
</div>

</details>

<details class="cl-month" style="margin: 12px 0">
<summary>

<div style="padding: 12px 16px">
<strong>SUBSCRIPTIONS</strong><br>
Subscriptions created in the date range, with one row per subscription line item, matching
<a href="#tag/Subscriptions">Subscriptions</a>.
</div>

</summary>

<div style="margin: 0">
<div style="padding: 4px">

| Column | Type | Description |
| --- | --- | --- |
| <code style="white-space: nowrap">id</code> | string | Unique subscription identifier. |
| <code style="white-space: nowrap">customer_id</code> | string | Unique customer identifier. |
| <code style="white-space: nowrap">status</code> | string | Subscription status: `CREATED`, `PENDING`, `TRIALING`, `ACTIVE`, `REDEMPTION`, `UNPAID`, `CANCELLED`, `EXPIRED`. |
| <code style="white-space: nowrap">currency</code> | string | Three-letter ISO-4217 currency code. |
| <code style="white-space: nowrap">description</code> | string | Additional description for the subscription. |
| <code style="white-space: nowrap">payment_instrument_id</code> | string | Identifier of the payment instrument used for billing. |
| <code style="white-space: nowrap">latest_invoice_id</code> | string | Identifier of the most recent invoice. |
| <code style="white-space: nowrap">merchant_reference</code> | string | Merchant-defined reference for the subscription. |
| <code style="white-space: nowrap">created_at</code> | datetime | Date and time when the subscription was created. |
| <code style="white-space: nowrap">updated_at</code> | datetime | Date and time when the subscription was updated. |
| <code style="white-space: nowrap">started_at</code> | datetime | Date and time when the subscription started. |
| <code style="white-space: nowrap">next_billing_at</code> | datetime | Date and time when the next billing occurs. |
| <code style="white-space: nowrap">anchor_at</code> | datetime | Date and time used to anchor billing cycles. |
| <code style="white-space: nowrap">trial_info_type</code> | string | Trial type: `FREE`, `PAID`. |
| <code style="white-space: nowrap">trial_info_amount</code> | integer | Trial amount in minor units. |
| <code style="white-space: nowrap">trial_info_period_start_at</code> | datetime | Date and time when the trial period starts. |
| <code style="white-space: nowrap">trial_info_period_end_at</code> | datetime | Date and time when the trial period ends. |
| <code style="white-space: nowrap">trial_info_period_config_value</code> | integer | Number of units in the trial period. |
| <code style="white-space: nowrap">trial_info_period_config_unit</code> | string | Trial period unit: `MINUTE`, `HOUR`, `DAY`, `WEEK`, `MONTH`, `QUARTER`, `YEAR`. |
| <code style="white-space: nowrap">cancellation_info_cancel_at</code> | datetime | Date and time when the subscription is scheduled to be cancelled or was cancelled. |
| <code style="white-space: nowrap">cancellation_info_requested_at</code> | datetime | Date and time when cancellation was requested. |
| <code style="white-space: nowrap">cancellation_info_reason</code> | string | Cancellation reason: `DUNNING_EXHAUSTED`, `CANCELLATION_REQUESTED`. |
| <code style="white-space: nowrap">cancellation_info_comment</code> | string | Additional cancellation comment. |
| <code style="white-space: nowrap">discounts</code> | json | Discounts applied to the subscription, each with `coupon_id` and `coupon_code`. |
| <code style="white-space: nowrap">metadata</code> | json | Set of key-value pairs attached to the subscription. |
| <code style="white-space: nowrap">line_item_id</code> | string | Unique line item identifier. |
| <code style="white-space: nowrap">line_item_product_id</code> | string | Identifier of the associated product. |
| <code style="white-space: nowrap">line_item_product_price_id</code> | string | Identifier of the associated product price. |
| <code style="white-space: nowrap">line_item_billing_type</code> | string | Line item billing type: `RECURRING`, `ONE_TIME`. |
| <code style="white-space: nowrap">line_item_currency</code> | string | Three-letter ISO-4217 currency code. |
| <code style="white-space: nowrap">line_item_amount</code> | integer | Line item amount in minor units. |
| <code style="white-space: nowrap">line_item_quantity</code> | integer | Number of product units. |
| <code style="white-space: nowrap">line_item_started_at</code> | datetime | Date and time when the line item started. |
| <code style="white-space: nowrap">line_item_period_start_at</code> | datetime | Date and time when the billing period starts. |
| <code style="white-space: nowrap">line_item_period_end_at</code> | datetime | Date and time when the billing period ends. |
| <code style="white-space: nowrap">line_item_billing_period_config_value</code> | integer | Number of units in the billing period. |
| <code style="white-space: nowrap">line_item_billing_period_config_unit</code> | string | Billing period unit: `MINUTE`, `HOUR`, `DAY`, `WEEK`, `MONTH`, `QUARTER`, `YEAR`. |
| <code style="white-space: nowrap">line_item_product_info_name</code> | string | Product name. |
| <code style="white-space: nowrap">line_item_product_info_description</code> | string | Product description. |
| <code style="white-space: nowrap">line_item_created_at</code> | datetime | Date and time when the line item was created. |
| <code style="white-space: nowrap">line_item_updated_at</code> | datetime | Date and time when the line item was updated. |

</div>
</div>

</details>


### Create report

 - [POST /reports/create](https://api-docs.solidgate.com/api/v2/reports/create-report.md): Creates a report for the specified date range. The report is processed asynchronously. Once processing completes, use the returned id to download it.

### Download report

 - [POST /reports/download](https://api-docs.solidgate.com/api/v2/reports/download-report.md): Returns a 303 redirect to a short-lived download URL.

### List reports

 - [POST /reports/list](https://api-docs.solidgate.com/api/v2/reports/list-reports.md): Returns reports available to the current API key, sorted by creation date (newest first). The response includes only report types the API key has access to. Supports cursor-based pagination.

