Gettting a blank square-hosted checkout page but able to submit payments on Checkout API Sandbox Testing Panel

I am trying to see the payment form that a user would, but for some reason it’s as shown in the second image. However, I am able to submit payments and view payments in the dev sand box.

Source Code

 public async Task<IActionResult> Checkout(CheckOutViewModel model)
     string locationId = "LB1Y7J1A86DAQ";
     RetrieveLocationResponse locationResponse = await 
     string currency = locationResponse.Location.Currency;

     Money coffeeMugMoney = new Money.Builder()

     OrderLineItem lineItem = new OrderLineItem.Builder(model.CoffeeMug.ToString())
         .Name("Coffee Mug")

     List<OrderLineItem> lineItems = [lineItem];

     Order order = new Order.Builder(locationId)

 CheckoutOptions options = new CheckoutOptions.Builder()

 CreatePaymentLinkRequest paymentLinkRequest = new CreatePaymentLinkRequest.Builder()
     .IdempotencyKey (Guid.NewGuid().ToString())

     CreatePaymentLinkResponse response = await _squareClient.CheckoutApi.CreatePaymentLinkAsync(paymentLinkRequest);

     string orderId = response.PaymentLink.OrderId;

     CookieOptions cookieOptions = new();

     cookieOptions.Expires = DateTime.Now.AddDays(1);

     Response.Cookies.Append(nameof(orderId), orderId, cookieOptions);


     return Redirect(response.PaymentLink.Url);
 catch (Exception)
     return BadRequest(new { Status = "Bad" });

 //return Ok(new { Status = "Diego was here", NumOfCoffeeMug = model.CoffeeMug });

Thanks for bringing this to our attention. I’ve reached out to the team about this. :slightly_smiling_face:

@Bryan-Square Is there something wrong with the codebase?

At this time the preview isn’t working and the team is working on a fix. I’ll be sure to update the thread when I have more information. Production is working as expected. :slightly_smiling_face:

@Bryan-Square That’s a relief. I am also having a similar problem when viewing the dev sandbox.

What’s your application ID? :slightly_smiling_face:

That’s your access token which should never be shared. The application ID will look something like sq0idp-K-i6–d9HD4fha58YpSS6w. :slightly_smiling_face:

Ok, I’ll just replace the access token. Here’s application Id: sandbox-sq0idb-IvGzX1MvCes8nj5wJCbP8g

I’ve been able to replicate and reached out to the team about this. :slightly_smiling_face:

Ok that’s good. I’ll reach out to you next week if I don’t hear from you in a while.

@Bryan-Square Hey Bryan, the production mode does work for Checkout Api, just not in development mode… yet

Right, the team is still working on a fix for this. :slightly_smiling_face:

The team has deployed a fix for this and it’s working as expect. Thanks for bringing this to our attention. :slightly_smiling_face:

Thanks! It is working properly now as expected.