Payment Requests

Get a List of Payments

GET
/v1/payments/requests

This API will allow you to get list of the Payment requests created for a user with a provided userId, extRequestId or requestId. One of userId, extRequestId or requestId is required.

Authorization

bearerAuth
AuthorizationBearer <token>

Send your Spinwheel secret key as a bearer token: Authorization: Bearer <secretKey>. Keys are environment-specific.

In: header

Query Parameters

userId?string

Spinwheel userId

extRequestId?string

extRequestId passed by you in the payments request

requestId?string

Spinwheel generated requestId of the payment request.

requestType?"ONE_TIME"

Filter on requestType

Value in

  • "ONE_TIME"

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/payments/requests?userId=ac89d6e8-c87b-415e-94e2-15367975218d&extRequestId=12c9d6e8-c87b-415e-94e2-15367975218d&requestId=fd97c6e8-c87b-415e-94e2-15367975218d&requestType=ONE_TIME"
{  "status": {    "code": 200,    "desc": "success"  },  "data": [    {      "extRequestId": "12c9d6e8-c87b-415e-94e2-15367975218b",      "amount": 100,      "payerId": "12c9d6e8-c87b-415e-94e2-15367975218d",      "userId": "ac89d6e8-c87b-415e-94e2-15367975218d",      "tag": "Contribution",      "requestType": "ONE_TIME",      "useOfFunds": {        "allocation": [          {            "studentLoanId": "34a28279-b0df-4b6f-ad26-50cbef08f417",            "percentage": 100,            "liabilityType": "STUDENT_LOAN"          }        ]      },      "settlementSpeed": "SAME_DAY",      "scheduleTs": 1636250123000,      "requestId": "fd97c6e8-c87b-415e-94e2-15367975218d",      "settlementAccountId": "52c72bfb-fda2-44f1-8451-6a1d3a6a92d2",      "createdOn": 1636250123000,      "updatedOn": 1636250123000    },    {      "extRequestId": "12c9d6e8-c87b-415e-94e2-15367975218c",      "amount": 100,      "payerId": "12c9d6e8-c87b-415e-94e2-15367975218d",      "userId": "ac89d6e8-c87b-415e-94e2-15367975218d",      "tag": "Contribution",      "requestType": "ONE_TIME",      "useOfFunds": {        "allocation": [          {            "homeLoanId": "34a28279-b0df-4b6f-ad26-50cbef08f417",            "percentage": 100,            "liabilityType": "HOME_LOAN"          }        ]      },      "settlementSpeed": "SAME_DAY",      "scheduleTs": 1636250123000,      "requestId": "fd97c6e8-c87b-415e-94e2-15367975218d",      "settlementAccountId": "52c72bfb-fda2-44f1-8451-6a1d3a6a92d2",      "createdOn": 1636250123000,      "updatedOn": 1636250123000    },    {      "extRequestId": "12c9d6e8-c87b-415e-94e2-15367975218d",      "amount": 100,      "payerId": "12c9d6e8-c87b-415e-94e2-15367975218d",      "userId": "ac89d6e8-c87b-415e-94e2-15367975218d",      "tag": "Contribution",      "requestType": "ONE_TIME",      "useOfFunds": {        "allocation": [          {            "autoLoanId": "34a28279-b0df-4b6f-ad26-50cbef08f417",            "percentage": 100,            "liabilityType": "AUTO_LOAN"          }        ]      },      "settlementSpeed": "SAME_DAY",      "scheduleTs": 1636250123000,      "requestId": "fd97c6e8-c87b-415e-94e2-15367975218d",      "settlementAccountId": "52c72bfb-fda2-44f1-8451-6a1d3a6a92d2",      "createdOn": 1636250123000,      "updatedOn": 1636250123000    },    {      "extRequestId": "12c9d6e8-c87b-415e-94e2-15367975218e",      "amount": 100,      "payerId": "12c9d6e8-c87b-415e-94e2-15367975218d",      "userId": "ac89d6e8-c87b-415e-94e2-15367975218d",      "tag": "Contribution",      "requestType": "ONE_TIME",      "useOfFunds": {        "allocation": [          {            "personalLoanId": "34a28279-b0df-4b6f-ad26-50cbef08f417",            "percentage": 100,            "liabilityType": "PERSONAL_LOAN"          }        ]      },      "settlementSpeed": "SAME_DAY",      "scheduleTs": 1636250123000,      "requestId": "fd97c6e8-c87b-415e-94e2-15367975218d",      "settlementAccountId": "52c72bfb-fda2-44f1-8451-6a1d3a6a92d2",      "createdOn": 1636250123000,      "updatedOn": 1636250123000    },    {      "extRequestId": "12c9d6e8-c87b-415e-94e2-15367975218f",      "amount": 100,      "payerId": "12c9d6e8-c87b-415e-94e2-15367975218d",      "userId": "ac89d6e8-c87b-415e-94e2-15367975218d",      "tag": "Contribution",      "requestType": "ONE_TIME",      "useOfFunds": {        "allocation": [          {            "creditCardId": "34a28279-b0df-4b6f-ad26-50cbef08f417",            "percentage": 100,            "liabilityType": "CREDIT_CARD"          }        ]      },      "settlementSpeed": "SAME_DAY",      "scheduleTs": 1636250123000,      "requestId": "fd97c6e8-c87b-415e-94e2-15367975218d",      "settlementAccountId": "52c72bfb-fda2-44f1-8451-6a1d3a6a92d2",      "createdOn": 1636250123000,      "updatedOn": 1636250123000    },    {      "extRequestId": "12c9d6e8-c87b-415e-94e2-15367975218h",      "amount": 100,      "payerId": "12c9d6e8-c87b-415e-94e2-15367975218d",      "userId": "ac89d6e8-c87b-415e-94e2-15367975218d",      "tag": "Contribution",      "requestType": "ONE_TIME",      "useOfFundsId": "a437c6e8-c87b-415e-94e2-15367975218d",      "scheduleTs": 1636250123000,      "requestId": "fd97c6e8-c87b-415e-94e2-15367975218d",      "settlementAccountId": "52c72bfb-fda2-44f1-8451-6a1d3a6a92d2",      "createdOn": 1636250123000,      "updatedOn": 1636250123000    },    {      "extRequestId": "12c9d6e8-c87b-415e-94e2-15367975218c",      "amount": 100,      "payerId": "12c9d6e8-c87b-415e-94e2-15367975218d",      "userId": "ac89d6e8-c87b-415e-94e2-15367975218d",      "tag": "Contribution",      "requestType": "ONE_TIME",      "useOfFunds": {        "allocation": [          {            "bankAccountId": "34a28279-b0df-4b6f-ad26-50cbef08f417",            "percentage": 100          }        ]      },      "scheduleTs": 1636250123000,      "requestId": "fd97c6e8-c87b-415e-94e2-15367975218d",      "settlementAccountId": "52c72bfb-fda2-44f1-8451-6a1d3a6a92d2",      "createdOn": 1636250123000,      "updatedOn": 1636250123000    }  ]}