Create a Payment
This API will allow you to create a Payment request for a user.
Authorization
bearerAuth Send your Spinwheel secret key as a bearer token: Authorization: Bearer <secretKey>. Keys are environment-specific.
In: header
Request Body
application/json
Spinwheel userId of the user the payment request is created for.
An id generated by you, a partner, to refer back the payment request. (Needs to be unique for a given request)
Payment amount.
1 <= valuepayerId of payer from whom the payment would go through.
The ID of the settlement account to draw funds from.
useOfFundsId of funds allocation you've configured. Either of useOfFundsId or useOfFunds object is required.
Epoch timestamp value of schedule date
Type of the payment request. Only ONE_TIME is supported.
Value in
- "ONE_TIME"
Settlement speed. If this field is not set, the default configuration will be used.
Value in
- "STANDARD"
- "NEXT_DAY"
- "SAME_DAY"
This is to tag payments with specific keywords.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/payments/requests" \ -H "Content-Type: application/json" \ -d '{ "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 } ] }, "settlementSpeed": "SAME_DAY", "scheduleTs": 1636250123000 }'One time Student Loan Allocation Payment Request
{ "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 }}Get a List of Payments GET
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.
Get Single Payment Details GET
This API will allow you to get a single Payment request with a provided requestId if it exists.

