Refund a payment

Get started

Refunding a payment as a Partner account follows the same approach as requesting a refund for a Merchant account, but uses separate endpoints. As all refunds are requested at a payment level, once you have authenticated there are no differences in requesting as a Partner account. Start by familiarising yourself with refunds, including how to request and get status updates for refunds.

Once you're familiar with the process, you can recreate the steps with some minor differences.

📘

Helpful to know

You'll need to generate a partner access token. Learn how to do this in the Partner portal here.

Partner refund requests

Create a RR. Send an HTTP POST request to the relevant endpoint + /api/v1/partners/refunds/init/ including the header Authorization: Bearer <payment_token>.

Request

curl --location --request POST 'https://uat.app.payvyne.com/api/v1/partners/refunds/init' \
--header 'Authorization: Bearer <payment_token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "payments": [
        {
            "paymentId": "1ac613c7ca3eca52",
            "amount": 2.4,
            "idempotencyId": "b7be040e-59f1-4798-98e3-7c7dc6263bf4"
        },
        {
            "paymentId": "4d6fb61dd6eb0c7b",
            "amount": 9,
            "idempotencyId": "48522dfe-acbf-4d5e-9c9b-24393900d5a9"
        },
        {
            "paymentId": "2178e53c08b1f3f5",
            "amount": 0.1,
            "idempotencyId": "e0ae2ebb-2d06-4f77-9373-fe49d9cb53a4"
        },
        {
            "paymentId": "1ac613c7ca3eca52",
            "amount": 1.00,
            "idempotencyId": "fd373d7a-46d2-47a2-a46d-256b8b4964ed"
        },
        {
            "paymentId": "1a17fe039cd34777",
            "amount": 99999.99,
            "idempotencyId": "a0cc9b57-e2a7-46dc-90bb-dd4be4372c99"
        },
        {
            "paymentId": "4de89355d8fc67b0",
            "amount": 1,
            "idempotencyId": "cb3b2025-96f8-48ad-b0b1-75aafc8f2874"
        }
    ]
}'

Using partner refund status calls

You can request a refund status update on any refund at any time by sending an HTTP GET request to the relevant base URL + /api/v1/partners/refunds/ including the headers Authorization: Bearer <payment_token>.

Request

curl --location --request GET 'https://uat.app.payvyne.com/api/v1/partners/refunds/<refundId>' \
--header 'Authorization: Bearer <payment_token>' \
--header 'Content-Type: application/json'