v1

latestOpenAPI 3.0.02026-07-2459256884.4 KB
Payment Requests

Create a Payment

This API will allow you to create a Payment request for a user.

post/v1/payments/requests

Request body

userIdstring required

Spinwheel userId of the user you're posting the recurringTransaction towards.

extRequestIdstring required

An id generated by you, a partner, to refer back the payment request. (Needs to be unique for a given request)

amountnumber required

Recurring transaction amount.

payerIdstring required

payerId of payer from whom the payment would go through.

useOfFundsIdstring

useOfFundsId of funds allocation you've configured. Either of useOfFundsId or useOfFunds object is required.

scheduleTsnumber

Epoch timestamp value of schedule date

requestType'ONE_TIME' | 'RECURRING' required

Whether the payment request is one-time or recurring.

settlementSpeed'STANDARD' | 'NEXT_DAY' | 'SAME_DAY'

Settlement speed. If this field is not set, the default configuration will be used.

tagstring

This is to tag payments with specific keywords.

Example request

{
  "userId": "f1bba401-451a-42f0-bb4e-417359d02db7",
  "extRequestId": "fa5e8b72-a89d-431f-8db5-1e1d45eb6ecc",
  "amount": 500,
  "payerId": "52c72bfb-fda2-44f1-8451-6a1d3a6a92d2",
  "useOfFundsId": "89b40fb3-edc3-4f5f-893c-3bda78717111",
  "useOfFunds": {
    "allocation": [
      {
        "homeLoanId": "435ed671-2800-4a7f-8e72-21aa7e65faf1",
        "percentage": 50,
        "liabilityType": "HOME_LOAN"
      }
    ]
  },
  "scheduleTs": 1665682828,
  "schedule": {
    "startDate": "2022-01-01T00:00:00.000Z",
    "endDate": "2022-02-02T00:00:00.000Z",
    "dayOfTheMonth": 5
  },
  "requestType": "ONE_TIME",
  "settlementSpeed": "SAME_DAY",
  "tag": "Tag1"
}

Response

Successful response

Example response

{
  "status": {
    "code": 200,
    "desc": "success",
    "messages": [
      {
        "desc": "Example description"
      }
    ]
  },
  "data": {
    "requestId": "435ed671-28ee-4000-8e72-21aa7e65faf1",
    "userId": "f1bba401-451a-42f0-bb4e-417359d02db7",
    "extRequestId": "fa5e8b72-a89d-431f-8db5-1e1d45eb6ecc",
    "amount": 500,
    "payerId": "52c72bfb-fda2-44f1-8451-6a1d3a6a92d2",
    "useOfFundsId": "89b40fb3-edc3-4f5f-893c-3bda78717111",
    "useOfFunds": {
      "allocation": [
        {
          "homeLoanId": "435ed671-2800-4a7f-8e72-21aa7e65faf1",
          "percentage": 50,
          "liabilityType": "HOME_LOAN"
        }
      ]
    },
    "scheduleTs": 1665682828,
    "schedule": {
      "startDate": "2022-01-01T00:00:00.000Z",
      "endDate": "2022-02-02T00:00:00.000Z",
      "dayOfTheMonth": 5
    },
    "requestType": "ONE_TIME",
    "settlementSpeed": "SAME_DAY",
    "goalId": "53908eeb-9d98-49d9-aa3c-aa670c8e5bdc",
    "contributedBy": "EMPLOYEE",
    "tag": "Tag1",
    "createdOn": 1614602485926,
    "updatedOn": 1614602485926
  }
}