PersonalBusinessEnterprise
    In a rush? Schedule an Appointment
    Fetching local time...
    Anytime CapitalforBusiness
    Pricing

    Get started

    • Overview
    • Quickstart
    • Test mode
    • Guides & recipes
    • Switch from Stripe
    • Import from Shopify
    • Import from WooCommerce
    • Import from Square
    • Import a CSV file
    • Stripe API mapping
    • Pricing
    • Support
    • FAQ

    Payments

    • Checkout & website
    • Guide: Next.js checkout
    • In person (QR)
    • Payment methods
    • Stablecoin checkout
    • Guide: take stablecoins
    • Fraud rules & 3D Secure
    • Dispute evidence
    • International customers
    • Guide: safe refunds
    • Bank transfers on invoices

    Billing

    • Subscription discounts
    • Guide: sell subscriptions
    • Usage billing
    • Guide: report usage

    Money movement

    • Payout options
    • Guide: reconcile payouts
    • Accounting sync
    • Revenue analytics

    Developers

    • Authentication
    • Errors & retries
    • Pagination
    • Idempotency
    • Rate limits
    • Webhooks
    • Verify webhooks
    • Node SDK (preview)
    • CLI (preview)
    • Postman collection

    AI

    • AI agents hub
    • Safe AI agents
    • Custom agents
    • Prompt library

    Integrations

    • Website builders
    • Shopify
    • Shopify orders by invoice
    • WooCommerce
    • Zapier
    • Slack, Discord and Teams

    Reference

    • Payments
    • Refunds
    • Disputes
    • Payment links
    • Invoices
    • Customers
    • Products
    • Subscriptions & plans
    • Discount codes
    • Meters & usage events
    • Payouts & balance
    • Webhook endpoints
    • Events
    • Test helpers
    • OpenAPI spec
    • Error codes
    • Changelog
    • Glossary

    For AI tools

    • llms-full.txt
    • MCP server
    • openapi.json
    Docs menu · Refunds

    Get started

    • Overview
    • Quickstart
    • Test mode
    • Guides & recipes
    • Switch from Stripe
    • Import from Shopify
    • Import from WooCommerce
    • Import from Square
    • Import a CSV file
    • Stripe API mapping
    • Pricing
    • Support
    • FAQ

    Payments

    • Checkout & website
    • Guide: Next.js checkout
    • In person (QR)
    • Payment methods
    • Stablecoin checkout
    • Guide: take stablecoins
    • Fraud rules & 3D Secure
    • Dispute evidence
    • International customers
    • Guide: safe refunds
    • Bank transfers on invoices

    Billing

    • Subscription discounts
    • Guide: sell subscriptions
    • Usage billing
    • Guide: report usage

    Money movement

    • Payout options
    • Guide: reconcile payouts
    • Accounting sync
    • Revenue analytics

    Developers

    • Authentication
    • Errors & retries
    • Pagination
    • Idempotency
    • Rate limits
    • Webhooks
    • Verify webhooks
    • Node SDK (preview)
    • CLI (preview)
    • Postman collection

    AI

    • AI agents hub
    • Safe AI agents
    • Custom agents
    • Prompt library

    Integrations

    • Website builders
    • Shopify
    • Shopify orders by invoice
    • WooCommerce
    • Zapier
    • Slack, Discord and Teams

    Reference

    • Payments
    • Refunds
    • Disputes
    • Payment links
    • Invoices
    • Customers
    • Products
    • Subscriptions & plans
    • Discount codes
    • Meters & usage events
    • Payouts & balance
    • Webhook endpoints
    • Events
    • Test helpers
    • OpenAPI spec
    • Error codes
    • Changelog
    • Glossary

    For AI tools

    • llms-full.txt
    • MCP server
    • openapi.json
    DocsReferenceRefunds

    Refunds API

    Refund a payment in full or in part with the Anytime Capital Payments API, safely retried with an Idempotency-Key, within your refund approval limit.

    View as MarkdownOpen in Claude

    Refund all or part of a payment, never more than is left. Every refund is listed here however it was made (the dashboard, the API, an approved request), each with its own id (re_…). The money goes back to the card or account that paid. For the full pattern with retries and approvals, see Issue refunds safely.

    TopicDetail
    Endpoints`POST /api/v1/refunds`, `GET /api/v1/refunds`, `GET /api/v1/refunds/{id}`
    Key permissionsrefunds:write, refunds:read
    Samplescurl; Node.js 18+ with the built-in fetch (in an ES module); the Node SDK (preview: not on npm yet); Python with requests.
    Every request can also answer401 UNAUTHORIZED, 401 API_KEY_EXPIRED, 403 NOT_ENROLLED, 403 PERMISSION_DENIED, 403 IP_NOT_ALLOWED, 429 RATE_LIMITED, 500 INTERNAL_ERROR. See Error codes.

    Refund approval limits

    An API key refunds like an admin. If your business has a refund approval limit (Settings → Team & approvals) and a refund is over it, nothing is refunded: the answer is 202 with status: "pending_approval" and an id starting re_appr_, and your owners are asked to approve it. Retrieve that id later: once approved, refundId names the refund it became; if declined, status is failed with failureReason: "approval_declined".

    Stablecoin payments

    Payments made in stablecoins (ids starting pay_sc) went straight to your own wallet, so they're refunded by sending the tokens back from it, never through this endpoint. See Stablecoin checkout.

    The refund object

    JSON
    {
      "object": "refund",
      "livemode": true,
      "id": "re_8812",
      "paymentId": "pay_7Hq2LmX9cR4tVb",
      "amountCents": 2500,
      "currency": "usd",
      "reason": "Requested by customer",
      "status": "succeeded",
      "failureReason": null,
      "refundId": null,
      "createdAt": "2026-10-20T09:12:44.000Z"
    }
    FieldTypeDescription
    objectstringThe type of object. Always refund.
    livemodebooleanFalse for test-mode data (an ak_test_ key); true for live data.
    idstringre_… for a refund; re_appr_… for one that needed an owner's approval.
    paymentIdstringThe refunded payment, pay_….
    amountCentsintegerRefunded (or to be refunded). Integer cents.
    currencystringusd.
    reasonstring or nullWhy, as recorded: a preset (requested_by_customer, duplicate, fraudulent, other) shown as words, your own note, or both.
    statusstringsucceeded; pending (sent, not settled yet); pending_approval (waiting for an owner: nothing refunded yet); or failed.
    failureReasonstring or nullOne of approval_declined, failed, canceled.
    refundIdstring or nullFor an approved re_appr_…: the refund it became, re_….
    createdAtstring (date-time)When it was made or asked for.

    Endpoints

    Refund a payment

    POST/api/v1/refunds
    Permission refunds:writeSupports Idempotency-Key.

    Refund all or part of a payment, never more than is left. Over the business's refund approval limit nothing is refunded: the answer is 202 with status pending_approval while an owner decides. Answers 201 with the refund, or 202 with status: "pending_approval" and an id starting re_appr_ when it is over your business's refund approval limit. The Idempotency-Key also keys the refund at the payments network, so a retry after a lost response never refunds twice.

    Headers

    Idempotency-Key
    string
    Recommended. A unique key such as a UUID: a retry with the same key within 24 hours gets the first response back instead of acting twice. See Idempotency.

    Body

    paymentId
    stringrequired
    The payment to refund, pay_….
    amountCents
    integer
    How much, in cents. Leave out to refund everything still left. At least 1 ($0.01).
    reason
    string
    requested_by_customer, duplicate, fraudulent, other; or your own words. Up to 500 characters.
    note
    string
    Added to a preset reason. Up to 500 characters.
    Request
    curl -X POST https://anytime-capital.com/api/v1/refunds \
      -H "Authorization: Bearer $ANYTIME_API_KEY" \
      -H "Idempotency-Key: refund-order-1042" \
      -H "Content-Type: application/json" \
      -d '{
        "paymentId": "pay_7Hq2LmX9cR4tVb",
        "amountCents": 2500,
        "reason": "requested_by_customer"
      }'
    const res = await fetch("https://anytime-capital.com/api/v1/refunds", {
      method: "POST",
      headers: {
        Authorization: `Bearer ${process.env.ANYTIME_API_KEY}`,
        "Content-Type": "application/json",
        "Idempotency-Key": "refund-order-1042",
      },
      body: JSON.stringify({
        paymentId: "pay_7Hq2LmX9cR4tVb",
        amountCents: 2500,
        reason: "requested_by_customer",
      }),
    });
    const refund = await res.json();
    if (!res.ok) throw new Error(`${refund.error.code}: ${refund.error.message}`);
    import { AnytimeCapital } from "@anytimecapital/node";
    
    const client = new AnytimeCapital({ apiKey: process.env.ANYTIME_API_KEY! });
    
    const refund = await client.refunds.create(
      {
        paymentId: "pay_7Hq2LmX9cR4tVb",
        amountCents: 2500,
        reason: "requested_by_customer",
      },
      { idempotencyKey: "refund-order-1042" },
    );
    import os
    
    import requests
    
    res = requests.post(
        "https://anytime-capital.com/api/v1/refunds",
        headers={
            "Authorization": f"Bearer {os.environ['ANYTIME_API_KEY']}",
            "Idempotency-Key": "refund-order-1042",
        },
        json={
            "paymentId": "pay_7Hq2LmX9cR4tVb",
            "amountCents": 2500,
            "reason": "requested_by_customer",
        },
        timeout=30,
    )
    refund = res.json()
    if not res.ok:
        raise RuntimeError(f"{refund['error']['code']}: {refund['error']['message']}")
    Response 201
    {
      "object": "refund",
      "livemode": true,
      "id": "re_8812",
      "paymentId": "pay_7Hq2LmX9cR4tVb",
      "amountCents": 2500,
      "currency": "usd",
      "reason": "Requested by customer",
      "status": "succeeded",
      "failureReason": null,
      "refundId": null,
      "createdAt": "2026-10-20T09:12:44.000Z"
    }

    Errors

    400INVALID_JSON
    The body isn't valid JSON, or couldn't be read. An empty body reads as {}. Send Content-Type: application/json and a JSON object.
    400INVALID_INPUT
    A field, filter, limit or cursor is missing or invalid. The message starts with the field's name, as in amountCents: …, or reads Invalid cursor. Fix the named field. Don't retry the same request unchanged.
    400INVALID_IDEMPOTENCY_KEY
    The Idempotency-Key header is empty, longer than 255 characters, or has characters other than printable ASCII. Use a UUID. See Idempotency.
    404NOT_FOUND
    No such object on your business (an id from another business reads the same), or no such endpoint under /api/v1, which still answers in JSON. Check the id and the path. Ids are case-sensitive.
    409NOT_REFUNDABLE
    The payment can't be refunded in its current state, or it was paid in stablecoins, which settle straight to your wallet. Check the payment's status and amountRefundedCents with GET /api/v1/payments/{id}. Refund a stablecoin payment by sending the tokens back from your wallet.
    409REFUND_PENDING_APPROVAL
    Another refund on this payment is already waiting for an owner's approval. Wait for the owner's decision: GET /api/v1/refunds?paymentId=…&status=pending_approval shows it.
    422IDEMPOTENCY_KEY_REUSED
    The Idempotency-Key was used in the last 24 hours with a different body or endpoint. Use a new key for a new request; reuse a key only to retry the same request.
    500REFUND_NOT_RECORDED
    The refund was sent, but our record of it isn't there yet. Don't refund again. List GET /api/v1/refunds?paymentId=… in a minute to find it.
    502PROCESSOR_ERROR
    The payments network didn't answer in time. Retry with the same Idempotency-Key. A refund is keyed at the network by that key too, so a retry never refunds twice.
    503NOT_CONFIGURED
    The part of Anytime Capital Payments this needs isn't available right now. Retry later, with the same Idempotency-Key on a write.

    List refunds

    GET/api/v1/refunds
    Permission refunds:read

    Refunds however they were made, newest first. status=pending_approval lists refunds waiting for an owner's approval instead.

    Query

    paymentId
    string
    Only refunds of this payment.
    status
    string
    succeeded, pending or failed; or pending_approval for the refunds waiting for an owner's approval (a separate list: its cursor works only with the same filter).
    limit
    integer
    How many objects per page, 1–100. Default 25. See Pagination.
    cursor
    string
    The previous page's nextCursor, for the page after it.
    Request
    curl "https://anytime-capital.com/api/v1/refunds?paymentId=pay_7Hq2LmX9cR4tVb" \
      -H "Authorization: Bearer $ANYTIME_API_KEY"
    const res = await fetch("https://anytime-capital.com/api/v1/refunds?paymentId=pay_7Hq2LmX9cR4tVb", {
      headers: { Authorization: `Bearer ${process.env.ANYTIME_API_KEY}` },
    });
    const page = await res.json();
    if (!res.ok) throw new Error(`${page.error.code}: ${page.error.message}`);
    import { AnytimeCapital } from "@anytimecapital/node";
    
    const client = new AnytimeCapital({ apiKey: process.env.ANYTIME_API_KEY! });
    
    const page = await client.refunds.list({ paymentId: "pay_7Hq2LmX9cR4tVb" });
    import os
    
    import requests
    
    res = requests.get(
        "https://anytime-capital.com/api/v1/refunds",
        headers={"Authorization": f"Bearer {os.environ['ANYTIME_API_KEY']}"},
        params={"paymentId": "pay_7Hq2LmX9cR4tVb"},
        timeout=30,
    )
    page = res.json()
    if not res.ok:
        raise RuntimeError(f"{page['error']['code']}: {page['error']['message']}")
    Response 200
    {
      "object": "list",
      "data": [
        {
          "object": "refund",
          "livemode": true,
          "id": "re_8812",
          "paymentId": "pay_7Hq2LmX9cR4tVb",
          "amountCents": 2500,
          "currency": "usd",
          "reason": "Requested by customer",
          "status": "succeeded",
          "failureReason": null,
          "refundId": null,
          "createdAt": "2026-10-20T09:12:44.000Z"
        }
      ],
      "hasMore": false,
      "nextCursor": null
    }

    Errors

    400INVALID_INPUT
    A field, filter, limit or cursor is missing or invalid. The message starts with the field's name, as in amountCents: …, or reads Invalid cursor. Fix the named field. Don't retry the same request unchanged.

    Get a refund

    GET/api/v1/refunds/{id}
    Permission refunds:read

    One refund (re_…) or one that needed approval (re_appr_…). For a re_appr_… id: refundId names the refund it became once an owner approved it; a declined one is failed with failureReason: "approval_declined".

    Path

    id
    stringrequired
    re_… or re_appr_….
    Request
    curl https://anytime-capital.com/api/v1/refunds/re_8812 \
      -H "Authorization: Bearer $ANYTIME_API_KEY"
    const res = await fetch("https://anytime-capital.com/api/v1/refunds/re_8812", {
      headers: { Authorization: `Bearer ${process.env.ANYTIME_API_KEY}` },
    });
    const refund = await res.json();
    if (!res.ok) throw new Error(`${refund.error.code}: ${refund.error.message}`);
    import { AnytimeCapital } from "@anytimecapital/node";
    
    const client = new AnytimeCapital({ apiKey: process.env.ANYTIME_API_KEY! });
    
    const refund = await client.refunds.retrieve("re_8812");
    import os
    
    import requests
    
    res = requests.get(
        "https://anytime-capital.com/api/v1/refunds/re_8812",
        headers={"Authorization": f"Bearer {os.environ['ANYTIME_API_KEY']}"},
        timeout=30,
    )
    refund = res.json()
    if not res.ok:
        raise RuntimeError(f"{refund['error']['code']}: {refund['error']['message']}")
    Response 200
    {
      "object": "refund",
      "livemode": true,
      "id": "re_8812",
      "paymentId": "pay_7Hq2LmX9cR4tVb",
      "amountCents": 2500,
      "currency": "usd",
      "reason": "Requested by customer",
      "status": "succeeded",
      "failureReason": null,
      "refundId": null,
      "createdAt": "2026-10-20T09:12:44.000Z"
    }

    Errors

    404NOT_FOUND
    No such object on your business (an id from another business reads the same), or no such endpoint under /api/v1, which still answers in JSON. Check the id and the path. Ids are case-sensitive.
    Over the approval limit (202)
    {
      "object": "refund",
      "livemode": true,
      "id": "re_appr_57",
      "paymentId": "pay_7Hq2LmX9cR4tVb",
      "amountCents": 75000,
      "currency": "usd",
      "reason": "Requested by customer",
      "status": "pending_approval",
      "failureReason": null,
      "refundId": null,
      "createdAt": "2026-10-20T09:12:44.000Z"
    }

    Events

    refund.created when a refund is made, then refund.succeeded or refund.failed; the payment's own payment.refunded carries amountRefundedCents, the total refunded so far. See Webhooks.

    PreviousPaymentsNext Disputes

    Anytime Capital is a fintech company, not a bank. Payment processing, banking and payout services are provided by Anytime Capital's licensed partners. Rates shown are for US card payments; international cards, currency conversion and disputes may carry additional fees shown in your dashboard before you accept a payment.

    On this page

    • The refund object
    • Endpoints
    • Refund a payment
    • List refunds
    • Get a refund
    • Events
    Anytime Capital
    (470) 748-2530
    App Store

    Business

    • Business Checking
    • Business Debit Cards
    • Payments
    • Ecommerce Payments
    • Invoicing
    • Developer Docs

    Solutions

    • CPAs & Accountants
    • Financial Advisors
    • Boat & Auto Dealerships
    • Dental & Medical Practices
    • Creators & Coaches
    • All solutions

    Crypto

    • Crypto Wallet
    • Tether Wallet
    • Buy Digital Assets
    • Explore Markets
    • Security & Licenses
    • Compare Platforms
    • Bitcoin ATM Alternative

    Company

    • Our Story
    • Schedule Appointment
    • Careers
    • Media & Press
    • Investor Relations
    • FAQ

    Branches

    • Atlanta, Georgia
    • Miami, Florida
    • Houston, Texas
    • All branches

    Legal

    • Terms & Conditions
    • Privacy Policy
    • Your Privacy Choices
    • Fraud Notice

    © 2026 Anytime Capital LLC. Anytime Capital is a fintech company, not a bank.

    The Anytime Capital Mastercard® Prepaid Card is issued by Pathward®, N.A., Member FDIC. Mastercard® is a registered trademark of Mastercard International Incorporated. All other trademarks and service marks belong to their respective owners.

    Mastercard