Skip to Content
Docs
Collaborations

Refund a collaboration

POST/collaborations/{collaboration_id}/refund

Resolves a collaboration by refunding the underlying charge for the collaboration amount.

Call it on an open collaboration. The refund is processed asynchronously, so the collaboration in the response may not show its new status yet. A webhook is sent when the collaboration is resolved.

Headers

AuthorizationstringRequired
HTTP Basic auth: your API key as the password, with an empty username. See Authentication.
idempotency-keystring

A unique key, such as a UUID, that makes a POST or DELETE request safe to retry. Pay.com keeps each key for 24 hours, separately for each workspace.

  • A retry with the same key, endpoint and body gets the first request's stored status and body, without running the request again.
  • If the first request is still being processed, a retry gets 409 idempotency_error (request_in_progress).
  • The same key on another endpoint, or with another body, gets 400 idempotency_error (invalid_parameters).
  • GET, PUT and PATCH requests ignore the key.

The response repeats the key in its Idempotency-Key header.

Path parameters

collaboration_idstringRequired

Unique identifier for the collaboration.

Returns

Returns the collaboration object.

idstringRequired

Unique identifier for the collaboration.

resourcestringRequired

String representing the object's type.

amountintegerRequired

Collaboration amount, in the smallest currency unit.

amount_human_readablestringRequired

Collaboration amount in human-readable format.

currencystringRequired

Three-letter ISO currency code, in lowercase.

statusstringRequired

Status of the collaboration. One of open, resolved, escalated, or ignored.

One of open, resolved, escalated or ignored.

createdstring

Time at which the object was created, in ISO 8601 format.

test_modeboolean

Whether the collaboration was created in the sandbox.

Show 5 more attributesShow fewer attributes
actionable_bystring

Time by which action must be taken on the collaboration, in ISO 8601 format. Omitted when the collaboration has no deadline.

chargestring

Unique identifier for the charge associated with this collaboration.

sourcestring

Source of the collaboration. One of ethoca, cdrn, or mc_collaboration.

One of ethoca, cdrn or mc_collaboration.

settlement_accountstring

Unique identifier for the settlement account the charge was booked to. Present only when the merchant uses settlement accounts.

settlement_account_detailsobject

Details of the settlement account and legal entity the transaction is booked to. Present only when the object is linked to a settlement account or legal entity.

Show 5 child attributesHide child attributes
processorstring

The processor of the settlement account.

currencystring

Three-letter ISO currency code of the settlement account, in lowercase. Omitted for settlement accounts without a currency.

namestring

Name of the settlement account.

entitystring

Unique identifier for the legal entity, if applicable.

entity_detailsobject

Details of the legal entity, if applicable.

Show 2 child attributesHide child attributes
legal_namestring

Legal name of the entity.

countrystring

Two-letter ISO country code of the entity's billing address.

Errors

400
Invalid request parameters.
401
The API key or access token is missing, unknown or no longer works (invalid_key, invalid_token, legacy_keys_ended, legacy_keys_off or permission_denied).
403
The request was refused: the API key may not make it (for example resource_not_allowed, key_disabled, network_not_allowed, pci_required or merchant_required), or this resource isn't enabled for your account (permission_denied). code says why.
404
Collaboration not found.
409
Another request with the same idempotency-key is still being processed (request_in_progress). Wait, then retry with the same key.
500
Internal server error.
503
Service unavailable. Retry after the number of seconds in Retry-After, or after a few seconds when there's none.
Was this page helpful?