Dokumentation Entwickler API

PaymentMethod Ressource

Aktualisiert am 16.03.2017

PaymentMethod Ressource

Attention

PaymentMethod resources are read-only by default. Please contact us if you need write permissions.

Get Payment Methods

GET /api/payment_methods.json

  • GET /api/payment_methods.json will return the first 150 (default limit) payment methods. You can increase the limit to a maximum of 250 payment methods. See the Filter Payment Methods endpoint for more info.

PaymentMethod Ressource

$ curl -s \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-u APP_API_KEY:APP_API_PASSWORD \
-X GET \
http://SHOP_SUBDOMAIN.versacommerce.de/api/payment_methods.json

PaymentMethod Ressource

Status: 200 OK

[
{
"payment_method": {
"active": true,
"cost": "2.5",
"description": "Der DHL - Bote nimmt den Betrag bei Auslieferung entgegen.",
"gateway": "0",
"id": 100,
"name": "cod",
"registered_customer_only": false,
title": "Nachnahme
}
},
{
"payment_method": {
"active": true,
"cost": "0.0",
"description": "",
"gateway": "paypal",
"id": 101,
"name": "paypal",
"registered_customer_only": false,
title": "PayPal
}
},
{
"payment_method": {
"active": true,
"cost": "0.0",
"description": "",
"gateway": "stripe",
"id": 102,
"name": "cc",
"registered_customer_only": false,
title": "Kreditkarte
}
}
]

PaymentMethod Ressource

Get Payment Method

GET /api/payment_methods/:payment_method_id.json

  • GET /api/payment_methods/:payment_method_id.json will return the specified payment method.


Example

PaymentMethod Ressource

$ curl -s \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-u APP_API_KEY:APP_API_PASSWORD \
-X GET \
http://SHOP_SUBDOMAIN.versacommerce.de/api/payment_methods/:payment_method_id.json

PaymentMethod Ressource

Status: 200 OK

{
"payment_method": {
"active": true,
"cost": "0.0",
"description": "",
"gateway": "paypal",
"id": 101,
"name": "paypal",
"registered_customer_only": false,
title": "PayPal
}
}

PaymentMethod Ressource

Get Payment Methods Count

GET /api/payment_methods/count.json

  • GET /api/payment_methods/count.json will return the payment methods count.


Example

PaymentMethod Ressource

$ curl -s \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-u APP_API_KEY:APP_API_PASSWORD \
-X GET \
http://SHOP_SUBDOMAIN.versacommerce.de/api/payment_methods/count.json

PaymentMethod Ressource

Status: 200 OK

{
"count": 3
}

PaymentMethod Ressource

Filter Payment Methods

GET /api/payment_methods.json?filter_name1=filter_value1&filter_name2=filter_value2

  • GET /api/payment_methods.json?filter_name_1=filter_value_1&filter_name_2=filter_value_2 will return a filtered list of products. See the Get Payment Methods endpoint for more info about the output.

Available Filters and Options

Filter-/Optionname Description Type
limit The amount of results, defaults to 150, maximum are 250 Integer
offset The amount of results to omit Integer
active Filter by active Boolean
name Filter by name String
registered_customer_only Filter by registered_customer_only Boolean
id_min Filter payment methods by the minimum id Integer
id_max Filter payment methods by the maximum id Integer
cost_min Filter payment methods by the minimum price BigDecimal
cost_max Filter payment methods by the maximum price BigDecimal
  • GET /api/payment_methods.json?active=true&cost_max=0.00 will return all products and variants (not nested). See the Get Payment Methods endpoint for more info about the output.


Example


PaymentMethod Ressource



$ curl -s \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-u APP_API_KEY:APP_API_PASSWORD \
-X GET \
http://SHOP_SUBDOMAIN.versacommerce.de/api/payment_methods.json?active=true&cost_max=0.00

PaymentMethod Ressource

Status: 200 OK

[
{
"payment_method": {
"active": true,
"cost": "0.0",
"description": "",
"gateway": "paypal",
"id": 101,
"name": "paypal",
"registered_customer_only": false,
title": "PayPal
}
},
{
"payment_method": {
"active": true,
"cost": "0.0",
"description": "",
"gateway": "stripe",
"id": 102,
"name": "cc",
"registered_customer_only": false,
title": "Kreditkarte
}
}
]