Reverse a Payment to Platform
This API will allow you to reverse a payment to platform. The original external requestId (extRequestId) from the original payment to platform request is needed to match the original transaction.
The amount field is optional, some considerations:
-
If no amount is provided, it will attempt to reverse the entire value from the original extRequestId
-
If an amount is provided, it can be up to the entire amount of the original extRequestId (paymentToPlatform)
-
However, there is also tracking of the partial amounts that have previously been reversed. The partner cannot go over the original paymentToPlatform amount that was sent in increments of reversals.
Authorization
bearerAuth Send your Spinwheel secret key as a bearer token: Authorization: Bearer <secretKey>. Keys are environment-specific.
In: header
Request Body
application/json
Amount to be transferred
1 <= value <= 100000ExtRequestId to identify the original request. One of extRequestId or requestId is required.
RequestId to identify the original request. One of extRequestId or requestId is required.
Tag to label different types of payments
Schedule timestamp for processing payment
1 <= valueResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/payments/reversePaymentToPlatform" \ -H "Content-Type: application/json" \ -d '{ "amount": 3000, "extRequestId": "12c9d6e8-c87b-415e-94e2-15367975218d", "tag": "Reverse Payment to platform", "scheduleTs": 1614714686000 }'Successful reverse payment to platform request
{ "status": { "code": 200, "desc": "success", "messages": [ { "desc": "Example description" } ] }, "data": { "origRequestId": "998ac06b-4fad-4043-aef9-96cf011bae8f", "origExtRequestId": "12c9d6e8-c87b-415e-94e2-15367975218d", "requestId": "fd97c6e8-c87b-415e-94e2-15367975218d", "amount": 3000, "payerId": "92becc07-ee08-44b3-bc7b-1ff2f98ed92a", "requestType": "ONE_TIME", "settlementAccountId": "7a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d", "tag": "Reverse Payment to platform", "scheduleTs": 1614714686000, "createdOn": 1614602485926, "updatedOn": 1614602485926 }}
