Mediloop
DocsAPIsProcurement APIPayments
Procurement API

Payments

Track payment state and settlement references for procurement transactions without exposing sensitive payment credentials.

created

Payment created

authorized

Authorized

captured

Funds captured

settled

Funds settled

completed

Complete

Payment lifecycle

Procurement payment records describe payment state and reconciliation references. Sensitive payment credentials remain with the configured payment provider and are never exposed through the Procurement API.

Payment status

StatusMeaningCan transition to
createdPayment record createdauthorized, failed
authorizedPayment authorizedcaptured, cancelled
capturedFunds capturedsettled, refunded
settledFunds settledcompleted, refunded
completedFinal staterefunded
failedPayment failed

Settlement references

FieldPurpose
payment_idMediloop payment identifier
provider_referenceUnderlying provider reference
invoice_idAssociated procurement invoice
purchase_order_idAssociated order
settled_atSettlement timestamp

Reconciliation

Payment

Provider state and captured amount.

Invoice

Amount due and invoice reference.

Reconciled

Commercial transaction matched.

Failures & exceptions

ConditionRecommended handling
authorization_failedSurface failure without changing procurement order history
capture_failedAllow retry according to payment policy
amount_mismatchFlag invoice/payment reconciliation issue
refund_pendingTrack asynchronously until final provider state

Example request

cURLJavaScriptPython
curl "https://api.mediloop.com/v1/procurement/payments/pay_42" \
  -H "Authorization: Bearer $MEDILOOP_API_KEY" \
  -H "X-Tenant-Id: $TENANT_ID"
Get payment status
Response200 OK
{
 "id":"pay_42", "status":"settled", "amount":{"amount":208.26,"currency":"EUR"},
 "invoice_id":"inv_91", "provider_reference":"pi_..."
}