v1

latestOpenAPI 3.0.02026-07-2475182625.5 KB
Subscriptions

Create a proforma invoice

Creates a new proforma invoice that reflects changes you want to make to a subscription.

post/subscriptions/proformaInvoice

Request body

subscriptionstring required

Unique identifier for the subscription.

productstring required

The product identifier.

prorateboolean required

Indicates whether the invoice should account for proration.

If you set prorate to false, FastSpring generates a proforma invoice that reflects changes that will take effect at the next renewal date.

If you set prorate to true, FastSpring generates a proforma invoice that reflects changes that will take effect immediately.

Note: Prorated invoices are only valid for one day, as the amount adjusts daily based on the remaining time until the next renewal.

quantityinteger required

The new quantity for the subscription.

language'ar' | 'cs' | 'da' | 'de' | 'en' | 'es' | 'fi' | 'fr' | 'he' | 'hr' | 'it' | 'ja' | 'ko' | 'nl' | 'no' | 'pl' | 'pt' | 'ru' | 'sk' | 'sv' | 'tr' | 'zh'

The language code for the response.

Example request

{
  "subscription": "1abc2DE_FGhIjKLm3NoPQR",
  "product": "subscription1monthly",
  "quantity": 2,
  "language": "es",
  "pricing": {
    "price": {
      "USD": 200
    }
  }
}

Response

OK

Example response

{
  "invoice": {
    "id": "proforma12345",
    "subscription": "aBCDE12fGH3iJkL4mNOpqr",
    "product": "subscription1monthly",
    "quantity": 2,
    "total_price": {
      "USD": 200
    },
    "prorated": false,
    "language": "es",
    "created_at": "2025-01-01T12:34:56Z"
  },
  "proformaInvoiceHeader": {
    "currency": "USD",
    "timezone": "UTC",
    "language": "es",
    "message": "Esta factura y el monto en la proxima fecha de pago son validos siempre y cuando no haya cambios en el plan de suscripcion y/o los detalles de facturacion desde la fecha de hoy hasta la proxima fecha de cobro.",
    "logoUrl": "https://example.com/logo.png",
    "proFormaInvoiceCreationDate": 1656016000000,
    "proFormaInvoiceCreationDateDisplay": "02/14/25",
    "proFormaInvoiceCreationDateDisplayISO8601": "2025-02-14",
    "proFormaInvoiceExpirationDate": 1658617600000,
    "proFormaInvoiceExpirationDateDisplay": "02/14/25",
    "proFormaInvoiceExpirationDateDisplayISO8601": "2025-02-14"
  },
  "supportContact": {
    "name": "FastSpring Support",
    "email": "support@fastspring.com",
    "url": "https://www.fastspring.com/support"
  },
  "merchantContact": {
    "merchantName": "FastSpring",
    "merchantAddress": "11 W Victoria St Suite 207A Santa Barbara, CA 93101 US"
  },
  "coTerm": {
    "account": "account123",
    "coTermGroupId": "coTermGroup123"
  },
  "contact": {
    "email": "customer@example.com",
    "firstName": "John",
    "phone": "123-456-7890",
    "company": "Customer Company",
    "address": {
      "accountId": "account123",
      "addressLine1": "123 Main St",
      "city": "Anytown",
      "region": "CA",
      "postalCode": "12345",
      "country": "US"
    }
  },
  "items": {
    "subscription": "aBCDE12fGH3iJkL4mNOpqr",
    "product": "subscription1monthly",
    "quantity": 2,
    "price": {
      "USD": 200
    }
  }
}