Hi Team,
We raised an issue around refund failure observed during testing.
We received the following feedback from your team:
PY0009 is triggered only when the transaction you are trying to reference does not exist.
In Boku’s case, there are two live environments in production: BOKU 1 and BOKU 2. Based on our checks, the transaction you provided exists under BOKU 1.
Please make sure that you are performing the void/refund using the API keys for BOKU 1, as using the keys for a different environment (e.g., BOKU 2) will result in the transaction not being found and will trigger PY0009.
Hence, we wanted to check, how is it possible that we charge from one MID (which was successful) then refund with another MID? The only reference that we pass in refund (void request) is the “boku transaction id” hence can you please help us understand whether the analysis was correct and help us resolve this issue?
We will soon be starting our tests for PayFac model and this could become a blocker then hence the request.
During testing, the charge transaction was completed successfully. However, when we attempted to process a refund for the same transaction, the request failed and returned an error with code PY0009.
Please review the following logs and share your response or guidance on the PY0009 error encountered during the refund attempt?
Request:
2026-01-08 12:31:30,233 (mtQueueDefaultMessageListenerContainer-18) DEBUG [org.apache.http.wire] [trkId=ABF-oAWkJf5G] [trxId=1764703664267789374][msisdn=A_187d7b1509c3045d] http-outgoing-28482 >> "POST [redacted endpoint] HTTP/1.1[\r][\n]”
Response:
2026-01-08 12:31:30,503 (mtQueueDefaultMessageListenerContainer-18) DEBUG [org.apache.http.wire] [trkId=ABF-oAWkJf5G] [trxId=1764703664267789374][msisdn=A_187d7b1509c3045d] http-outgoing-28482 << “{“result”:“FAIL”,“sig”:{“timestamp”:1767875490,“nonce”:“e4e910534e2413940b73574cb0d93949b86d1c6b9a10e38cc3cf042567444129”,“signature”:“99A6F0D9723DA93E2726A673CBB765F30D4644DBB43AF43A2E472ADD315BB2C0”},“error”:{“code”:“PY0009”,“message”:“Payment does not exist.”}}[\r][\n]”
Request:
2026-01-08 12:29:09,153 (mtQueueDefaultMessageListenerContainer-8) DEBUG [org.apache.http.wire] [trkId=ABF-A43chb6M] [trxId=b4v0qmohfwc76qkudnvccpve][api=CHARGE_WITH_TOKEN][msisdn=A_187d7b1509c3045d] http-outgoing-28350 >> “POST /payby/v2/paymaya/link/b50494a6-bacc-44d1-ab48-24bc1d94fd3f/execute HTTP/1.1[\r][\n]”
2026-01-08 12:29:09,158 (mtQueueDefaultMessageListenerContainer-8) DEBUG [org.apache.http.wire] [trkId=ABF-A43chb6M] [trxId=b4v0qmohfwc76qkudnvccpve][api=CHARGE_WITH_TOKEN][msisdn=A_187d7b1509c3045d] http-outgoing-28350 >> "{“totalAmount”:{“currency”:“PHP”,“value”:“1.00”},“requestReferenceNumber”:“b4v0qmohfwc76qkudnvccpve”,“metadata”:{“pf”:{“smi”:“Boku2”,“smn”:“Boku2 PayMaya”,“mci”:“Seattle”,“mpc”:“608”,“mco”:“USA”,“mst”:“WA”}}}”
Response:
2026-01-08 12:29:10,463 (mtQueueDefaultMessageListenerContainer-8) DEBUG [org.apache.http.wire] [trkId=ABF-A43chb6M] [trxId=b4v0qmohfwc76qkudnvccpve][api=CHARGE_WITH_TOKEN][msisdn=A_187d7b1509c3045d] http-outgoing-28350 << “{“result”:“SUCCESS”,“data”:{“approvalCode”:“003247”,“receiptNumber”:“600812198547”,“receipt”:{“receiptNo”:“600812198547”,“approvalCode”:“003247”,“approval_code”:“003247”,“batchNo”:“20260108”,“transactionId”:“dc008b54-e61”},“id”:“46c09769-50aa-4860-a46c-73422846b1be”,“status”:“PAYMENT_SUCCESS”,“requestReferenceNumber”:“b4v0qmohfwc76qkudnvccpve”,“canVoid”:true,“metadata”:{“pf”:{“smn”:“Boku2 PayMaya”,“mpc”:“608”,“mci”:“Seattle”,“mco”:“USA”,“mst”:“WA”,“smi”:“Boku2”}},“isPaid”:true,“createdAt”:“2026-01-08T12:29:09.421Z”,“updatedAt”:“2026-01-08T12:29:10.239Z”,“canCapture”:false,“currency”:“PHP”,“fundSource”:{“type”:“card”,“details”:{“issuer”:“SmartPay”,“scheme”:“master-card”,“last4”:“4986”,“first6”:“542482”,“profileId”:”************“,“masked”:“542482******4986”},“description”:”**** **** **** 4986",“id”:“jh5BLwrthEQf2qOoUaXMleKQ7hwghYNlcR97fr2kvK7vi4PeVIypGsSNAOwB9u9qUuUqscc6xtt7qQlCcakuzLdeIVs6T9eOwwd082mMx4PwAjXNvletN4vS3Dy04If4rZBWYxZWeVJeTRixqPQyu6BCydUZpgNxRr33Ac”},“canRefund”:true,“amount”:“1”},“sig”:{“timestamp”:1767875350,“nonce”:“bc0b8469fe2cc98ddf00c6dadbae3f78fa1be2e718fc8076eb4a0bd04ac265f4”,“signature”:“148BE08AEC9C52776A7DCD1B705E124BAE7FD5A22E25C6140F495E1C4813608F”}}[\r][\n]”
cc: @renzoatos fyi