Report sweeps

1. Get reporting token

Start by generating a reporting token. Make a HTTP POST request to the relevant endpoint + /api/oauth/token/ using the access token you generated. Remember to use a Reporting access token.

Request

curl --location --request POST 'https://uat.app.payvyne.com/api/oauth/token' 
--header 'Content-Type: application/x-www-form-urlencoded' 
--data-urlencode 'grant_type=client_credentials' 
--data-urlencode 'client_id=<reporting_key>'
--data-urlencode 'client_secret=<reporting_secret>’

2. Return sweeps

Send an HTTP GET request to the relevant endpoint + /api/reporting/v1/sweeps/merchant and include any required query parameters in the request.

Sweep queries can contain the following terms:

  • id
  • currency
  • amount
  • status
  • createdAt
  • settlementAccountIdentifier

Request

Parameter

Value

size

4

query

settlementAccountIdentifier = 'GBP3'

cursor

Null

curl --request GET \
     --url 'http://app.payvyne.com/api/reporting/v1/sweeps/merchant?size=4&query=settlementAccountIdentifier%20%3D%20%27GBP3%27' \
     --header 'Accept: application/json'

🚧

Be aware

The queries specified in your GET request requires URL encoding.

Response

{
    "elements": [
        {
            "id": "PAYOUT-30ef409572553489",
            "createdAt": "2021-08-18T20:20:20.361Z",
            "settlementAccountIdentifier": "GBP3",
            "settlementAccountName": "Megashop",
            "settlementAccountBalancePreSweep": "322.85",         
            "minReserveAmount": "200",          
            "amount": "122.85",        
            "destinationAccountName": "Megashop Ltd",
            "destinationAccountId": "GBP1",
            "currency": "GBP",
            "status": "COMPLETED"
        },
        {
            "id": "PAYOUT-aaba45c9c0b30611",
            "createdAt": "2021-08-19T20:20:20.261Z",
            "settlementAccountIdentifier": "GBP3",
            "settlementAccountName": "Megashop",
            "settlementAccountBalancePreSweep": "203.65",          
            "minReserveAmount": "200",          
            "amount": "3.65",
            "destinationAccountName": "Megashop Ltd",
            "destinationAccountId": "GBP1",
            "currency": "GBP",
            "status": "COMPLETED"
        },
        {
            "id": "b226f2c6a7c039b6",
            "createdAt": "2021-12-11T20:20:20.769Z",
            "settlementAccountIdentifier": "GBP3",
            "settlementAccountName": "Megashop",
            "settlementAccountBalancePreSweep": "2200.00",          
            "minReserveAmount": "200.00",          
            "amount": "2000.00",
            "destinationAccountName": "Megashop London Ltd",
            "destinationAccountId": "GBP1",
            "currency": "GBP",
            "status": "COMPLETED"
        },
        {
            "id": "9609edeb43c38414",
            "createdAt": "2021-12-12T20:20:20.529Z",
            "settlementAccountIdentifier": "GBP3",
            "settlementAccountName": "Megashop",
            "settlementAccountBalancePreSweep": "201",
            "minReserveAmount": "200",          
            "amount": "1.00",
            "destinationAccountName": "Megashop London Ltd",
            "destinationAccountId": "GBP1",
            "currency": "GBP",
            "status": "FAILED"
        }
    ],
    "nextPage": "eyJ0eXBlIjoiU1dQIiwiY3Vyc29yRGlyIjoiTkVYVCIsImNyZWF0ZWRBdCI6IjIwMjEtMTItMTJUMjA6MjA6MjAuNTI5WiIsInN3ZWVwSWQiOiI5NjA5ZWRlYjQzYzM4NDE0In0=",
    "size": 4
}

Did this page help you?