Jump to content

API does not account for cancellations

Recommended Posts

Posted
Hey there, I need some help with the Squarespace API. I've been using it to pull profile and transaction data. I set up a test account with a weekly subscription and canceled it right away. It wasn't refunded, which means it should expire in a week. However, a week later, the isCustomer flag is still true in the profile data. And weirdly, the transactions endpoint shows no signs of the cancellation. This means any customer who subscribes and then cancels could still access content as if they're a subscriber.

I'm working on this for a client using Squarespace, so I can't share the site details here. Any ideas on why this might be happening or how to fix it?

 

Here's the only transaction for that account:

{
  "id": "xyz",
  "createdOn": "2024-08-19T17:25:41.174130Z",
  "modifiedOn": "2024-08-19T17:25:41.186863Z",
  "customerEmail": "abc@xyz.com",
  "salesOrderId": "xyz",
  "voided": false,
  "totalSales": {
    "currency": "USD",
    "value": "20.00"
  },
  "totalNetSales": {
    "currency": "USD",
    "value": "0.00"
  },
  "totalNetShipping": {
    "currency": "USD",
    "value": "0.00"
  },
  "totalTaxes": {
    "currency": "USD",
    "value": "0.00"
  },
  "total": {
    "currency": "USD",
    "value": "0.00"
  },
  "totalNetPayment": {
    "currency": "USD",
    "value": "0.00"
  },
  "payments": [],
  "salesLineItems": [
    {
      "id": "xyz",
      "discountAmount": {
        "currency": "USD",
        "value": "20.00"
      },
      "totalSales": {
        "currency": "USD",
        "value": "20.00"
      },
      "totalNetSales": {
        "currency": "USD",
        "value": "0.00"
      },
      "total": {
        "currency": "USD",
        "value": "0.00"
      },
      "taxes": []
    }
  ],
  "discounts": [
    {
      "description": "XYZ - Test",
      "name": "XYZ - Test",
      "amount": {
        "currency": "USD",
        "value": "20.00"
      }
    }
  ],
  "shippingLineItems": [],
  "paymentGatewayError": null
}

Here's the profile:

{
  "id": "xyz",
  "firstName": "Weekly",
  "lastName": "Test",
  "email": "abc@xyz.com",
  "hasAccount": true,
  "isCustomer": true,
  "createdOn": "2024-08-19T17:24:08.381Z",
  "address": {
    "firstName": "Weekly",
    "lastName": "Test",
    "address1": null,
    "address2": null,
    "city": "YUBA CITY",
    "state": "CA",
    "countryCode": "US",
    "postalCode": "90990",
    "phone": ""
  },
  "acceptsMarketing": true,
  "transactionsSummary": {
    "firstOrderSubmittedOn": "2024-08-19T17:25:38.904Z",
    "lastOrderSubmittedOn": "2024-08-19T17:25:38.904Z",
    "orderCount": 1,
    "totalOrderAmount": {
      "currency": "USD",
      "value": "0.00"
    },
    "totalRefundAmount": {
      "currency": "USD",
      "value": "0.00"
    },
    "firstDonationSubmittedOn": null,
    "lastDonationSubmittedOn": null,
    "donationCount": 0,
    "totalDonationAmount": {
      "currency": "USD",
      "value": "0.00"
    }
  }
}

 

1.png

2.png

  • 2 weeks later...
  • Replies 1
  • Views 894
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.