hosted_payment_gateways

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 hosted_payment_gateways
POST
Create a new hosted_payment_gateway
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:hosted_payment_gateways": [...]
  },
  "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/hosted_payment_gateway">
  ...
  </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: hosted_payment_gateway

Description

A hosted payment gateway is a checkout payment method which involves the customer being redirected to a third party payment service hosted page such as PayPal or Amazon. From there, customers login and use payment mechanisms configured within that service. Not every hosted payment gateway supports subscriptions.

To create a hosted payment gateway, POST to the hosted_payment_gateways link relationship of a store to configure your gateway credentials. Then, to enable this hosted payment gateway for your store, POST to the payment_method_set_hosted_payment_gateways link relationship of the payment method set you want to assign this hosted payment gateway to.

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 hosted_payment_gateway
PATCH
Update a hosted_payment_gateway (send only the properties you want to modify)
PUT
Replace a hosted_payment_gateway (send the entire representation)
DELETE
Delete a hosted_payment_gateway
HEAD
Get just the header response
OPTIONS
Get a response explaining which HTTP methods are supported

Properties

Property Description Type Constraints
description Description of this payment gateway String 100 characters or less, will default to the gateway name.
type Valid hosted payment gateway type. String Required.
account_id Your payment gateway account id. To view the specific description of this field for the given payment gateway, see payment_gateways property helper id_description field. String Optional. 500 characters or less.
account_key Your payment gateway account key. To view the specific description of this field for the given payment gateway, see payment_gateways property helper key_description field. String Optional. 1000 characters or less.
third_party_key Your payment gateway third party key. To view the specific description of this field for the given payment gateway, see payment_gateways property helper third_party_key_description field. String Optional. 500 characters or less.
config_3d_secure Configuration settings for 3D Secure. String Optional. Either all_cards, maestro_only, all_cards_require_valid_response, maestro_only_require_valid_response.
additional_fields Additional configuration details specific to each payment gateway. String Optional. 1000 characters or less.
test_account_id Your test payment gateway account id. To view the specific description of this field for the given payment gateway, see payment_gateways property helper id_description field. String Optional. 500 characters or less.
test_account_key Your test payment gateway account key. To view the specific description of this field for the given payment gateway, see payment_gateways property helper key_description field. String Optional. 1000 characters or less.
test_third_party_key Your test payment gateway third party key. To view the specific description of this field for the given payment gateway, see payment_gateways property helper third_party_key_description field. String Optional. 500 characters or less.
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/hosted_payment_gateways/390",
            "title": "Amazon"
        },
        "fx:store": {
            "href": "https://api-sandbox.foxycart.com/stores/8",
            "title": "This Store"
        },
        "fx:payment_method_sets": {
            "href": "https://api-sandbox.foxycart.com/stores/8/payment_method_sets",
            "title": "Payment Method Sets for this store"
        }
    },
    "description": "Amazon",
    "type": "amazon_mws",
    "use_auth_only": false,
    "account_id": "",
    "account_key": "",
    "third_party_key": "",
    "config_3d_secure": "",
    "additional_fields": "",
    "test_account_id": "",
    "test_account_key": "",
    "test_third_party_key": "",
    "date_created": "2015-05-26T17:49:56-0700",
    "date_modified": "2015-05-26T17:49:56-0700"
}
<?xml version="1.0" encoding="UTF-8"?>
<resource href="https://api-sandbox.foxycart.com/hosted_payment_gateways/390" rel="https://api.foxycart.com/rels/hosted_payment_gateway">
  <link rel="self" href="https://api-sandbox.foxycart.com/hosted_payment_gateways/390" title="Amazon"/>
  <link rel="https://api.foxycart.com/rels/store" href="https://api-sandbox.foxycart.com/stores/8" title="This Store"/>
  <link rel="https://api.foxycart.com/rels/payment_method_sets" href="https://api-sandbox.foxycart.com/stores/8/payment_method_sets" title="Payment Method Sets for this store"/>
  <description>Amazon</description>
  <type>amazon_mws</type>
  <use_auth_only>false</use_auth_only>
  <account_id></account_id>
  <account_key></account_key>
  <third_party_key></third_party_key>
  <config_3d_secure></config_3d_secure>
  <additional_fields></additional_fields>
  <test_account_id></test_account_id>
  <test_account_key></test_account_key>
  <test_third_party_key></test_third_party_key>
  <date_created>2015-05-26T17:49:56-0700</date_created>
  <date_modified>2015-05-26T17:49:56-0700</date_modified>
</resource>
{
    "class": [
        "hosted_payment_gateway"
    ],
    "properties": {
        "description": "Amazon",
        "type": "amazon_mws",
        "use_auth_only": false,
        "account_id": "",
        "account_key": "",
        "third_party_key": "",
        "config_3d_secure": "",
        "additional_fields": "",
        "test_account_id": "",
        "test_account_key": "",
        "test_third_party_key": "",
        "date_created": "2015-05-26T17:49:56-0700",
        "date_modified": "2015-05-26T17:49:56-0700"
    },
    "links": [
        {
            "rel": [
                "self"
            ],
            "href": "https://api-sandbox.foxycart.com/hosted_payment_gateways/390"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/store"
            ],
            "href": "https://api-sandbox.foxycart.com/stores/8"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/payment_method_sets"
            ],
            "href": "https://api-sandbox.foxycart.com/stores/8/payment_method_sets"
        }
    ]
}

Zoomable Resources

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