Discussions
REFUND Create Payment API ERROR 403
Hello,
we are trying to execute a REFUND api call but we receive ERROR 403 with following payload:
data: { code: 45, message: 'Forbidden', wlt: '3alsvxAm' } },
The cURL code of the api call is the following:
curl --location --request POST 'https://authservices.satispay.com/g_business/v1/payments'
--header 'Content-Type: application/json'
--header 'host: authservices.satispay.com'
--header 'date: Thu, 04 Jun 2020 04:43:15 +0200'
--header 'digest: SHA-256=ReGHszIuqC5LI5H2ZRiP6PohuLJJwsa7MXy+F4Y3wq8='
--header 'Authorization: Signature keyId="r7hohld1eu90ccmnf8lhvrq6pjl0b2aai5ekmqdcpltkeha4mb6fs6cau5tm76dlpq6fcqoflobg2uau40o30vdp4co21tccsk11h188ibadp5vm1g7dgm5bl145ua9j2k5pguiufuqi262sm12j8s7g1fj0rjasrh2s0al0mbnfqoh5int6ei1gsr040meav5acvmgn", algorithm="rsa-sha256", headers="(request-target) host date digest", signature="Fr0i+tEZoL+3VdLzbLyamXGKrG6P0/Vy8iEpGLIAEgWI2yWvDzDVYtYGUz/Bq7TY4hpU0+8tOE056xFV2L9r6pq5nQaC/14qK749FNBz6ugGNouwBWdELLlmkfbiS8Cr8FJ1QenowzJX4XoqyoJfe67f/JVGZcwPckwQIMZkWRIyLNsDvjIjOfhzl/9tT1Y/4XhlHYtwp79SCGDV+/Z+6zgcqVMzmCgUhmZmWX5M6uIeVCxVLQwBIeI/TGafDoEBW2mZpRF8CXqb0XIaWUeTVjd2894xqdTzMi/xrTAaHGmz/9Vg/gZ3y+fPlOvDMQz4GcSNZPHQJGxwCI/Ok+Naf2uoWNlqtZO1/vvWuyVtn/2yKapCfaz6+KEGW8SwvZ9NxuIueHC3EGpHKkfQuUAVNdTtMAvByLDQ2C/8xO0jJ4iulanAExQOvTU6bnTE2wBpQwX321eex67xMhb7COyJ3ed/hbLM2mL7nkHoVBPxmLyxU0Q6GYt05XbN2zpmLtiIHH4I1JCGkyMLu42TXCrUkxP4FOfE6PRedlF77Z2sytPWsfiI5CWsXIKqXxetTchixqFdBvbiJkRMlYxa+sNpQHVoeBKS8HYeYEd3ru5REwlI4PjRexy0aINKrC4k1X9/BnReqExMYoZttP4vD8UEnGoW+V5eRs6MHGFJ0POkKV8="'
--header 'Content-Type: application/json'
--data-raw '{
"flow": "REFUND",
"amount_unit": 700,
"currency": "EUR",
"parent_payment_uid": "bbb7e763-d4c5-4a4e-80b9-9515f99f0597"
}'
We followed the documentation provided and read the previous threads about this issue but still unable to understand why we receive such error code with code 45.
Could you please help us understand what are we doing wrong?
Code works perfectly in sandbox. Payment are created successfully in production.
Error appears when trying to refund.
Many thanks for kind attention and prompt anser