Hello Square community,
I recently encountered this issue when trying to load the web payment sdk on our frontend app (using vue.js). I followed instructions here for going to production: Take a Card Payment
We were able to successfully take payments from this API (2019-03-13) version which I realized is way behind. Then we tried 2023-12-13 version, and this is where we are getting the The Payment 'applicationId' option is not in the correct format.
error.
This is how we are loading the web payment
async loadCard() {
this.card = null;
console.log("app id", this.appId);
const payments = Square.payments(this.appId, this.locationId);
try {
this.card = await payments.card();
this.isCardInitialized = true;
await this.card.attach("#card-container");
} catch (e) {
this.notifyVue("Initializing Card failed", e, "error");
return;
}
},
I also made sure i am using the production version of the squarecdn which is: https://web.squarecdn.com/v1/square.js
I logged the application id which starts with sqOidp-...
, and i am getting correct value in the console. I am not really sure what I am missing here, any help is appreciated! Let me know if you need me to provide more details. thank you!