Sha256: d09488280df8724c8473ebb240e614854c62e66650e434b48b81137a8ea8671c

Contents?: true

Size: 1.99 KB

Versions: 28

Compression:

Stored size: 1.99 KB

Contents

# SquareConnect::CheckoutApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**create_checkout**](CheckoutApi.md#create_checkout) | **POST** /v2/locations/{location_id}/checkouts | CreateCheckout


# **create_checkout**
> CreateCheckoutResponse create_checkout(location_id, body)

CreateCheckout

Creates a [Checkout](#type-checkout) response that links a `checkoutId` and `checkout_page_url` that customers can be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com.

### Example
```ruby
# load the gem
require 'square_connect'
# setup authorization
SquareConnect.configure do |config|
  # Configure OAuth2 access token for authorization: oauth2
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = SquareConnect::CheckoutApi.new

location_id = "location_id_example" # String | The ID of the business location to associate the checkout with.

body = SquareConnect::CreateCheckoutRequest.new # CreateCheckoutRequest | An object containing the fields to POST for the request.  See the corresponding object definition for field details.


begin
  #CreateCheckout
  result = api_instance.create_checkout(location_id, body)
  p result
rescue SquareConnect::ApiError => e
  puts "Exception when calling CheckoutApi->create_checkout: #{e}"
end
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **location_id** | **String**| The ID of the business location to associate the checkout with. | 
 **body** | [**CreateCheckoutRequest**](CreateCheckoutRequest.md)| An object containing the fields to POST for the request.  See the corresponding object definition for field details. | 

### Return type

[**CreateCheckoutResponse**](CreateCheckoutResponse.md)

### Authorization

[oauth2](../README.md#oauth2)

### HTTP request headers

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



Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
square_connect-2.20181212.0.267 docs/CheckoutApi.md
square_connect-2.20181205.0.263 docs/CheckoutApi.md
square_connect-2.20180918.1.251 docs/CheckoutApi.md
square_connect-2.20180918.0.244 docs/CheckoutApi.md
square_connect-2.20180712.2.237 docs/CheckoutApi.md
square_connect-2.20180712.1.234 docs/CheckoutApi.md
square_connect-2.20180712.1.228 docs/CheckoutApi.md
square_connect-2.20180712.0.224 docs/CheckoutApi.md
square_connect-2.9.0.220 docs/CheckoutApi.md
square_connect-2.8.0.215 docs/CheckoutApi.md
square_connect-2.8.0.208 docs/CheckoutApi.md
square_connect-2.7.0.202 docs/CheckoutApi.md
square_connect-2.6.1.197 docs/CheckoutApi.md
square_connect-2.6.0.192 docs/CheckoutApi.md
square_connect-2.5.2.188 docs/CheckoutApi.md
square_connect-2.5.1.183 docs/CheckoutApi.md
square_connect-2.5.0.180 docs/CheckoutApi.md
square_connect-2.4.0.175 docs/CheckoutApi.md
square_connect-2.4.0.170 docs/CheckoutApi.md
square_connect-2.3.1.161 docs/CheckoutApi.md