• Installs:
  • Today: 14
  • All Time: 39390
Developer:userserg.osipchuk

SquareECommerce API Package

Accept, process and filter online payments through Square.

List of Endpoints
This is the list of endpoints this API includes. To add any of the endpoints to your app, please click on “Connect to endpoint” text.
See All
Discussions
See All
Readme

SquareECommerce

SquareECommerce Package

Accept, process and filter online payments through Square.

Using the API:

The square API uses OAuth. To start using it, first create an app:

  1. Head over to squareup.com and create an account to start using the API.
  2. Visit https://connect.squareup.com/apps and sign in.
  3. Register an application: - Click "New Application" - Enter a name for your application and click Create App. (Note that your application name can't include the word Square.)
  4. After you complete the registration you will see Application ID and Application Secret. For development, please only use the sandbox ID and Secret!

Than, you can use the Sandbox access token (found at the bottom of the page) in order to test the API from the RapidAPI console:

Custom datatypes:

DatatypeDescriptionExample
DatepickerString which includes date and time2016-05-28 00:00:00
MapString which includes latitude and longitude coma separated50.37, 26.56
ListSimple array["123", "sample"]
SelectString with predefined valuessample
ArrayArray of objects[{"Second name":"123","Age":"12","Photo":"sdf","Draft":"sdfsdf"},{"name":"adi","Second name":"bla","Age":"4","Photo":"asfserwe","Draft":"sdfsdf"}]

SquareECommerce.getAccessToken

This endpoint allows to obtain accessToken from SquareECommerce.

FieldTypeDescription
clientIdcredentialsRequired: API key obtained from Square ECommerce.
clientSecretcredentialsRequired: API secret obtained from Square ECommerce.
codeStringRequired: Authorization code.

SquareECommerce.refreshAccessToken

This endpoint allows to renew acceesToken.

FieldTypeDescription
clientIdcredentialsRequired: API key obtained from Square ECommerce.
clientSecretcredentialsRequired: API secret obtained from Square ECommerce.
accessTokenStringRequired: accessToken obtained from getAccessToken method.

SquareECommerce.revokeSingleAccessToken

This endpoint allows to revoke an access token generated with the OAuth flow.

FieldTypeDescription
clientIdcredentialsRequired: API key obtained from Square ECommerce.
clientSecretcredentialsRequired: API secret obtained from Square ECommerce.
accessTokenStringRequired: accessToken obtained from getAccessToken method.

SquareECommerce.revokeTokens

This endpoint allows to revoke all merchant's access tokens.

FieldTypeDescription
clientIdcredentialsRequired: API key obtained from Square ECommerce.
clientSecretcredentialsRequired: API secret obtained from Square ECommerce.
merchantIdStringRequired: The ID of the merchant whose token you want to revoke.

SquareECommerce.getLocations

This endpoint provides the details for all of a business's locations.

FieldTypeDescription
accessTokenStringRequired: Valid AccessToken.

SquareECommerce.chargeCard

Charges a card represented by a card nonce or a customer's card on file.

FieldTypeDescription
accessTokenStringRequired: Valid AccessToken.
locationIdStringRequired: The ID of the location to associate the created transaction with.
idempotencyKeyStringRequired: A value you specify that uniquely identifies this transaction among transactions you've created.
amountStringRequired: The amount of money to charge.
currencyStringRequired: The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD. The value of currency must match the currency associated with the business that is charging the card.
cardNonceStringOptional: A nonce generated from the SqPaymentForm that represents the card to charge. The application that provides a nonce to this endpoint must be the same application that generated the nonce with the SqPaymentForm. Otherwise, the nonce is invalid.Do not provide a value for this field if you provide a value for customer_card_id.
customerCardIdStringOptional: The ID of the customer card on file to charge. Do not provide a value for this field if you provide a value for card_nonce.
delayCaptureStringOptional: If true, the request will only perform an Auth on the provided card. Default value: false
referenceIdStringOptional: An optional ID you can associate with the transaction for your own purposes (such as to associate the transaction with an entity ID in your own database). This value cannot exceed 40 characters.
noteStringOptional: An optional note to associate with the transaction. This value cannot exceed 60 characters.
customerIdStringOptional: The ID of the customer to associate this transaction with. This field is required if you provide a value for customer_card_id, and optional otherwise.
buyerEmailAddressStringOptional: The buyer's email address, if available.
billingAddressLine1StringOptional: The first line of the buyer's billing address.
billingAddressLine2StringOptional: The second line of the buyer's billing address.
billingAddressLine3StringOptional: The third line of the buyer's billing address.
billingLocalityStringOptional: The city or town of the buyer's billing address.
billingSublocalityStringOptional: A civil region within the address's locality of the buyer's billing address.
billingSublocality2StringOptional: A civil region within the address's sublocality of the buyer's billing address.
billingSublocality3StringOptional: A civil region within the address's sublocality2 of the buyer's billing address.
billingAdministrativeDistrictLevel1StringOptional: A civil entity within the address's country of the buyer's billing address. In the US, this is the state.
billingAdministrativeDistrictLevel2StringOptional: A civil entity within the address's administrative_district_level_1 of the buyer's billing address.
billingAdministrativeDistrictLevel3StringOptional: A civil entity within the address's administrative_district_level_2 of the buyer's billing address.
billingPostalCodeStringOptional: The billing address's postal code.
billingCountryStringOptional: The billing address's country, in ISO 3166-1-alpha-2 format.
shippingAddressLine1StringOptional: The first line of the buyer's shipping address.
shippingAddressLine2StringOptional: The second line of the buyer's shipping address.
shippingAddressLine3StringOptional: The third line of the buyer's shipping address.
shippingLocalityStringOptional: The city or town of the buyer's shipping address.
shippingSublocalityStringOptional: A civil region within the address's locality of the buyer's shipping address.
shippingSublocality2StringOptional: A civil region within the address's sublocality of the buyer's shipping address.
shippingSublocality3StringOptional: A civil region within the address's sublocality2 of the buyer's shipping address.
shippingAdministrativeDistrictLevel1StringOptional: A civil entity within the address's country of the buyer's shipping address. In the US, this is the state.
shippingAdministrativeDistrictLevel2StringOptional: A civil entity within the address's administrative_district_level_1 of the buyer's shipping address.
shippingAdministrativeDistrictLevel3StringOptional: A civil entity within the address's administrative_district_level_2 of the buyer's shipping address.
shippingPostalCodeStringOptional: The shipping address's postal code.
shippingCountryStringOptional: The shipping address's country, in ISO 3166-1-alpha-2 format.

SquareECommerce.getTransactions

This endpoint returns lists transactions for a particular location.

FieldTypeDescription
accessTokenStringRequired: Valid AccessToken.
locationIdStringRequired: The ID of the location to list transactions for.
beginTimeStringOptional: The beginning of the requested reporting period, in RFC 3339 format (2016-01-31T00:00:00Z). Default value: The current time minus one year.
endTimeStringOptional: The end of the requested reporting period, in RFC 3339 format (2016-01-31T00:00:00Z). Default value: The current time.
sortOrderSelectOptional: The order in which results are listed in the response (ASC for oldest first, DESC for newest first). Default value: DESC
cursorStringOptional: A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query.

SquareECommerce.captureSingleTransaction

This endpoint allows to capture a transaction that was created with the Charge endpoint with a delay_capture value of true.

FieldTypeDescription
accessTokenStringRequired: Valid AccessToken.
locationIdStringRequired: The ID of the location to list transactions for.
transactionIdStringRequired: The ID of the transaction.

SquareECommerce.voidSingleTransaction

This endpoint allows to cancel a transaction that was created with the Charge endpoint with a delay_capture value of true.

FieldTypeDescription
accessTokenStringRequired: Valid AccessToken.
locationIdStringRequired: The ID of the location to list transactions for.
transactionIdStringRequired: The ID of the transaction.

SquareECommerce.retrieveSingleTransaction

This endpoint allows to retrieve details for a single transaction.

FieldTypeDescription
accessTokenStringRequired: Valid AccessToken.
locationIdStringRequired: The ID of the location to list transactions for.
transactionIdStringRequired: The ID of the transaction.

SquareECommerce.createRefund

This endpoint allows to create a refund

FieldTypeDescription
accessTokenStringRequired: Valid AccessToken.
locationIdStringRequired: The ID of the original transaction's associated location.
transactionIdStringRequired: The ID of the original transaction that includes the tender to refund.
idempotencyKeyStringRequired: A value you specify that uniquely identifies this refund among refunds you've created for the tender.
tenderIdStringRequired: The ID of the tender to refund.
amountStringRequired: The amount of money, in the lowest in the smallest denomination of the currency indicated by currency. For example, when currency_code is USD, amount is in cents.
currencyStringRequired: The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.
reasonStringOptional: A description of the reason for the refund. Default value: Refund via API

SquareECommerce.getRefunds

This endpoint returns lists refunds for one of a business's locations.

FieldTypeDescription
accessTokenStringRequired: Valid AccessToken.
locationIdStringRequired: The ID of the location to list refunds for.
beginTimeStringOptional: The beginning of the requested reporting period, in RFC 3339 format (2016-01-31T00:00:00Z). Default value: The current time minus one year.
endTimeStringOptional: The end of the requested reporting period, in RFC 3339 format (2016-01-31T00:00:00Z). Default value: The current time.
sortOrderSelectOptional: The order in which results are listed in the response (ASC for oldest first, DESC for newest first). Default value: DESC
cursorStringOptional: A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query.

SquareECommerce.createCustomer

This endpoint creates a new customer for a business, which can have associated cards on file.

FieldTypeDescription
accessTokenStringRequired: Valid AccessToken.
givenNameStringOptional: The customer's given (i.e., first) name.
familyNameStringOptional: The customer's family (i.e., last) name.
companyNameStringOptional: The name of the customer's company.
nicknameStringOptional: A nickname for the customer.
emailStringOptional: The customer's email address.
phoneNumberStringOptional: The customer's phone number.
referenceIdStringOptional: An optional second ID you can set to associate the customer with an entity in another system.
noteStringOptional: An optional note to associate with the customer.
addressLine1StringOptional: The first line of the address.
addressLine2StringOptional: The second line of the address, if any.
addressLine3StringOptional: The third line of the address, if any.
addressLocalityStringOptional: The city or town of the address.
addressSublocalityStringOptional: A civil region within the address's locality, if any.
addressSublocality2StringOptional: A civil region within the address's sublocality, if any.
addressSublocality3StringOptional: A civil region within the address's sublocality2, if any.
addressAdministrativeDistrictLevel1StringOptional: A civil entity within the address's country. In the US, this is the state.
addressAdministrativeDistrictLevel2StringOptional: A civil entity within the address's administrative_district_level_1. In the US, this is the county.
addressAdministrativeDistrictLevel3StringOptional: A civil entity within the address's administrative_district_level_2, if any.
addressPostalCodeStringOptional: The address's postal code.
addressCountryStringOptional: The address's country, in ISO 3166-1-alpha-2 format.

SquareECommerce.getCustomers

This endpoint returns lists a business's customers.

FieldTypeDescription
accessTokenStringRequired: Valid AccessToken.
cursorStringOptional: A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query.

SquareECommerce.updateCustomer

This endpoint updates the details of an existing customer.

FieldTypeDescription
accessTokenStringRequired: Valid AccessToken.
customerIdStringRequired: The ID of the customer to update.
givenNameStringOptional: The customer's given (i.e., first) name.
familyNameStringOptional: The customer's family (i.e., last) name.
companyNameStringOptional: The name of the customer's company.
nicknameStringOptional: A nickname for the customer.
emailStringOptional: The customer's email address.
phoneNumberStringOptional: The customer's phone number.
referenceIdStringOptional: An optional second ID you can set to associate the customer with an entity in another system.
noteStringOptional: An optional note to associate with the customer.
addressLine1StringOptional: The first line of the address.
addressLine2StringOptional: The second line of the address, if any.
addressLine3StringOptional: The third line of the address, if any.
addressLocalityStringOptional: The city or town of the address.
addressSublocalityStringOptional: A civil region within the address's locality, if any.
addressSublocality2StringOptional: A civil region within the address's sublocality, if any.
addressSublocality3StringOptional: A civil region within the address's sublocality2, if any.
addressAdministrativeDistrictLevel1StringOptional: A civil entity within the address's country. In the US, this is the state.
addressAdministrativeDistrictLevel2StringOptional: A civil entity within the address's administrative_district_level_1. In the US, this is the county.
addressAdministrativeDistrictLevel3StringOptional: A civil entity within the address's administrative_district_level_2, if any.
addressPostalCodeStringOptional: The address's postal code.
addressCountryStringOptional: The address's country, in ISO 3166-1-alpha-2 format.

SquareECommerce.getSingleCustomer

This endpoint returns details for a single customer.

FieldTypeDescription
accessTokenStringRequired: Valid AccessToken.
customerIdStringRequired: The ID of the customer to retrieve.

SquareECommerce.createCustomerCard

Adds a card on file to an existing customer.

FieldTypeDescription
accessTokenStringRequired: Valid AccessToken.
customerIdStringRequired: The ID of the customer to link the card on file to.
cardNonceStringRequired: A card nonce representing the credit card to link to the customer.
cardholderNameStringOptional: The cardholder's name.
billingAddressLine1StringOptional: The first line of the buyer's billing address.
billingAddressLine2StringOptional: The second line of the buyer's billing address.
billingAddressLine3StringOptional: The third line of the buyer's billing address.
billingLocalityStringOptional: The city or town of the buyer's billing address.
billingSublocalityStringOptional: A civil region within the address's locality of the buyer's billing address.
billingSublocality2StringOptional: A civil region within the address's sublocality of the buyer's billing address.
billingSublocality3StringOptional: A civil region within the address's sublocality2 of the buyer's billing address.
billingAdministrativeDistrictLevel1StringOptional: A civil entity within the address's country of the buyer's billing address. In the US, this is the state.
billingAdministrativeDistrictLevel2StringOptional: A civil entity within the address's administrative_district_level_1 of the buyer's billing address.
billingAdministrativeDistrictLevel3StringOptional: A civil entity within the address's administrative_district_level_2 of the buyer's billing address.
billingPostalCodeStringOptional: The billing address's postal code.
billingCountryStringOptional: The billing address's country, in ISO 3166-1-alpha-2 format.

SquareECommerce.deleteCustomerCard

This endpoint removes a card on file from a customer.

FieldTypeDescription
accessTokenStringRequired: Valid AccessToken.
customerIdStringRequired: The ID of the customer to delete.
cardIdStringRequired: The ID of the card on file to delete.

SquareECommerce.deleteSingleCustomer

This endpoint deletes a customer from a business, along with any linked cards on file.

FieldTypeDescription
accessTokenStringRequired: Valid AccessToken.
customerIdStringRequired: The ID of the customer to delete.
x
circle
SquareECommerce
$ / m
We will charge your card every month for the plan amount, as well as any overages incurred in the previous month.
?

Oops, we are missing some details

Looks like there are a few missing details that you haven't filled in yet.
These details are important and will help us protect you and let you know about anything new.

x

Why sign up to RapidAPI?

  • integrate
    Integrate APIs into your app
    Ruby, Java, Elixir, Node.js, Phyton, Objective C, Swift, PHP and MORE
  • keys
    Save all API keys in one place
  • notifications
    Get notifications about API changes
  • stats
    Get stats and monitor API connections
__SING_UP_WITH_GITHUB__
__SING_UP_WITH_FACEBOOK__
__SING_UP_WITH_GOOGLE__
  • We're not going to post anything on your wall.
  • We're not planning to spam you.
  • esccloses this view
    x

    Authentication

    Authenticate
    esccloses this view