# Subscription not being created using Checkout-api

**URL:** <https://developer.squareup.com/forums/t/subscription-not-being-created-using-checkout-api/6399>\
**Category:** Questions\
**Tags:** checkout-api\
**Created:** [July 6, 2022, 12:22am UTC](https://developer.squareup.com/forums/t/subscription-not-being-created-using-checkout-api/6399 "2022-07-06T00:22:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aspire](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@Aspire](https://developer.squareup.com/forums/u/Aspire)\
**Post date:** [July 6, 2022, 12:22am UTC](https://developer.squareup.com/forums/t/subscription-not-being-created-using-checkout-api/6399/1 "2022-07-06T00:22:07Z")

</div>

I am testing the online-checkout/payment-links API using Sandbox. I am running from my test system using localhost (VS 2022).

When I execute the API (listed below) the system generates a payment link. When I click “test” the link responds with positive messages indicating that an order, payment,  
and customer has been created. However I am unable to see the customer that was created. I am also not able to find the subscription that should have been generated.

The subsciption has a 7 day trial period. Is there a way to verify that everything is working correctly using Sandbox?

My company is new to Square so any help will be appreciated.

Thanks,

Jim

{  
“checkout\_options”: {  
“redirect\_url”: “[https://localhost:44339/PaymentAccepted.aspx?d=35c16a18-16df-428f-b8c7-85cc28a12d6b](https://localhost:44339/PaymentAccepted.aspx?d=35c16a18-16df-428f-b8c7-85cc28a12d6b)”,  
“subscription\_plan\_id”: “3GRAGBLUEEOU6DA2QI46GNZQ”  
},  
“idempotency\_key”: “35c16a18-16df-428f-b8c7-85cc28a12d6b”,  
“order”: {  
“location\_id”: “L29788JV2N2M9”,  
“pricing\_options”: {  
“auto\_apply\_taxes”: false  
},  
“taxes”: [  
{  
“uid”: “S001”,  
“name”: “Sales Tax”,  
“percentage”: “7”,  
“scope”: “ORDER”,  
“applied\_money”: {  
“amount”: 1999,  
“currency”: “USD”  
}  
}  
],  
“line\_items”: [  
{  
“quantity”: “1”,  
“base\_price\_money”: {  
“amount”: 1999,  
“currency”: “USD”  
},  
“name”: “Subscription 7 Day Trial Period”  
}  
]  
},  
“pre\_populated\_data”: {  
“buyer\_email”: “[john@gmail.com](mailto:john@gmail.com)”  
}  
}

---

<div class="post-metadata">

**Author:** ![Aspire](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@Aspire](https://developer.squareup.com/forums/u/Aspire)\
**Post date:** [July 8, 2022, 11:26pm UTC](https://developer.squareup.com/forums/t/subscription-not-being-created-using-checkout-api/6399/2 "2022-07-08T23:26:27Z")

</div>

I have been notified by Square Support that the checkout-api does not create a subscription in sandbox but it does work in production.

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [July 8, 2022, 11:32pm UTC](https://developer.squareup.com/forums/t/subscription-not-being-created-using-checkout-api/6399/3 "2022-07-08T23:32:50Z")

</div>

Thanks for sharing the results. 🙂
