GET /payments/:id

Returns a payment registered on Invisible Collector with the provided external id. Returns a 404 Not Found if no payment was found.

curl -XGET \
  --header "Content-Type: application/json" \
  --header "Authorization: Bearer 4a415cc660e67d8f4d26d5a7f390183a86fc3a4524ded78dc2448e86c48b2739" \
  https://api.invisiblecollector.com/payments/12345
require "net/https"
require "uri"

uri = URI.parse("https://api.invisiblecollector.com/payments/12345")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer 4a415cc660e67d8f4d26d5a7f390183a86fc3a4524ded78dc2448e86c48b2739'

response = http.request(request)
// example available soon
// example available soon

This request will return, for example, the following JSON response:

{
  "number": "RG TEST/001",
  "externalId": "123455",
  "status": "FINAL",
  "date": "2016-07-01",
  "type": "RG",
  "netTotal": 25.00,
  "tax": 5.75,
  "grossTotal": 30.75,
  "currency": "EUR",
  "lines": [
    {
      "number": "FT TEST/001",
      "amount": 30.75
    }
  ]
}

Endpoint

GET https://api.invisiblecollector.com/payments/:id

Errors

This endpoint may return the following errors

HTTP Code Description
401 Unauthorized Invalid credentials were supplied
404 Not found The user doesn’t have any payment registered with that specific id.