REST Admin API

The Givecloud API lets you do the following with the Query resource.

This is an alpha API and there are no guarantees are made regarding the implementation of the current endpoints and data models. They are subject to change at anytime without warning. That being said we will make our best effort to provide sufficient notice for breaking changes.

GET /jpanel/api/v1/query/payments.json

Retrieves a list of payments.

Parameter Name Description
ids Retrieve only payments specified by a comma-separated list of payment IDs.
status Filter payments by their status. Valid values: succeeded, pending, failed or any.
financial_status Filter payments by their financial status. Valid values: paid, pending, refunded, partially_refunded, or any.
since_id Show payments after the specified ID.
created_at_min Show payments created at or after date (format: 2014-04-25T16:15:47-0400).
created_at_max Show payments created at or before date (format: 2014-04-25T16:15:47-0400).
limit The maximum number of results to show on a page (default: 50, maximum: 250).
Sample Request
curl "https://<site>.givecloud.co/jpanel/api/v1/query/payments.json?limit=25" \
     -H 'Authorization: Bearer <api_key>'
Sample Response
{
    "payments": [
        {
            "id": 122,
            "type": "card",
            "status": "succeeded",
            "amount": 12,
            "amount_refunded": 0,
            "currency": {
                "name": "US Dollar",
                "code": "USD",
                "iso_code": "USD",
                "symbol": "$",
                "rate": 1
            },
            "paid": true,
            "captured": true,
            "captured_at": "2019-12-02T18:06:21Z",
            "created_at": "2019-12-02T18:06:21Z",
            "refunded": false,
            "reference_number": "5045254960",
            "description": "Payment for Order #1B7CE0CD72",
            "failure_code": null,
            "failure_message": null,
            "outcome": "authorized",
            "card": {
                "brand": "Visa",
                "last4": "1111",
                "exp_month": 12,
                "exp_year": 2021,
                "cvc_check": "unchecked",
                "address_line1_check": "fail",
                "address_zip_check": "fail"
            },
            "refunds": [],
            "account": {
                "id": 483,
                "account_type": {
                    "id": 1,
                    "name": "Individual",
                    "is_organization": false,
                    "is_default": false,
                    "on_web": false
                },
                "display_name": "Bob Hope",
                "title": null,
                "first_name": "Bob",
                "last_name": "Hope",
                "organization_name": null,
                "email": "bob@exampllle.com",
                "email_opt_in": false,
                "nps": null,
                "billing_address": {
                    "title": null,
                    "name": "Bob Hope",
                    "first_name": "Bob",
                    "last_name": "Hope",
                    "email": "bob@exampllle.com",
                    "address1": "123 Anywhere St",
                    "address2": null,
                    "company": null,
                    "city": "Beverly Hills",
                    "province_code": "CA",
                    "zip": "90210",
                    "country_code": "US",
                    "phone": "+155555555555",
                    "country": "United States",
                    "province": "California",
                    "street": "123 Anywhere St",
                    "ispopulated": true,
                    "isempty": false
                },
                "shipping_address": {
                    "title": null,
                    "name": "Bob Hope",
                    "first_name": "Bob",
                    "last_name": "Hope",
                    "email": "bob@exampllle.com",
                    "address1": "123 Anywhere St",
                    "address2": null,
                    "company": null,
                    "city": "Beverly Hills",
                    "province_code": "CA",
                    "zip": "90210",
                    "country_code": "US",
                    "phone": null,
                    "country": "United States",
                    "province": "California",
                    "street": "123 Anywhere St",
                    "ispopulated": true,
                    "isempty": false
                }
            },
            "orders": [{
                "id": "1B7CE0CD72",
                "shipping_price": 0,
                "subtotal_price": 12,
                "tax_price": 0,
                "total_price": 12,
                "currency": "USD",
                "payment_type": "payment_method",
                "billing_address": {
                    "title": null,
                    "name": "Bob Hope",
                    "first_name": "Bob",
                    "last_name": "Hope",
                    "email": "bob@exampllle.com",
                    "address1": "123 Anywhere St",
                    "address2": null,
                    "company": null,
                    "city": "Beverly Hills",
                    "province_code": "CA",
                    "zip": "90210",
                    "country_code": "US",
                    "phone": "+15555555555",
                    "country": "United States",
                    "province": "California",
                    "street": "123 Anywhere St",
                    "ispopulated": true,
                    "isempty": false
                },
                "shipping_address": {
                    "title": null,
                    "name": "Bob Hope",
                    "first_name": "Bob",
                    "last_name": "Hope",
                    "email": "bob@exampllle.com",
                    "address1": "123 Anywhere St",
                    "address2": null,
                    "company": null,
                    "city": "Beverly Hills",
                    "province_code": "CA",
                    "zip": "90210",
                    "country_code": "US",
                    "phone": null,
                    "country": "United States",
                    "province": "California",
                    "street": "123 Anywhere St",
                    "ispopulated": true,
                    "isempty": false
                },
                "referral_source": null,
                "comments": null,
                "line_items": [{
                    "id": 516,
                    "form_fields": [],
                    "is_locked": false,
                    "line_price": 12,
                    "name": "(COPY) Donate Today! - One-time",
                    "is_discounted": false,
                    "original_line_price": 12,
                    "original_price": 12,
                    "price": 12,
                    "quantity": 1,
                    "recurring_amount": 0,
                    "recurring_day": null,
                    "recurring_day_of_week": null,
                    "recurring_description": null,
                    "recurring_frequency": null,
                    "requires_ach": false,
                    "requires_shipping": false,
                    "sku": "D7CD3AC-COPY",
                    "total": 12,
                    "total_discount": -12,
                    "type": "product",
                    "weight": 0,
                    "product_id": 51,
                    "variant_id": 90,
                    "variant_title": "One-time",
                    "is_donation": true,
                    "recurring_frequency_short": null,
                    "discounts": [],
                    "gl_code": "GEN-A",
                    "shipping_expectation": null
                }]
            }]
        },
        {
            "id": 194,
            "type": "card",
            "status": "succeeded",
            "amount": 20,
            "amount_refunded": 0,
            "currency": {
                "name": "Canadian Dollar",
                "code": "CAD",
                "iso_code": "CAD",
                "symbol": "$",
                "rate": 1.75426
            },
            "paid": true,
            "captured": true,
            "captured_at": "2019-08-01T03:43:00Z",
            "created_at": "2019-08-01T03:43:00Z",
            "refunded": false,
            "reference_number": "PfhaGvhLbznEN2Oa0EZgfSFL",
            "description": "Payment for Recurring Payment Profile #JLDMM84D",
            "failure_code": null,
            "failure_message": null,
            "outcome": "authorized",
            "card": {
                "brand": "Visa",
                "last4": "1111",
                "exp_month": 6,
                "exp_year": 2020,
                "cvc_check": "unchecked",
                "address_line1_check": "unchecked",
                "address_zip_check": "unchecked"
            },
            "refunds": [],
            "account": {
                "id": 906,
                "account_type": {
                    "id": 1,
                    "name": "Individual",
                    "is_organization": false,
                    "is_default": true,
                    "on_web": true
                },
                "display_name": "Bob Hope",
                "title": null,
                "first_name": "Bob",
                "last_name": "Hope",
                "organization_name": null,
                "email": null,
                "email_opt_in": false,
                "nps": null,
                "billing_address": {
                    "title": null,
                    "name": "Bob Hope",
                    "first_name": "Bob",
                    "last_name": "Hope",
                    "email": null,
                    "address1": null,
                    "address2": null,
                    "company": null,
                    "city": null,
                    "province_code": null,
                    "zip": null,
                    "country_code": null,
                    "phone": null,
                    "country": null,
                    "province": null,
                    "street": "",
                    "ispopulated": true,
                    "isempty": false
                },
                "shipping_address": {
                    "title": null,
                    "name": null,
                    "first_name": null,
                    "last_name": null,
                    "email": null,
                    "address1": null,
                    "address2": null,
                    "company": null,
                    "city": null,
                    "province_code": null,
                    "zip": null,
                    "country_code": null,
                    "phone": null,
                    "country": null,
                    "province": null,
                    "street": "",
                    "ispopulated": false,
                    "isempty": true
                }
            },
            "subscriptions": [{
                "id": "JLDMM84D",
                "status": "active",
                "locked": 0,
                "start_date": "2019-07-01",
                "next_payment_date": "2019-08-01",
                "amount": 20,
                "currency": {
                    "name": "Canadian Dollar",
                    "code": "CAD",
                    "iso_code": "CAD",
                    "symbol": "$",
                    "rate": 1.75426
                },
                "billing_period": "Month",
                "billing_frequency": 12,
                "description": "Donate Today! - Monthly",
                "amount_collected": 40,
                "billing_cycle_anchor": "1",
                "gl_code": "GEN-C",
                "variant_id": 3
            }]
        }
    ]
}