Payments for Account

Payments for Account

This endpoint responds with a collection of payment-related operations where the given account was either the sender or receiver.

This endpoint can also be used in streaming mode so it is possible to use it to listen for new payments to or from an account as they get made in the Hashcash network. If called in streaming mode Aurora will start at the earliest known payment unless a cursor is set. In that case it will start from the cursor. You can also set cursor value to now to only stream payments created since your request time.

The operations that can be returned in by this endpoint are:

  • create_account
  • payment
  • path_payment
  • account_merge

Request:-

GET /accounts/{id}/payments{?cursor,limit,order}

Arguments

Name Notes Description Example
id required, string The account id of the account used to constrain results. GCEZWKCA5VLDNRLN3RPRJMRZOX3Z6G5CHCGSNFHEYVXM3XOJMDS674JZ
?cursor optional, default null A payment paging token specifying from where to begin results. When streaming this can be set to now to stream object created since your request time. 8589934592
?limit optional, number, default 10 Specifies the count of records at most to return. 200
?order optional, string, default asc Specifies order of returned results. asc means older payments first, desc mean newer payments first. desc

Response

This endpoint responds with a list of payments operations that are part of a given transaction. See operation resource for more information about operations (and payment operations).

Example Streaming Event

{

"_links" : {

"effects" : {

"href" : "/operations/77309415424/effects/{?cursor,limit,order}",

"templated" : true

},

"precedes" : {

"href" : "/operations?cursor=77309415424&order=asc"

},

"self" : {

"href" : "/operations/77309415424"

},

"succeeds" : {

"href" : "/operations?cursor=77309415424&order=desc"

},

"transactions" : {

"href" : "/transactions/77309415424"

},

"account" : "GBIA4FH6TV64KSPDAJCNUQSM7PFL4ILGUVJDPCLUOPJ7ONMKBBVUQHRO",

"funder" : "GCEZWKCA5VLDNRLN3RPRJMRZOX3Z6G5CHCGSNFHEYVXM3XOJMDS674JZ",

"id" : 77309415424,

"paging_token" : "77309415424",

"starting_balance" : 1e+14,

"type_i" : 0,

"type" : "create_account"

}

curl "https://network.paybito.com/accounts/GB55ZCH6WXZLJRUP3J36NHZSMIPNW24LZNGAOOLMFTJTIRZCCSUTY7XW/payments?limit=25&order=desc"

{

"_embedded" : {

"records" : [

{

"_links" : {

"self" : {

"href" : "/operations/48095043784705"

},

"transaction" : {

"href" : "/transactions/d5dcd0f6a7a98a98721e944fd1eb05420ac7a2be408bfbb3187ad953b40ffff5"

},

"precedes" : {

"href" : "/effects?order=asc\u0026cursor=48095043784705",

"templated" : true

},

"succeeds" : {

"href" : "/effects?order=desc\u0026cursor=48095043784705",

"templated" : true

}

},

"id" : 48095043784705,

"paging_token" : "48095043784705",

"type_i" : 1,

"type" : "payment",

"source_account" : "GC5GGY6HZHBLIQWM6XKCT4ELWKJHWV37FIGD5PTJQCO7TBMZ6A6NQIMO",

"transaction_hash" : "d5dcd0f6a7a98a98721e944fd1eb05420ac7a2be408bfbb3187ad953b40ffff5",

"asset" : {

"asset_type" : "credit_alphanum12"

"asset_code" : "BTCUSD"

"asset_issuer" : "GC5GGY6HZHBLIQWM6XKCT4ELWKJHWV37FIGD5PTJQCO7TBMZ6A6NQIMO",

"from" : "GC5GGY6HZHBLIQWM6XKCT4ELWKJHWV37FIGD5PTJQCO7TBMZ6A6NQIMO",

"to" : "GB55ZCH6WXZLJRUP3J36NHZSMIPNW24LZNGAOOLMFTJTIRZCCSUTY7XW",

"amount" : "1000.0000000"

}

]

},

"_links" : {

"next" : {

"href" : "/accounts/GB55ZCH6WXZLJRUP3J36NHZSMIPNW24LZNGAOOLMFTJTIRZCCSUTY7XW/payments?cursor=47184510717953\u0026limit=25\u0026order=desc",

"templated" : true

},

"self" : {

"href" : "/accounts/GB55ZCH6WXZLJRUP3J36NHZSMIPNW24LZNGAOOLMFTJTIRZCCSUTY7XW/payments?cursor=\u0026limit=25\u0026order=desc"

}

}

}

+
Chat Now
Welcome to HashCash Support