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.

Sandbox Example

You can interact with this resource and run actions against the sandbox API via our HAL Brower.

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.