question

thewebprojects avatar image
thewebprojects asked thewebprojects answered

Save card to file + subscribe customer

Hello, I have a single merchant. I don't have a developer/sandbox account. I'm just working in production (I know. I'm a cowboy). I'm using Clover's iFrame feature to get a token/source. I then create a card-on-file customer. That works as expected. The new customer appears in the Clover panel. All good there, but in addition to creating a card-on-file customer, at the same time, I want to subscribe that new customer to a plan. The plan already exists (I created in the Clover panel). Is that possible?

I'm sure it is but can but I suppose I'll need the customer ID of the newly created customer (get the customer ID). Then I need to make a 3rd call to subscribe that customer? Does that sound right.

Please advise.

API Tokenclover-hosted-iframe
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
thewebprojects avatar image
thewebprojects answered

In an effort to be helpful to others looking to do the same thing...

When you create a card on file the API will respond with an id. That's the customer id. So then create another call to create a subscription.

In my case I don't need a developer account, create an app or have that approved, etc. The docs seem a bit misleading there.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community