API to retrieve the list of payments for a specific shop. The shop is automatically filtered based on the KeyID used in the authorisation header.

Payment pagination

Payments returned by this API are paginated with a default limit of 20 items. The has_more boolean field tells you if there are more payments than the limit used and you should use the starting_after parameters filled with the id of the last payment if you want to retrieve the next page of the list.

If you want to list all Payments for specific date you should:
1 - call the Get payment list using the parameter starting_after_timestamp and using the timestamp in milliseconds of the date you want
2 - save the last payment id returned at step 1
3 - call the Get payment list using the parameter starting_after and using the payment id you saved at the step 2
4 - save the last payment id returned at step 3
5 - repeat step 4 until you reach the last payment of the date you need

📘

starting_after and starting_after_timestamp parameters are cursors within the list of payments that is ordered by creation date from the newest and this means that payments returned with this filters are sequentially after, and not temporarily after, the id or the timestamp used.

Responses

200 Ok

  • has_more [boolean]: Are there more items in the list?
  • data [array of objects]: The matching payments
    • id [string]: Unique ID of the payment
    • type [string]: Type of payment (TO_BUSINESS or REFUND_TO_BUSINESS)
    • amount_unit [number]: Amount of the payment in cents
    • currency [string]: Currency of the payment
    • status [string]: Status of the payment (PENDING, ACCEPTED, CANCELED or AUTHORIZED)
    • status_ownership [boolean]: If true, the device making the request is responsible for the final status reached by the payment
    • expired [boolean]: If true, the payment is expired
    • metadata [object]: Additional metadata of the payment
    • sender [object]: The sender actor of the payment
      • id [string]: Unique ID of the sender
      • type [string]: Type of the actor (CONSUMER)
      • name [string]: Short name of the actor
    • receiver [object]: The receiver actor of the payment
      • id [string]: Unique ID of the receiver
      • type [string]: Type of the actor (SHOP)
    • status_owner [object]: The actor responsible of the payment final status
      • id [string]: Unique ID of the actor
      • type[string]: Type of the actor (DEVICE)
    • daily_closure [object]: The daily closure of the payment
      • id [string]: ID of the daily closure
      • date [string]: The closure date
    • insert_date [datetime]: Timestamp of payment insertion
    • expire_date [datetime]: Timestamp of payment expiration
    • external_code [string]: Order ID or payment external identifier

400 Bad request

  • code [integer]: Error code
    36 → invalid query parament status
  • message [string]: Error message

401 Unauthorized

  • code [integer]: Error code
    34 → shop not found or unauthorized
  • message [string]: Error message

403 Forbidden or invalid authorization header

  • code [integer]: Error code
    45 → unable to fulfil request
  • message [string]: Error message
Language