Pay It Square API

Pay It Square offers a rich API that allows third party developers access to everything an organizer needs to manage their Collect Pages.

Security

Requests should be made with an authentication token in the HTTP headers (X-PayItSquare-Token). An authentication token is obtained when a user logs in through the API. It will be valid until it is deauthorized by the organizer.

Requests are required to include an app key in the HTTP headers for every request (X-PayItSquare-AppKey). The app key should be registered with Pay It Square. To register an app key with Pay It Square, please visit your developer profile to create one.

Formats

Data can be sent and returned in either XML or JSON format, controlled through HTTP headers:

  • Content-Type: application/xml or application/json - this will define the format for incoming data. The default is XML.
  • Accept: application/xml or application/json - this will define the format for outgoing data. The default is XML.

Sample requests / responses will be shown in JSON, but XML is fully supported.

Http Verbs

There are two types of resources you can retrieve: Entities and collections. Collections are a list of entities. Verbs act as so:

  • GET: Returns either an entity or a collection
  • POST: Creates a new entity, but works against a collection resource
  • PUT: Updates an existing entity. Works against an entity resource
  • DELETE: Deletes an entity. Works against an entity resource

Available Resources

Authentication:
/api/v1/organizer/authenticate (POST): Authenticates a user and returns an Authentication Token if valid.
/api/v1/organizer/send-password (POST): Sends an email for forgotten passwords.
/api/v1/organizer/deauthorize (POST): Deauthorizes an application for the organizer. This will render the token no longer valid.

Organizers:
/api/v1/organizer (POST): Creates a new organizer.
/api/v1/organizer/current (GET, PUT/POST): Get or update profile information for an organizer. This affects the organizer that the API key is for.
/api/v1/organizer/current (DELETE) or /api/v1/organizer/current/delete (POST): deletes an organizer.

Collect Pages:
/api/v1/collect-pages (GET): Returns a list of all collect pages for the organizer
/api/v1/collect-page (POST): Creates a new collect page
/api/v1/collect-page/{CollectPageId} (GET, PUT/POST): Gets or updates a collect page
/api/v1/collect-page/{CollectPageId}/reminder (POST): sends a reminder email for the collect page.
/api/v1/collect-page/{CollectPageId} (DELETE) or /api/v1/collect-page/{CollectPageId}/delete (POST): deletes a collect page.
/api/v1/collect-page/{CollectPageId}/image (GET, POST): Gets or uploads an avatar for the collect page.

Pay Options:
/api/v1/collect-page/{CollectPageId}/pay-options (GET): Returns a list of pay options for the collect page
/api/v1/collect-page/{CollectPageId}/pay-option (POST): Creates a new pay option for the collect page
/api/v1/collect-page/{CollectPageId}/pay-option/{PayOptionId} (GET, PUT/POST): Gets or update a pay option for the collect page
/api/v1/collect-page/{CollectPageId}/pay-option/{PayOptionId} (DELETE) or /api/v1/collect-page/{CollectPageId}/pay-option/{PayOptionId}/delete (POST): Deletes a pay option.

Questions:
/api/v1/collect-page/{CollectPageId}/questions (GET): Returns a list of questions for the collect page
/api/v1/collect-page/{CollectPageId}/question (POST): Creates a new question for the collect page
/api/v1/collect-page/{CollectPageId}/question/{QuestionId} (GET, PUT/POST): Gets or update a question for the collect page
/api/v1/collect-page/{CollectPageId}/question/{QuestionId} (DELETE) or /api/v1/collect-page/{CollectPageId}/question/{QuestionId}/delete (POST): Deletes a question

Question Options:
/api/v1/collect-page/{CollectPageId}/question/{QuestionId}/options (GET): Returns a list of options for a question on a collect page
/api/v1/collect-page/{CollectPageId}/question/{QuestionId}/option (POST): Creates a new option for a question on a collect page
/api/v1/collect-page/{CollectPageId}/question/{QuestionId}/option/{OptionId} (GET, PUT/POST): Gets or update an option for a question on a collect page
/api/v1/collect-page/{CollectPageId}/question/{QuestionId}/option/{OptionId} (DELETE) or /api/v1/collect-page/{CollectPageId}/question/{QuestionId}/option/{OptionId}/delete (POST): Deletes an option

Persons:
/api/v1/collect-page/{CollectPageId}/Persons (GET): Returns a list of Persons for a collect page
/api/v1/collect-page/{CollectPageId}/Person (POST): Creates a new Person for a collect page
/api/v1/collect-page/{CollectPageId}/Person/{PersonId} (GET, PUT/POST): Gets or updates an individual Person
/api/v1/collect-page/{CollectPageId}/Person/{PersonId}/reminder (POST): Sends a reminder email to the Person
/api/v1/collect-page/{CollectPageId}/Person/{PersonId} (DELETE) or /api/v1/collect-page/{CollectPageId}/Person/{PersonId}/delete (POST): Deletes a Person

Selected Pay Options:
/api/v1/collect-page/{CollectPageId}/Person/{PersonId}/pay-options (GET): Returns a list of pay options for a Person
/api/v1/collect-page/{CollectPageId}/Person/{PersonId}/pay-option (POST): Creates a new pay option for a Person
/api/v1/collect-page/{CollectPageId}/Person/{PersonId}/pay-option/{PayOptionId} (GET, PUT/POST): Gets or updates an individual pay option for a Person
/api/v1/collect-page/{CollectPageId}/Person/{PersonId}/pay-option/{PayOptionId} (DELETE) or /api/v1/collect-page/{CollectPageId}/Person/{PersonId}/pay-option/{PayOptionId}/delete (POST): Deletes a pay opion for a Person

Person Answers:
/api/v1/collect-page/{CollectPageId}/Person/{PersonId}/answers (GET): Returns a list of answers for a Person
/api/v1/collect-page/{CollectPageId}/Person/{PersonId}/answer (POST): Creates a new answer for a Person
/api/v1/collect-page/{CollectPageId}/Person/{PersonId}/answer/{AnswerId} (GET, PUT/POST): Gets or updates an individual answer for a Person
/api/v1/collect-page/{CollectPageId}/Person/{PersonId}/answer/{AnswerId} (DELETE) or /api/v1/collect-page/{CollectPageId}/Person/{PersonId}/answer/{AnswerId}/delete (POST): Deletes an answer for a Person

Currencies:
/api/v1/currencies (GET): Returns a list of supported currencies.