Developer

Partner Docs

Merchant Docs

Getting Started with Refunds

Refunds are currently available in Australia only, with plans to expand to UK and EU regions.

Whether you're implementing Mandate Refunds using PayTo or Account to Account Refunds via NPP, this guide covers both refund methods available in Australia, including:

  1. Prerequisites and Setup: Get your account and credentials ready
  2. Choose Your Refund Method: Understand mandated vs account to account refunds
  3. Process Your First Refund: Make your first refund API call
  4. Authorize Refunds: Understand how refunds are authorized
  5. Monitor Refund Status: Track refund progress and handle webhooks
  6. Error Handling: Implement robust error handling
  7. Go Live: Deploy to production with confidence

Step 1: Prerequisites and Setup

What You'll Need

Before processing refunds, ensure you have:

  • Banked merchant account with refund capabilities enabled - Create account here
  • API credentials - Your API key and secret (authentication guide)
  • Original payment in "sent" state - You can only refund successfully processed payments
  • Refund method setup - Either mandate token or eligible Float account (see Step 2)

API Request Headers

All refund API requests require these headers:

json
{
  "Authorization": "Bearer <OAuth_short_lived_scoped_token>",
  "Content-Type": "application/json",
  "Idempotency-Key": "unique-request-uuid"
}

Idempotency keys prevent duplicate refund operations. Use unique values for each request.

Step 2: Choose Your Refund Method

Banked supports two refund methods, each suited for different merchant account types:

Best for: Business or company accounts that support PayTo enabled bank accounts. To find out if your account is eligible for mandate refunds please contact support@banked.com

  • Uses NPP payment rails for real-time refunds
  • Requires pre-established refund mandate (set up by Banked Support)
  • Works with any eligible merchant account type
  • Instant refund processing via a preconfigured customisable mandate
  • Setup is fast, simple and customisable

Refund mandates are created during merchant onboarding and can only be created or modified by authorized Banked personnel. Contact Banked Support to set up or modify your refund mandate.

Step 3: Process Your First Refund

All refunds use the same endpoint: POST /v3/refunds

Depending on your refund method, you'll need to provide different parameters in the request body.

This section details the process for initiating a refund using a mandate token.

Use when: You have a PayTo enabled business account

Requires: Active refund mandate token (provided by Banked Support)

Use the POST /v3/refunds endpoint to initiate the refund.

Initiate Refund Request:

bash
curl --location --request POST 'https://api.banked.com/v3/refunds' \
--header 'Authorization: Bearer <OAuth_short_lived_scoped_token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: unique-refund-id-123' \
--data-raw '{
  "amount": 1000,
  "original_payin_information": {
    "id": "82a649c5-af14-474a-997a-b25b0d3f45be"
  },
  "processing_method": {
    "method_type": "MANDATE",
    "mandate": {
      "token": "a6017842-1a01-4cc1-9d5e-d66ef0094685"
    }
  }
}'

Key parameters for mandate refunds:

  • processing_method.method_type: Set to "MANDATE"
  • processing_method.mandate.token: Your pre-established refund mandate token

Example Response (Success - 201 Created):

json
{
  "amount": 10,
  "created_at": "2025-05-22T10:38:49.162980987Z",
  "currency": "AUD",
  "debtor_account": {
    "account_type": "BANKED_BANK_ACCOUNT_ENTITY",
    "bank_account_id": "06a1cb4b-f038-4d4d-b3f9-2114e31125a2"
  },
  "mandate": {
    "id": "3f80b430-4127-46f9-a86f-3ce18a02a53d"
  },
  "expiration": "2025-06-21T10:38:49.162981594Z",
  "id": "4690e5d4-5fcb-49e1-ad90-396dc48587c5",
  "original_payin_information": {
    "amount": 10,
    "id": "82a649c5-af14-474a-997a-b25b0d3f45be"
  },
  "status_details": {
    "status": "PENDING"
  },
  "updated_at": "2025-05-22T10:38:49.246322209Z"
}

Partial Refunds

Both methods support partial refunds. Simply specify a lower amount than the original payment:

Mandate Refund Example:

json
POST /v3/refunds
{
  "amount": 5, // Partial refund amount
  "original_payin_information": {
    "id": "82a649c5-af14-474a-997a-b25b0d3f45be"
  },
  "processing_method": {
    "method_type": "MANDATE",
    "mandate": {
      "token": "a6017842-1a01-4cc1-9d5e-d66ef0094685"
    }
  }
}

You can process multiple partial refunds until the total equals the original payment amount.

Step 4: Authorizing Refunds

For mandate refunds, the authorization happens during the initial mandate setup process. Banked will send a mandate creation request to the bank where the merchant's settlement account is held. The merchant will then have up to five days for the relevant signatories to authorise the refund mandate. Once authorised, the mandate becomes active and can be used to process mandate refunds.

Once the mandate is established, individual refunds do not require additional authorization - they are processed automatically based on the pre-authorized mandate terms.

Step 5: Monitor Refund Status

You can check the refund status at any time using the refund ID from your initial response:

bash
curl --location --request GET 'https://api.banked.com/v3/refunds/{refund_id}' \
--header 'Authorization: Bearer <OAuth_short_lived_scoped_token>'

Key Refund States

Track your refund through these key states:

  • PENDING: Refund request created, awaiting processing
  • SENT: Refund successfully processed and sent to customer
  • FAILED: Refund failed - check error details for reason

Initial Confirmation: Upon successful initiation of the refund request, you will receive a confirmation via the API response. The status_details.status field will initially be set to PENDING.

See `Refund States`

Testing With MockBank

To test various refund scenarios, you can use the Banked sandbox environment. Here are some example account numbers and PayID aliases to simulate different outcomes, you must use these when creating and completing the initial payment:

Refund StatusAccount NumberPayID Aliasresult
sent0505101AAPP101@sandbox.comauto settle
pending0505102AAPP102@sandbox.comstuck in pending (under investigation)
failed0505105AAPP105@sandbox.cominsufficient funds

Set Up Webhook Notifications (Recommended)

Set up webhooks to receive real-time refund status updates:

Key webhook events:

  • refund_sent: Refund successfully processed and sent to customer
  • refund_failed: Refund processing failed
  • refund_pending: Refund request created, awaiting processing

Pro tip: Set up webhook monitoring before processing production refunds to ensure you receive real-time status updates.

Webhook Configuration

Complete guide to setting up and handling webhooks

Handle Refund Status Updates

Configure your systems to handle different refund outcomes:

Successful Refunds (SENT):

  • Update your internal systems to reflect completed refund
  • Send confirmation notification to customer
  • Update order/transaction status

Failed Refunds (FAILED):

  • Review error details in the refund response
  • Determine if retry is appropriate
  • Consider alternative refund methods
  • Notify customer of the issue

Pending Refunds (PENDING):

  • Receive real-time async updates on refund payment status via webhooks
  • In the unlikely event that payments remain in a 'pending' status, Banked will raise an internal support ticket to request an updated status from the relevant NPP Participant or Connected Institution

Refund Expiration

Important: Refunds expire after 30 days if not processed. Monitor pending refunds and follow up if necessary.

All refunds include an expiration timestamp in the response. Use this to track and manage pending refunds that may need attention.

Step 6: Error Handling

Implement robust error handling for common refund scenarios

See `Refund Errors`

Step 7: Go Live

Pre-Launch Checklist

  • [ ] Confirm refund capabilities enabled on your merchant account
  • [ ] Verify mandate setup (for mandate refunds) or Float account eligibility (for A2A)
  • [ ] Set up webhook endpoints for refund notifications
  • [ ] Test refund flow in sandbox environment
  • [ ] Implement proper error handling for all refund scenarios
  • [ ] Set up monitoring for refund success rates
  • [ ] Test partial refund scenarios

Production Testing: Always test refunds with small amounts in production before full deployment.

Next Steps

Now that you've completed your first refund integration, explore these resources:

© 2025 Banked Ltd.

Dark Theme
PrivacyTerms