Skip to main content
GET
/
payments
/
{id}
{
  "errors": [
    {
      "status": "404",
      "title": "Not Found",
      "detail": "Payment not found"
    }
  ]
}

Endpoint

GET https://api.digitzs.com/payments/{id}

Overview

Use this endpoint to retrieve complete details of a specific payment transaction, including transaction status, amounts, fees, and any associated split information.

Authentication

HeaderValueRequired
x-api-keyYour API keyYes
AuthorizationBearer {appToken}Yes
appIdYour application IDYes

Path Parameters

id
string
required
The unique payment transaction ID

Response

Success Response (200 OK)

data
object
Container for payment data

Example Response - Card Payment

{
  "links": {
    "self": "https://api.digitzs.com/payments/pay_abc123xyz"
  },
  "data": {
    "type": "payments",
    "id": "pay_abc123xyz",
    "attributes": {
      "paymentType": "card",
      "merchantId": "merchant_123456",
      "createdAt": "2024-01-15T10:30:00Z",
      "status": "completed",
      "transaction": {
        "code": "0",
        "message": "Success",
        "amount": "2500",
        "currency": "USD",
        "invoice": "INV-2024-001",
        "authCode": "A11111",
        "avsResult": "Y",
        "gross": "2500",
        "net": "2399",
        "grossMinusNet": "101",
        "fee": "30",
        "rate": "2.90"
      }
    }
  }
}

Example Response - Split Payment

{
  "links": {
    "self": "https://api.digitzs.com/payments/pay_split_abc123"
  },
  "data": {
    "type": "payments",
    "id": "pay_split_abc123",
    "attributes": {
      "paymentType": "card",
      "merchantId": "merchant_primary_123",
      "status": "completed",
      "transaction": {
        "amount": "500",
        "gross": "500",
        "net": "365",
        "invoice": "INV-2024-002"
      },
      "splits": [
        {
          "merchantId": "merchant_platform_456",
          "amount": "100",
          "status": "completed"
        }
      ]
    }
  }
}

Example Response - ACH Payment

{
  "data": {
    "type": "payments",
    "id": "pay_ach_xyz789",
    "attributes": {
      "paymentType": "ACH",
      "merchantId": "merchant_123456",
      "status": "pending",
      "transaction": {
        "code": "0",
        "message": "Pending",
        "amount": "3635",
        "currency": "USD",
        "invoice": "INV-ACH-001"
      },
      "bank": {
        "accountType": "checking",
        "last4": "7890"
      }
    }
  }
}

Code Examples

curl -X GET https://api.digitzs.com/payments/pay_abc123xyz \
  -H "x-api-key: your-api-key" \
  -H "Authorization: Bearer your-app-token" \
  -H "appId: your-app-id"

Payment Status Values

StatusDescription
pendingPayment is being processed (common for ACH)
completedPayment successfully processed and settled
failedPayment failed or was declined
refundedPayment has been refunded
voidedPayment was voided (same-day cancellation)
partial_refundPayment has been partially refunded

Error Responses

{
  "errors": [
    {
      "status": "404",
      "title": "Not Found",
      "detail": "Payment not found"
    }
  ]
}

Use Cases

Use this endpoint to verify transaction details match your records and reconcile payments with your accounting system.
Retrieve payment details when customers inquire about their transactions or report issues.
Check payment status and amount before processing refunds to ensure accuracy.
Monitor distribution of split payments across multiple merchant accounts.

Best Practices

  1. Cache Appropriately: Cache payment details but refresh for status updates
  2. Handle ACH Delays: ACH payments remain “pending” for 3-5 business days
  3. Monitor Split Details: For split payments, verify amounts distributed correctly
  4. Store Payment IDs: Always save payment IDs for future reference and support
  5. Use Webhooks: Consider implementing webhooks for real-time status updates instead of polling

Next Steps

Get Payment Status

Check only the status of a payment (lighter endpoint)

List Payments

Retrieve multiple payments for a merchant