Payments

Sandbox only: settle a pending payment

Marks a pending payment paid or declined, so payment.confirmed or payment.failed and checkout.session.completed follow without a browser. Do not also finish the payment on the hosted page. The provider never sees this outcome; the real handlers apply it, so the real events follow. 404 resource_not_available outside the sandbox; 409 state_conflict when the object is past this step.

post/api/v1/test-helpers/payments/{id}/outcome

Request

  • Base URL
    https://merchant.zahlo.eu
  • Auth
    API key in header x-api-key

Path parameters

idstring required

The resource identifier returned by the merchant API.

Request body

outcome'succeeded' | 'failed' required

Response

Successful response

idstring required
paymentIdstring required

The payment id (GET /api/v1/payments/{id}).

status'pending' | 'confirmed' | 'failed' | 'cancelled' | 'expired' required
method'card' | 'sepa_direct_debit' | 'klarna' | 'ideal' | 'bancontact' | 'apple_pay' | 'google_pay' | 'paypal' | 'unknown'
referencestring nullable
metadataobject

Up to 50 key-value pairs; keys up to 40 characters, values strings up to 500 characters.

createdAtstring date-time required
occurredAtstring date-time required

Example response

{
  "amount": {
    "currency": "EUR"
  },
  "fee": {
    "currency": "EUR"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.