Skip to main content
POST
/
payments

Endpoint

POST https://api.digitzs.com/payments

Overview

Use this endpoint to refund the split portion of a payment. This reverses the split amount that was distributed to a secondary merchant account.
This endpoint only refunds the split amount, not the entire transaction. To refund the full payment, use both this endpoint and the regular refund endpoint.

Authentication

HeaderValueRequired
x-api-keyYour API keyYes
AuthorizationBearer {appToken}Yes
appIdYour application IDYes
Content-Typeapplication/jsonYes

Request Body

data.type
string
required
Must be "payments"
data.attributes.paymentType
string
required
Must be "refundSplit"
data.attributes.parentPaymentId
string
required
The payment ID of the original split transaction
data.attributes.transaction
object
required
Transaction details

Example Request

{
  "data": {
    "type": "payments",
    "attributes": {
      "paymentType": "refundSplit",
      "parentPaymentId": "pay_split_abc123",
      "transaction": {
        "amount": "100",
        "currency": "USD"
      }
    }
  }
}

Response

{
  "links": {
    "self": "https://api.digitzs.com/payments"
  },
  "data": {
    "type": "payments",
    "id": "pay_refund_split_xyz",
    "attributes": {
      "paymentType": "refundSplit",
      "transaction": {
        "code": "0",
        "message": "Success",
        "amount": "100",
        "currency": "USD"
      }
    }
  }
}

Code Examples

curl -X POST https://api.digitzs.com/payments \
  -H "x-api-key: your-api-key" \
  -H "Authorization: Bearer your-app-token" \
  -H "appId: your-app-id" \
  -H "Content-Type: application/json" \
  -d '{
    "data": {
      "type": "payments",
      "attributes": {
        "paymentType": "refundSplit",
        "parentPaymentId": "pay_split_abc123",
        "transaction": {
          "amount": "100",
          "currency": "USD"
        }
      }
    }
  }'

Important Notes

Split Only: This endpoint refunds only the split amount. To refund the entire transaction, you must also refund the primary payment separately.
Full Refund Process: For complete refunds of split payments: 1) Refund the split using this endpoint, 2) Refund the primary payment using the regular refund endpoint.

Next Steps

Refund Primary Payment

Refund the primary portion of a split payment