Refund a Plan
POST/:installmentPlanNumber/refund
Refund part or all of an installment plan.
Things to know:
-
If you fully refund the plan before its first charge/capture, the plan will be completely canceled (note that
AutoCapture
would have been set tofalse
in your Initiate or Create call, so the plan wasn't immediately charged) -
If you supply a service on a monthly basis, and you or the shopper elect to stop the subscription, you can perform a partial refund with the outstanding amount as
Amount
in the request
Strategies
There are several refund strategies you can choose when refunding a plan (note that the default is FutureInstallmentsFirst
):
FutureInstallmentsFirst
: At first customer isn’t refunded any installment money that they have already paid. Instead their refund lessens the amount of future installments they will be debited for, beginning with the next installment that is due. However, if their refund exceeds the amount of money they have left to pay (all installments), only then is the refund taken out of the installment money they have already paidFutureInstallmentsLast
: Customer is refunded beginning with the installment money they have already paid. If their refund amount exceeds the amount they have already paid, their amount of future installments due gets decreased, beginning with the next installment due and then proceeding to the later onesFutureInstallmentsNotAllowed
: Customer is only refunded from installment money that they have already paid, not from any future installments that they have dueReduceFromLastInstallment
: This is the same asFutureInstallmentsFirst
, except that the refund is credited starting with the last installment first (e.g., number 6 of 6, as opposed to number 2 of 6).
Request
Path Parameters
Header Parameters
- application/json
Body
Possible values: [FutureInstallmentsFirst
, FutureInstallmentsLast
, FutureInstallmentsNotAllowed
, ReduceFromLastInstallment
]
optional merchant-specified descriptor
Responses
- 200
- 401
- 403
- 404
- 422
- 500
- 400-511
- 400-562
- 400-578
- 400-594
- 400-599
- 400-640
- 400-1041
- 400-5911
Success
- application/json
- Schema
- Example (from schema)
Schema
Summary
object
{
"RefundId": "string",
"InstallmentPlanNumber": "string",
"Currency": "string",
"NonCreditRefundAmount": 0,
"CreditRefundAmount": 0,
"Summary": {
"TotalAmount": 0,
"FailedAmount": 0,
"SucceededAmount": 0,
"PendingAmount": 0
}
}
Token is not authorized or is expired
- application/json
- Schema
- Example (from schema)
Schema
Error
object
ExtraData
object
{
"TraceId": "string",
"Error": {
"Code": "string",
"Message": "string",
"AdditionalInfo": "string",
"ExtraData": {}
}
}
- application/json
- Schema
- Example (from schema)
Schema
Error
object
ExtraData
object
{
"TraceId": "string",
"Error": {
"Code": "string",
"Message": "string",
"AdditionalInfo": "string",
"ExtraData": {}
}
}
Plan or service does not exist; for all APIs, if an invalid plan number is passed in the URL, this error will be returned
- application/json
- Schema
- Example (from schema)
Schema
Error
object
ExtraData
object
{
"TraceId": "string",
"Error": {
"Code": "string",
"Message": "string",
"AdditionalInfo": "string",
"ExtraData": {}
}
}
- application/json
- Schema
- Example (from schema)
Schema
Error
object
ExtraData
object
{
"TraceId": "string",
"Error": {
"Code": "string",
"Message": "string",
"AdditionalInfo": "string",
"ExtraData": {}
}
}
Server encountered an unexpected condition
- application/json
- Schema
- Example (from schema)
Schema
Error
object
ExtraData
object
{
"TraceId": "string",
"Error": {
"Code": "string",
"Message": "string",
"AdditionalInfo": "string",
"ExtraData": {}
}
}
InvalidAmount: Invalid amount sent, such as below your minimum amount or above your maximum amount.
- application/json
- Schema
- Example (from schema)
Schema
Error
object
ExtraData
object
{
"TraceId": "string",
"Error": {
"Code": "string",
"Message": "string",
"AdditionalInfo": "string",
"ExtraData": {}
}
}
RefundRequestedAmountExceededPlanRefundableAmount: The refund amount requested exceeded the plan's refundable amount.
- application/json
- Schema
- Example (from schema)
Schema
Error
object
ExtraData
object
{
"TraceId": "string",
"Error": {
"Code": "string",
"Message": "string",
"AdditionalInfo": "string",
"ExtraData": {}
}
}
InvalidPlanStrategy: We are sorry for the inconvenience, but this plan is not available.
- application/json
- Schema
- Example (from schema)
Schema
Error
object
ExtraData
object
{
"TraceId": "string",
"Error": {
"Code": "string",
"Message": "string",
"AdditionalInfo": "string",
"ExtraData": {}
}
}
FraudDetected: Sorry, but we were unable to process your payment. Please reach out to our customer support team at support@splitit.com.
- application/json
- Schema
- Example (from schema)
Schema
Error
object
ExtraData
object
{
"TraceId": "string",
"Error": {
"Code": "string",
"Message": "string",
"AdditionalInfo": "string",
"ExtraData": {}
}
}
General Error: Sorry. There has been an error. Please try again.
- application/json
- Schema
- Example (from schema)
Schema
Error
object
ExtraData
object
{
"TraceId": "string",
"Error": {
"Code": "string",
"Message": "string",
"AdditionalInfo": "string",
"ExtraData": {}
}
}
GtwyMerchantDataProblem: Sorry, but there has been a processing error with this merchant. Please contact our support for assistance.
- application/json
- Schema
- Example (from schema)
Schema
Error
object
ExtraData
object
{
"TraceId": "string",
"Error": {
"Code": "string",
"Message": "string",
"AdditionalInfo": "string",
"ExtraData": {}
}
}
IdempotencyHashMismatchError: Same Idempotency key with different payload identified.
- application/json
- Schema
- Example (from schema)
Schema
Error
object
ExtraData
object
{
"TraceId": "string",
"Error": {
"Code": "string",
"Message": "string",
"AdditionalInfo": "string",
"ExtraData": {}
}
}
InvalidInternalUrlSentToOms: Plan is not in the correct state to process this request.
- application/json
- Schema
- Example (from schema)
Schema
Error
object
ExtraData
object
{
"TraceId": "string",
"Error": {
"Code": "string",
"Message": "string",
"AdditionalInfo": "string",
"ExtraData": {}
}
}