Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Latest commit

 

History

History
76 lines (55 loc) · 2.55 KB

CheckoutApi.md

File metadata and controls

76 lines (55 loc) · 2.55 KB

Square.Connect.Api.CheckoutApi

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

Method HTTP request Description
CreateCheckout POST /v2/locations/{location_id}/checkouts CreateCheckout

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

Name Type Description Notes
locationId string The ID of the business location to associate the checkout with.
body CreateCheckoutRequest An 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]