Refund Checkout
POST https://sandbox-checkout.payjustnow.io/v2/refund
The OpenAPI specification for this checkout operation can be found here.
note
You can only refund a checkout that is in PAID, PAID_PENDING_CALLBACK or PARTIALLY_REFUNDED status.
This operation is synchronous.
Here is an example of a successful PayJustNow checkout refund request and response:
POST /v2/refund HTTP/1.1X-Signature: rcjCSyAnGu0s6bqhdaHUAN+5sP5GDKYqvHXnlEnFaUc=Content-Type: application/jsonX-Merchant-Account-ID: 86User-Agent: PostmanRuntime/7.32.3Accept: */*Postman-Token: 48d43654-ad5e-4ffe-8b38-86d33ca91446Host: sandbox-checkout.payjustnow.ioAccept-Encoding: gzip, deflate, brConnection: keep-aliveContent-Length: 231 { "requestId": "RF18407", "checkoutToken": "v2.86.2d94a623-c079-4779-bb6c-103f41cd3a71", "merchantRefundReference": "RF18407", "refundAmountCents": 40000, "refundDescription": "Please refund this order."} HTTP/1.1 200 OKDate: Mon, 31 Jul 2023 12:04:35 GMTContent-Type: application/jsonContent-Length: 132Connection: keep-alivex-amzn-RequestId: 822f9839-2668-440f-834e-4c4f12f9b6a0x-amz-apigw-id: I7Z1EE97joEFQxQ=X-Amzn-Trace-Id: Root=1-64c7a353-62f933067dad0ba012002325 { "refundedAmountCents":40000, "refundStatus":"SUCCESS", "refundStatusAt":"2023-07-30T17:36:13.503178Z", "refundStatusDescription":"OK"}tip
The requestId value in the request payload is for idempotence, this guarantees you will always get the same checkout refund response back for the same requestId sent.
Idempotent responses will contain idempotent-replay: true in the response headers.
We strongly recommend using this key to prevent unintentional refunds from being processed.