Skip to main content
PATCH
/
payments
/
{payment_id}
Update a payment
curl --request PATCH \
  --url https://prod-api.pcxpay.com/v1/payments/{payment_id} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <x-api-key>' \
  --data '
{
  "metadata": {},
  "instructions": "<string>",
  "comments": "<string>"
}
'
{
  "payment_id": "<string>",
  "amount": 123,
  "currency": "<string>",
  "user_id": "<string>",
  "org_id": "<string>",
  "beneficiary_id": "<string>",
  "transaction_id": "<string>",
  "target_amount": 123,
  "target_currency": "<string>",
  "metadata": {},
  "instructions": "<string>",
  "comments": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Headers

Authorization
string
default:NONE
required

Bearer JWT for user-facing flows (Bearer eyJraWQ...), or the literal string NONE when authenticating via API key.

Example:

"Bearer eyJraWQ..."

X-Api-Key
string
default:NONE
required

API key for server-to-server flows, or the literal string NONE when authenticating via JWT.

Example:

"pcx_abc123_xxxx"

Path Parameters

payment_id
string
required

Body

application/json
metadata
object
instructions
string | null
comments
string | null

Response

Updated payment

payment_id
string
amount
number<float>
currency
string
user_id
string
status
enum<string>
Available options:
initiated,
reviewed,
confirmed,
processing,
pending,
completed,
failed,
refunded,
rejected,
canceled
direction
enum<string>
Available options:
inbound,
outbound,
external
payment_method
enum<string>
Available options:
bank_transfer,
card,
mobile_money,
crypto,
wallet
org_id
string | null
beneficiary_id
string
transaction_id
string | null
target_amount
number<float> | null
target_currency
string | null
metadata
object
instructions
string | null
comments
string | null
created_at
string<date-time>
updated_at
string<date-time>