In-App Payments SDK Quick Start

Step 3: Take a payment with a cURL command

Payments must be processed by a backend server. To get started quickly, you can also send Charge requests manually with cURL.

Java (Android)
Android
iOS
Save

The Super Cookie Quick Start app has 3 screens:

  • Initial screen with a Buy button that starts the payment flow.
  • A purchase confirmation screen with buttons for payment card entry or a digital wallet.
  • The In-App Payments SDK card entry form.

Android sample app

iOS sample app

Now that the sample app is configured, you can start the app, order a cookie, and enter your credit card information:

  1. Build and run the app in Android studio.
  2. Tap the Buy button and choose Pay with card and enter your card information. Note: if you tap the Google Pay button, you will see a warning message (Unrecognized app. Please make sure you trust this app before proceeding) because this quick start does not include steps for configuring Google Pay.
  3. After submitting your card information, you will get a success message indicating that a nonce has been created.
  4. Check Logcat for a cURL command that you can use to charge the card.
  5. Add your Personal Access Token and Location ID from Step 1 to the CURL command and run it from the command line.
  1. Build and run the app.
  2. Tap the Buy button and choose Pay with card. You may see an error if you tap the Apple Pay button because this quick start does not include steps for configuring Apple Pay.
  3. After submitting your card information, you will get a success message indicating that a nonce has been created.
  4. Check the Xcode console for a cURL command you can use to charge the card.
  5. Add your Personal Access Token and Location ID from Step 1 to the CURL command and run it from the command line.

Once the cURL command completes you can view the transaction details in Square Dashboard.

Prev
< Configure the sample app
Next
Take payment with a server backend >

Contact Developer Support, join our Slack channel, or ask for help on Stack Overflow