returnRefund
Use the SDK for application integration. This read-only reference covers Commerce, Customer Auth, Membership and Events.
All HTTP operationsPublic integration credentials: sk01_ with write scope under the admin-sk-only policy; PAT and Customer JWT are not supported. Omit pgPaymentId only for an original full-credit Order whose frozen provider_payable is zero. Ordinary and mixed Orders require the original capture identity, including a mixed Order remainder with zero provider refund amount. Explicit blank IDs are invalid; either pgPaymentId or paymentKey on an original full-credit Order conflicts. Managed refund authority, durable uncertainty/recovery and same-key replay remain provider/domain-owned. Success is the bounded terminal return/transaction receipt with optional notification warning; non-2xx retains legacy extra fields.
serverSecretKeyAuthorizationBearer <token>Public integration credential: opaque sk01_ secret API key only; PAT and Customer JWT are not supported by this scheme. Requires tenant binding and the read or write scope named by the operation.
X-Idempotency-Key?stringOptional retry identity. Preserve exact body and identity for the same operation; absence does not imply safe automatic retry.
1 <= lengthapplication/json- body
orderNumber*stringOrder number (required)
1 <= lengthreason?stringReturn reason (optional)
"change_of_mind""defective""wrong_delivery""damaged""size_too_large""size_too_small""color""style""not_as_described""wrong_item""unknown""other"reasonDetail?stringDetailed reason text (optional)
1 <= lengthreturnItems*array<>Array of products to return (required)
1 <= items <= 100refundAmount*integerRefund amount (required, min 1)
0 < value <= 9007199254740991returnShippingFee?integerReturn shipping fee charged to the customer (ADR 0005 §Gap 1)
0 <= value <= 9007199254740991initialShippingRefundAmount?integerInitial order shipping amount refunded to the customer
0 <= value <= 9007199254740991initialShippingRefundOverrideNote?stringOperator audit note required when overriding policy suggestion
1 <= lengthpgPaymentId?stringPG payment ID. Omit only when the original Order frozen provider_payable is zero (full-credit Order). Mixed Orders require the original capture identity even when this refund restores credit only. Explicit blank values are invalid.
1 <= lengthpaymentKey?stringProvider payment key for verified refund
1 <= lengthrefundReceiptUrl?stringRefund receipt URL (optional)
1 <= lengthActual shaped success body
application/json- response
return*transaction*refundSeq*integer1 <= value <= 9007199254740991notificationWarning?stringExamples may be generated from schemas; they are illustrative, not recorded successful API calls. Example snippets may omit required authentication headers.
curl -X POST 'https://api.01.software/api/returns/return-refund' \ -H 'Content-Type: application/json' \ -d '{ "orderNumber": "string", "returnItems": [ { "orderItem": "string", "quantity": 1 } ], "refundAmount": 1}'{ "return": { "id": "string", "status": "completed", "refundAmount": 0, "returnShippingFee": 0, "initialShippingRefundAmount": 0, "completedAt": "stringstringstringstring" }, "transaction": { "id": "string", "type": "refund", "kind": "refund", "status": "refunded", "amount": 0, "providerEventId": "string" }, "refundSeq": 1, "notificationWarning": "string"}