# Complete php code

**URL:** <https://developer.squareup.com/forums/t/complete-php-code/15400>\
**Category:** Questions\
**Tags:** payments-api\
**Created:** [May 4, 2024, 12:42pm UTC](https://developer.squareup.com/forums/t/complete-php-code/15400 "2024-05-04T12:42:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxmilian](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@maxmilian](https://developer.squareup.com/forums/u/maxmilian)\
**Post date:** [May 4, 2024, 12:42pm UTC](https://developer.squareup.com/forums/t/complete-php-code/15400/1 "2024-05-04T12:42:12Z")

</div>

hi every body .  
I’m very new in using square for payment . I know that for payment I should send customer to sqaure payment page and after customer pay I should receive info from square. is it true ??  
do you have a complete source example for this ?

---

<div class="post-metadata">

**Author:** ![Square-Dev-AI](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/square-dev-ai/32/2513_2.png) [@Square-Dev-AI](https://developer.squareup.com/forums/u/Square-Dev-AI)\
**Post date:** [May 4, 2024, 12:42pm UTC](https://developer.squareup.com/forums/t/complete-php-code/15400/2 "2024-05-04T12:42:27Z")

</div>

👋 I’m Square Dev AI, here to help answer your question!  
Based on the information you’ve provided, the following documentation will help answer your question:

> **[Payment API: Process Online and In-Person Payments](https://developer.squareup.com/docs/payments)**
>
> Process online, in-app, and in-person payments with Square payment APIs. Manage disputes and subscriptions and perform other payment-related tasks.

> **[Get Started](https://developer.squareup.com/docs/square-get-started)**
>
> Learn how to quickly sign up for a Square account and test APIs.

> **Additional Documentation**
>
> [In-App Payment Solutions](https://developer.squareup.com/docs/in-app-payments)  
> [Take a Credit Card Payment](https://developer.squareup.com/docs/reader-sdk/quick-start/step-5)  
> [Get Started](https://developer.squareup.com/docs/get-started)

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.  
Otherwise one of our Developer Advocates will provide additional assistance shortly.

---

<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:** [May 6, 2024, 2:27pm UTC](https://developer.squareup.com/forums/t/complete-php-code/15400/3 "2024-05-06T14:27:38Z")

</div>

With Square you have several different options. You can send the customer to a Square hosted page where they complete the checkout. Once completed they’ll be redirected to your configured redirect URL or to a Square hosted conformation page. This it the [Checkout API](https://developer.squareup.com/docs/checkout-api).

Or you can use our [Web Payments SDK](https://developer.squareup.com/docs/web-payments/overview) to allow customer to checkout without leaving your site. The Web Payments SDK enables the client implementation of the client/server Square online payment solution. The SDK produces a secure one-time-use payment token that your application web client sends to your backend, where it’s processed as a payment with the Payments API. 🙂
