payments

Description

This link relationship returns a collection of resources. You can easily paginate through this collection using the hypermedia links provided and the link relationships of first, prev, next, and last. Scroll down to view a representation of a single resource embedded within this collection.

Interact with this resource

To interact with this resource and see it in the context of the API, you can utilise Postman or your Terminal/Console to perform requests. If you have a Foxy store, you can also use the API browser in the admin to interact with resources connected to your store.

Actions

GET
View a list of payments
HEAD
Get just the header response
OPTIONS
Get a response explaining which HTTP methods are supported

Example Representation

{
  "_links": {
    "curies": [
      {
        "name": "fx",
        "href": "https://api.foxycart.com/rels/{rel}",
        "templated": true
      }
    ],
    "self": {
      "href": "...",
      "title": "This Collection"
    },
    "first": {
      "href": "...?offset=0",
      "title": "First Page of this Collection"
    },
    "prev": {
      "href": "...?offset=0",
      "title": "Previous Page of this Collection"
    },
    "next": {
      "href": "...?offset=0",
      "title": "Next Page of this Collection"
    },
    "last": {
      "href": "...?offset=0",
      "title": "Last Page of this Collection"
    }
  },
  "_embedded": {
    "fx:payments": [...]
  },
  "total_items": "5",
  "returned_items": 5,
  "limit": 20,
  "offset": 0
}
<?xml version="1.0" encoding="UTF-8"?>
<resource href="...">
  <link rel="self" href="..." title="This Collection"/>
  <link rel="first" href="...?offset=0" title="First Page of this Collection"/>
  <link rel="prev" href="...?offset=0" title="Previous Page of this Collection"/>
  <link rel="next" href="...?offset=0" title="Next Page of this Collection"/>
  <link rel="last" href="...?offset=0" title="Last Page of this Collection"/>
  <resource href="..." rel="https://api.foxycart.com/rels/payment">
  ...
  </resource>
  <total_items>5</total_items>
  <returned_items>5</returned_items>
  <limit>20</limit>
  <offset>0</offset>
</resource>
{
    "properties": {
        "total_items": "5",
        "returned_items": 5,
        "limit": 20,
        "offset": 0
    },
    "entities": [...],
    "links": [
        {
            "rel": [
                "self"
            ],
            "href": "..."
        },
        {
            "rel": [
                "first"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "prev"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "next"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "last"
            ],
            "href": "...?offset=0"
        }
    ],
    "actions": [
    ]
}

Embedded Resource: payment

Description

The historical record of payment applied to a given transaction which includes the payment gateway response, purchase order, third party id and/or masked payment card information.

Interact with this resource

To interact with this resource and see it in the context of the API, you can utilise Postman or your Terminal/Console to perform requests. If you have a Foxy store, you can also use the API browser in the admin to interact with resources connected to your store.

Actions

GET
View a payment
HEAD
Get just the header response
OPTIONS
Get a response explaining which HTTP methods are supported

Properties

Property Description Type Constraints
type The payment type for this payment. Values include plastic (for credit/debit cards), purchase_order, paypal, amazon_mws, hosted, ogone, and paypal_ec String Read only
gateway_type The payment gateway type for this payment. This should correspond to a value in hosted_payment_gateways or payment_gateways. String Read Only
processor_response The processor response string from the payment gateway. This will include their transaction or reference number. String Read only
processor_response_details If supported by the payment gateway integration, this will include additional information from the payment gateway's response. String Read only
purchase_order The PO value entered by the customer during checkout (for purchase order payment types). String Read only
cc_number_masked The masked credit card number used for this payment (for plastic payment types). String Read only
cc_type The type of credit card such as Visa or MasterCard (for plastic payment types). String Read only
cc_exp_month The credit card expiration month (for plastic payment types). String Read only
cc_exp_year The credit card expiration year (for plastic payment types). String Read only
fraud_protection_score If this payment gateway set is configured with a fraud protection system, the fraud score for this payment will be listed here. Decimal Read only
paypal_payer_id The payer id for this payment (for Paypal payment types). String Read only
third_party_id The identifer for the third party provider for this payment (for hosted payment types). String Read only
amount The total amount of this payment. Decimal Read only
date_created The date this resource was created. Date Read only
date_modified The date this resource was last modified. Date Read only

Example Representation

{
    "_links": {
        "curies": [
            {
                "name": "fx",
                "href": "https://api.foxycart.com/rels/{rel}",
                "templated": true
            }
        ],
        "self": {
            "href": "https://api-sandbox.foxycart.com/payments/18198",
            "title": "This Payment"
        },
        "fx:store": {
            "href": "https://api-sandbox.foxycart.com/stores/66",
            "title": "This Store"
        },
        "fx:transaction": {
            "href": "https://api-sandbox.foxycart.com/transactions/3845522",
            "title": "This Transaction"
        }
    },
    "type": "plastic",
    "gateway_type": "authorize",
    "processor_response": "Authorize.net Transaction ID:2233990980",
    "processor_response_details": "",
    "purchase_order": "",
    "cc_number_masked": "xxxxxxxxxxxx1111",
    "cc_type": "Visa",
    "cc_exp_month": "01",
    "cc_exp_year": "2017",
    "fraud_protection_score": 0,
    "paypal_payer_id": "",
    "third_party_id": "",
    "amount": 20.15,
    "date_created": "2015-05-21T14:22:09-0700",
    "date_modified": "2015-05-21T14:22:09-0700"
}
<?xml version="1.0" encoding="UTF-8"?>
<resource href="https://api-sandbox.foxycart.com/payments/18198" rel="https://api.foxycart.com/rels/payment">
  <link rel="self" href="https://api-sandbox.foxycart.com/payments/18198" title="This Payment"/>
  <link rel="https://api.foxycart.com/rels/store" href="https://api-sandbox.foxycart.com/stores/66" title="This Store"/>
  <link rel="https://api.foxycart.com/rels/transaction" href="https://api-sandbox.foxycart.com/transactions/3845522" title="This Transaction"/>
  <type>plastic</type>
  <gateway_type>authorize</gateway_type>
  <processor_response>Authorize.net Transaction ID:2233990980</processor_response>
  <processor_response_details></processor_response_details>
  <purchase_order></purchase_order>
  <cc_number_masked>xxxxxxxxxxxx1111</cc_number_masked>
  <cc_type>Visa</cc_type>
  <cc_exp_month>01</cc_exp_month>
  <cc_exp_year>2017</cc_exp_year>
  <fraud_protection_score>0</fraud_protection_score>
  <paypal_payer_id></paypal_payer_id>
  <third_party_id></third_party_id>
  <amount>20.15</amount>
  <date_created>2015-05-21T14:22:09-0700</date_created>
  <date_modified>2015-05-21T14:22:09-0700</date_modified>
</resource>
{
    "class": [
        "payment"
    ],
    "properties": {
        "type": "plastic",
        "gateway_type": "authorize",
        "processor_response": "Authorize.net Transaction ID:2233990980",
        "processor_response_details": "",
        "purchase_order": "",
        "cc_number_masked": "xxxxxxxxxxxx1111",
        "cc_type": "Visa",
        "cc_exp_month": "01",
        "cc_exp_year": "2017",
        "fraud_protection_score": 0,
        "paypal_payer_id": "",
        "third_party_id": "",
        "amount": 20.15,
        "date_created": "2015-05-21T14:22:09-0700",
        "date_modified": "2015-05-21T14:22:09-0700"
    },
    "links": [
        {
            "rel": [
                "self"
            ],
            "href": "https://api-sandbox.foxycart.com/payments/18198"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/store"
            ],
            "href": "https://api-sandbox.foxycart.com/stores/66"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/transaction"
            ],
            "href": "https://api-sandbox.foxycart.com/transactions/3845522"
        }
    ]
}

Zoomable Resources

This resource has no linked resources which can be "zoomed" in on, filtered and embedded within this resource.