You can use the Payments API call to retrieve information for a particular payment, or for multiple payments, filtered by date, contact, or event. You can also create, edit, or delete a payment, allowing you to migrate existing payment records to your Wild Apricot database.

Wild Apricot's API is intended for use by developers with technical expertise. If you need assistance, we provide support via email or through our Developers forum.

Payments API functions

The Payments API call supports the following functions. To view the Swagger documentation, click the appropriate function below.

Specifying filter criteria

When retrieving information for multiple payments, you must include filter criteria. You can filter the results by specifying a contact or event, by specifying a start and/or end date, and by specifying a set of payment ids. You can combine multiple filter criteria to further narrow the results.

Specifying a contact or event

You can filter the payments by specifying a particular contact and/or event.

Syntax
GET [baseAPIaddress]/[version]/Accounts/[accountID]/Payments/?contactId=[contactID]&eventId=[eventID]
Example:
GET https://api.wildapricot.org/v2/Accounts/58293/Payments?contactId=725191&eventId=11769

Specifying a start or end document date

You can filter the payments by specifying a start date and/or an end date (using the DocumentDate field).

Syntax
GET [baseAPIaddress]/[version]/Accounts/[accountID]/Payments/?StartDate=[date]&EndDate=[date]

where date is the start or end date of the range (using the yyyy-mm-dd date format).

Example:
GET https://api.wildapricot.org/v2/Accounts/58293/Payments/?StartDate=2016-11-01&EndDate=2016-11-30

Specifying a set of payment IDs

You can filter the payments by specifying a set of payment IDs.

Syntax
GET [baseAPIaddress]/[version]/Accounts/[accountID]/Payments/?ids=[id1],[id2],[id3]...

where id is the unique identifier of a payment.

Example:
GET https://api.wildapricot.org/v2/Accounts/58293/Payments/?ids=25291894,25291888

Retrieving just payment IDs

You can retrieve just the payment IDs that match the filter criteria by including the idsOnly parameter. This parameter is only available when you specify v2.1 as the API version. The payment IDs will be listed by document date in descending order.

Example
GET https://api.wildapricot.org/v2/Accounts/58293/Payments?eventId=11769&idsOnly=true

Paging

Using the $skip and $top parameters, you can retrieve records in sets or pages. You use the $top parameter to specify the maximum number of records to be returned, and the $skip parameter to specify the number of records to skip. The $skip parameter is incremented each call to return the next set or page of records.

Example

You want to retrieve 50 records using an application that can only process 20 records at a time. Using the following calls, the application retrieves the first set of 20 records, then a second set of 20, and finally, the remaining 10 records.

https://api.wildapricot.org/v2/Accounts/58293/Payments?eventId=11769&$skip=0&$top=20
https://api.wildapricot.org/v2/Accounts/58293/Payments?eventId=11769&$skip=20&$top=20
https://api.wildapricot.org/v2/Accounts/58293/Payments?eventId=11769&$skip=40&$top=20

In this example, the $top specifies the maximum number of records to retrieve (20), and the $skip parameter is incremented from 0 to 20 to 40 to skip the recordsretrieved by the previous call(s).