GET
/
payments
/
{id}
curl --request GET \
  --url https://api.magebank.ai/payments/{id} \
  --header 'x-api-key: <x-api-key>'
{
  "id": "payee_wDG5cavUCoK53uvFzTvkey",
  "name": "Vendor XYZ Payment",
  "type": "EXTERNAL",
  "senderagentid": "agent_eC6ZezevNsqxvoKmQrUuoU",
  "receiveragentid": "agent_k77NTwxp2Ym3JCmVsKtXQA",
  "status": "New",
  "approvalstatus": "Waiting for Sender Approval",
  "approvalrequired": true,
  "contactdetails": {
    "email": "contact@vendorxyz.com",
    "phoneNumber": "+1234567890"
  },
  "paymentdetails": {
    "method": "CRYPTO_ADDRESS",
    "amount": 6,
    "currency": "USDC"
  },
  "tags": ["vendor", "regular"],
  "createdat": "2025-04-17T10:28:18Z",
  "approvedat": null
}

Payment Details: Retrieves detailed information about a specific payment based on its ID. Converts short ID format to UUID format internally before querying the database.

Path Parameters

id
string
required

Payment ID (can be a short ID like payee_xxx)

Request Headers

x-api-key
string
required

Your API key for authentication

Response

id
string

Unique payment identifier

name
string

Name or description of the payment

type
string

Type of payment (EXTERNAL or INTERNAL)

senderagentid
string

ID of the agent sending the payment

receiveragentid
string

ID of the agent receiving the payment

status
string

Current status of the payment

approvalstatus
string

Approval status of the payment

approvalrequired
boolean

Whether this payment requires approval

paymentdetails
object
contactdetails
object
tags
array

Tags or categories for the payment

createdat
string

Timestamp when the payment was created

approvedat
string

Timestamp when the payment was approved

{
  "id": "payee_wDG5cavUCoK53uvFzTvkey",
  "name": "Vendor XYZ Payment",
  "type": "EXTERNAL",
  "senderagentid": "agent_eC6ZezevNsqxvoKmQrUuoU",
  "receiveragentid": "agent_k77NTwxp2Ym3JCmVsKtXQA",
  "status": "New",
  "approvalstatus": "Waiting for Sender Approval",
  "approvalrequired": true,
  "contactdetails": {
    "email": "contact@vendorxyz.com",
    "phoneNumber": "+1234567890"
  },
  "paymentdetails": {
    "method": "CRYPTO_ADDRESS",
    "amount": 6,
    "currency": "USDC"
  },
  "tags": ["vendor", "regular"],
  "createdat": "2025-04-17T10:28:18Z",
  "approvedat": null
}

Status Codes

Status CodeDescription
200Payment details retrieved successfully
404Not Found - Payment not found
500Internal Server Error

Payment Types: Use “EXTERNAL” for payments to recipients outside your agent network and “INTERNAL” for payments between your own agents.

Approval Flow: The approvedat field will be null if the payment has not yet been approved or declined.