Palbase Commerce & Promotions · API
/commerce/returns/{return_id}/completeComplete RMA return and issue payment/wallet refund
Complete a return: the buyer is given back what the return asks, and the return is refunded only with the money given. An order of a store with a payment account is given back through its payment split — to the card and the wallet as they paid, or to the wallet when the return's refund_destination is wallet — the seller, the platform's commission and the tax withheld each giving back their share of it; an order of a store with none is given back from the order's payment. When payments does not make the refund the answer is 409 with payments' own code, and the return stays as it was. A refund the provider failed is 409 refund_failed: complete the return again. When payments cannot tell how a refund ended (409 refund_in_progress, 409 refund_pending, 409 approval_pending — an approval of the store's split cut short and not made whole yet —, or 502 provider_unavailable when the provider did not answer it) the money may have been given, and the answer says so in payments' own words, with the payment's id: the return is kept for its completion, and is not turned down. A return asked to the buyer's wallet, in a project whose wallet is of money and may not be filled from a marketplace payment, is given back the way the order was paid, and its refund_destination says so. An order paid outside the platform — on delivery, by a bank transfer, on credit — is given back outside it: the body says so with refunded_outside: true, and without it the answer is 409 refund_outside_required. A card order whose payment never went through, marked paid by hand, is given back the same way. A return that was turned down answers 409 return_closed; one already refunded answers as it is. A return whose line has fewer units left to give back than it asks for answers 409 return_quantity_exceeded, before any money is asked for. A return another call is completing at the moment answers 409 return_in_progress: ask again. A wallet credit for an order paid outside the platform is the project's to give: this route gives it, the store's own does not.
Called by your server, with the project's secret key.
Path
return_idstring · requiredPath parameter return_id.curl -X POST "https://<your-ref>.palbase.studio/commerce/returns/<return_id>/complete" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{}'Responses
200Complete RMA return and issue payment/wallet refund
defaultStandard Palbase JSON error envelope (`error` and `error_description`).
Operation CompleteReturn of commerce's contract.