curl --request PUT \
--url https://api.sandbox.paypathiq.com/v1/clients/{clientCode}/payment-requests/{externalPaymentRequestId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"externalCustomerId": "CUS_EXAMPLE",
"items": [
{
"amount": {
"amount": "125.50",
"currency": "EUR"
},
"externalReceivableId": "REC_EXAMPLE"
}
]
}
'Create a hosted payment request
Requires payment_requests:write, a scope separate from intake and financial reporting. Creates a fixed-amount, fixed-allocation hosted payment request for one Customer and returns a secret link to the payment page on the Client’s verified payment domain, where card details are entered with the Client’s payment provider; raw card data never passes through this API. Each amount must equal the Receivable’s exact current working balance, the Customer must be liable for every Receivable, and the Client must have an active payment domain and a single active merchant account. The request is rejected before any payment attempt exists when amounts are stale, a Receivable is not payable, the source feed is stale, current policy or a hold prevents a payment request, a payment is already in progress, or the merchant is not configured. Creating a request replaces the Customer’s earlier unpaid hosted request. The payer confirms a contact detail held for the Customer before paying. The attempt starts only when the payer submits the hosted page, which re-checks the same balances. Only the provider’s verified confirmation marks the request paid and reduces working balances; returning from the hosted page, an unknown outcome or a repeated event never does. Loan connections request loan Receivables and service-charge connections request service-charge demands; the payer page labels each item by its financial type. Creating a request, and each later status change, is announced as payment_request.created or payment_request.updated in the change feed. The link expires after one hour. Exact retries return 200 with a fresh link while the request is open; conflicting reuse returns 409 payment_request_conflict.
curl --request PUT \
--url https://api.sandbox.paypathiq.com/v1/clients/{clientCode}/payment-requests/{externalPaymentRequestId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"externalCustomerId": "CUS_EXAMPLE",
"items": [
{
"amount": {
"amount": "125.50",
"currency": "EUR"
},
"externalReceivableId": "REC_EXAMPLE"
}
]
}
'Authorizations
Integration-owned environment-specific API key. Never paste a production key into documentation tools.
Path Parameters
Stable non-sensitive Client code authorized by the Integration grant.
^[A-Za-z0-9_-]{1,128}$Caller-assigned, opaque identifier of this hosted payment request. Reusing it with the identical body is a safe retry; reusing it with a different body conflicts.
^[A-Za-z0-9_-]{1,128}$Body
One uncompressed resource representation, limited to 256 KiB.
The paying Customer. The Customer must be liable for every listed Receivable.
^[A-Za-z0-9_-]{1,128}$The Receivables and amounts the hosted payment page may collect. Each Receivable may appear once.
1 - 25 elementsShow child attributes
Show child attributes
Response
Identical retry of the accepted request.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$When the most recent payment link stops working. Null once the request is no longer open.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Caller-assigned, opaque identifier for this Customer's source-system record. It is not a PayPathIQ ID, member number, loan or account number, or contact detail. Keep it stable when Customer details change.
^[A-Za-z0-9_-]{1,128}$^[A-Za-z0-9_-]{1,128}$Show child attributes
Show child attributes
Hosted payment page on the Client's verified payment domain. It is a secret: send it only to the paying Customer. Returned by create and by an exact retry while the request is open; null on reads.
Increases each time the request's status changes. It matches the revision in change-feed events.
1 <= x <= 9007199254740991paid is set only after the payment provider's verified confirmation. Returning from the hosted page never changes this status.
open, payment_in_progress, under_review, paid, expired, replaced, cancelled Show child attributes
Show child attributes