Skip to main content
PATCH
/
collect
/
payment_requests
/
{id}
curl --request PATCH \
  --url https://api.momentco.io/collect/payment_requests/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "external_reference": "V-134",
  "description": "Updated Payment Request"
}
'
{
"id": "pr_6phg74i4jG9wbzZbFDUQB",
"type": "link",
"status": "active",
"amount": 10000,
"currency": "ZAR",
"external_reference": "V-134",
"description": "Updated Payment Request",
"expires_at": "2025-06-17T10:30:00Z",
"link": {
"checkout_session_id": "chk_G9wbzZbFDUQBFAE",
"url": "https://links.momentpay.io/G9wbzZbFDUQBFAE"
},
"created_at": "2025-06-16T10:30:00Z",
"updated_at": "2025-06-16T10:30:00Z"
}

Authorizations

Authorization
string
header
required

Authentication using Bearer tokens. Include your API key in the Authorization header.

Key Types:

  • Test Keys: sk_test_* for development and testing
  • Live Keys: sk_* for production environments
  • Public Keys: pk_test_* or pk_* for client-side operations

📩 Need access? Contact Support to request your API keys.

Usage:

Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc

Headers

Idempotency-Key
string<uuid>
required

A unique key to prevent duplicate operations. Use the same key for retries to ensure idempotent behavior.

Best Practices:

  • Use UUIDs or other cryptographically unique identifiers
  • Maintain keys for at least 24 hours for retry scenarios
  • Use different keys for different operations
  • Monitor Idempotent-Replayed header for cache hits
Required string length: 1 - 255

Path Parameters

id
string
required

Unique identifier for the Payment Request.

Example:

"pr_6phg74i4jG9wbzZbFDUQB"

Body

application/json

Request payload for updating an existing Payment Request. Only Payment Requests that haven't been paid can be updated.

external_reference
string

External reference for reconciliation or tracking purposes. Must be unique within your merchant account.

Maximum string length: 255
Example:

"INV-2024-001"

description
string

Human-readable description of what the payment is for

Maximum string length: 500
Example:

"Product purchase"

expires_at
string<date-time>

ISO 8601 timestamp indicating when the Payment Request expires.

Defaults (if not provided):

  • Link (type=link or omitted): 24 hours from created_at
  • Push (type=push): 2 minutes from created_at

Must be in the future when creating or updating.

Example:

"2025-06-17T10:30:00Z"

metadata
object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. NEW Limitations:

  • Maximum 20 keys
  • Key names must be strings (max 40 characters)
  • Values must be strings (max 500 characters)
Example:
{
"customer_id": "cust_123456",
"order_id": "ord_789012"
}

Response

Payment Request updated successfully

A Payment Request represents a request for payment that can be shared via a link or sent to a banking app for authorization and Payment.

id
string
required

Unique identifier for the Payment Request.

Example:

"pr_6phg74i4jG9wbzZbFDUQB"

type
enum<string>
default:link
required

Delivery mode of the payment request.

Available options:
link,
push
status
enum<string>
required

Current status of the Payment Request.

  • Link: active, paid, expired
  • Push: active, paid, expired, failed
Available options:
active,
paid,
expired,
failed
Example:

"active"

amount
integer
required

The amount to be charged in the smallest currency unit. For example, 20.00 ZAR is represented as 2000 cents. Learn more about minor units.

Example:

1000

currency
string
required

The ISO 4217 currency code for the payment.

Example:

"ZAR"

created_at
string<date-time>
required

ISO 8601 timestamp when the resource was created

Example:

"2025-06-16T10:30:00Z"

updated_at
string<date-time>
required

ISO 8601 timestamp when the resource was last updated

Example:

"2025-06-16T10:30:00Z"

payment_id
string

Associated payment ID when the request has been paid.

Example:

"p_xyz789abc123def456"

external_reference
string

External reference for reconciliation or tracking purposes. Must be unique within your merchant account.

Maximum string length: 255
Example:

"INV-2024-001"

expires_at
string<date-time>

ISO 8601 timestamp indicating when the Payment Request expires.

Defaults (if not provided):

  • Link (type=link or omitted): 24 hours from created_at
  • Push (type=push): 2 minutes from created_at

Must be in the future when creating or updating.

Example:

"2025-06-17T10:30:00Z"

description
string

Human-readable description of what the payment is for

Maximum string length: 500
Example:

"Product purchase"

Details for link-based payment requests.

push
object

Details for push (bank) payment requests. Uses a provider-specific sub-object. Beta — only Capitec is supported.

metadata
object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. NEW Limitations:

  • Maximum 20 keys
  • Key names must be strings (max 40 characters)
  • Values must be strings (max 500 characters)
Example:
{
"customer_id": "cust_123456",
"order_id": "ord_789012"
}