Payment Resource

Content

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


Payment Categories

Payment category English German
cod Cash on delivery Bezahlung bei Lieferung
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
directebanking sofortüberweisung.de Sofortüberweisung.de
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:

$ curl -s \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-u APP_API_KEY:APP_API_PASSWORD \
-X GET \
https://shop_subdomain.versacommerce.de/api/payments.json
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
    }
  }
]

Get Payments Count

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:
$ curl -s \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-u APP_API_KEY:APP_API_PASSWORD \
-X GET \
https://shop_subdomain.versacommerce.de/api/payments/:payment_id.json
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
  }
}
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.