Square.Connect.Api.CheckoutApi

February 13, 2019 ยท View on GitHub

All URIs are relative to https://connect.squareup.com

MethodHTTP requestDescription
CreateCheckoutPOST /v2/locations/{location_id}/checkoutsCreateCheckout

CreateCheckout

CreateCheckoutResponse CreateCheckout (string locationId, CreateCheckoutRequest body)

CreateCheckout

Links a checkoutId to a checkout_page_url that customers will be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com.

Example

using System;
using System.Diagnostics;
using Square.Connect.Api;
using Square.Connect.Client;
using Square.Connect.Model;

namespace Example
{
    public class CreateCheckoutExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new CheckoutApi();
            var locationId = locationId_example;  // string | The ID of the business location to associate the checkout with.
            var body = new CreateCheckoutRequest(); // CreateCheckoutRequest | An object containing the fields to POST for the request.  See the corresponding object definition for field details.

            try
            {
                // CreateCheckout
                CreateCheckoutResponse result = apiInstance.CreateCheckout(locationId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CheckoutApi.CreateCheckout: " + e.Message );
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
locationIdstringThe ID of the business location to associate the checkout with.
bodyCreateCheckoutRequestAn object containing the fields to POST for the request. See the corresponding object definition for field details.

Return type

CreateCheckoutResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]