Dokumentation Entwickler API

Payment Ressource

Aktualisiert am 16.03.2017

Payment Ressource

Attention

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

Payment categories

Payment category English German Comment
cod Cash on delivery Nachnahme
custom Custom Eigene Zahlart
bank_deposit Bank deposit Vorkasse
invoice Invoice Rechnung
money_order Money order Lastschrift
cc Credit card Kreditkarte
paypal PayPal PayPal
sofortueberweisung sofortüberweisung.de Sofortüberweisung.de created_at <= 2013-12-06
directebanking sofortüberweisung.de Sofortüberweisung.de created_at > 2013-12-06
qpay Q-Pay Q-Pay
data_trans DataTrans DataTrans
vc_paymill_bridge PAYMILL Bridge (payment form) PAYMILL Bridge (Zahlungsformular)
bit_pay Bitpay Bitpay








Get Payments

GET /api/payments.json

  • GET /api/payments.json will return the first 150 (default limit) payments. You can increase the limit to a maximum of 250 payments.
  • GET /api/orders/:order_id/payments.json is also possible.


Example

Payment 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/payments.json

Payment Ressource

Status: 200 OK

[
{
"payment": {
"amount": "8152.3",
"captured_at": null,
"category": "cod",
"comment": "",
"created_at": "2013-09-15T08:21:01+02:00",
"currency": null,
"id": 100,
"is_captured": false,
"order_code": "213-884-358",
"order_id": 1000,
"trans_id": null,
"captureable": false
}
},
{
"payment": {
"amount": "10.0",
"captured_at": null,
"category": "money_transfer",
"comment": "A comment ...",
"created_at": "2013-10-15T11:22:02+02:00",
"currency": null,
"id": 101,
"is_captured": false,
"order_code": "214-148-020",
"order_id": 1001,
"trans_id": null,
"captureable": false
}
},
{
"payment": {
"amount": "17.4",
"captured_at": null,
"category": "direct_debit",
"comment": "",
"created_at": "2013-10-15T11:22:23+02:00",
"currency": null,
"id": 102,
"is_captured": false,
"order_code": "214-148-020",
"order_id": 1001,
"trans_id": null,
"captureable": false
}
}
]

Payment Ressource

Get Payment

GET /api/payments/:payment_id.json

  • GET /api/payments/:payment_id.json will return the specified payment.
  • GET /api/orders/:order_id/payments/:payment_id.json is also possible.


Example

Payment 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/payments/:payment_id.json

Payment Ressource

Status: 200 OK

{
"payment": {
"amount": "8152.3",
"captured_at": null,
"category": "cod",
"comment": "",
"created_at": "2013-09-15T08:21:01+02:00",
"currency": null,
"id": 100,
"is_captured": false,
"order_code": "213-884-358",
"order_id": 1000,
"trans_id": null,
"captureable": false
}
}

Payment Ressource

Get Payments Count

GET /api/payments/count.json

  • GET /api/payments/count.json will return the payments count.


Example

Payment 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/payments/count.json

Payment Ressource

Status: 200 OK

{
"count": 98
}