Skip to main content
POST
/
payments
/
external
/
refund
Refund an external payment transaction
curl --request POST \
  --url https://api-sb.meld.io/payments/external/refund \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "serviceProvider": "AUTHORIZENET",
  "sourceAmount": 0
}
'
{
  "transaction": {
    "createdAt": "2023-11-07T05:31:56Z",
    "id": "<string>",
    "serviceProvider": "<string>",
    "sessionId": "<string>",
    "status": "<string>",
    "transactionType": "<string>",
    "updatedAt": "2023-11-07T05:31:56Z",
    "accountId": "<string>",
    "countryCode": "<string>",
    "cryptoDetails": {
      "blockchainTransactionId": "<string>",
      "chainId": "<string>",
      "institution": "<string>",
      "networkFee": 123,
      "networkFeeInUsd": 123,
      "offrampDestinationWalletAddress": "<string>",
      "partnerFee": 123,
      "partnerFeeInUsd": 123,
      "swapFee": 123,
      "swapFeeInUsd": 123,
      "totalFee": 123,
      "totalFeeInUsd": 123,
      "transactionFee": 123,
      "transactionFeeInUsd": 123,
      "walletAddress": "<string>"
    },
    "customer": {
      "accountId": "<string>",
      "addresses": [
        {
          "addressDetails": {
            "city": "<string>",
            "country": "<string>",
            "firstName": "<string>",
            "lastName": "<string>",
            "lineOne": "<string>",
            "lineTwo": "<string>",
            "postalCode": "<string>",
            "region": "<string>"
          }
        }
      ],
      "email": "<string>",
      "externalId": "<string>",
      "id": "<string>",
      "name": {
        "firstName": "<string>",
        "lastName": "<string>"
      },
      "phone": "<string>",
      "serviceProviders": {},
      "status": "<string>"
    },
    "description": "<string>",
    "destinationAmount": 123,
    "destinationCurrencyCode": "<string>",
    "externalCustomerId": "<string>",
    "externalReferenceId": "<string>",
    "externalSessionId": "<string>",
    "externalSubaccountCustomerId": "<string>",
    "fiatAmountInUsd": 123,
    "isImported": true,
    "isPassthrough": true,
    "key": "<string>",
    "multiFactorAuthorizationStatus": [
      {
        "submitted": true,
        "successful": true,
        "url": "<string>"
      }
    ],
    "orderId": "<string>",
    "parentPaymentTransactionId": "<string>",
    "passthroughReference": "<string>",
    "paymentDetails": {
      "authAmount": 123,
      "captureAmount": 123
    },
    "paymentMethodType": "<string>",
    "serviceProviderCreatedAt": "2023-11-07T05:31:56Z",
    "serviceProviderDetails": {},
    "serviceProviderTransactionUrl": "<string>",
    "serviceTransactionId": "<string>",
    "sessionClientTags": {},
    "sourceAmount": 123,
    "sourceCurrencyCode": "<string>",
    "subaccountCustomerId": "<string>"
  }
}

Authorizations

Authorization
string
header
default:BASIC <Meld API Key>
required

Headers

X-Idempotency-Key
string<uuid>
Meld-Passthrough-Reference
string
Meld-Passthrough-Key-Id
string
Meld-Passthrough-Key-Public
string
Meld-Passthrough-Key-Private
string
Meld-Passthrough-Oauth
string

Body

application/json
serviceProvider
enum<string>
required

The service provider that processed the original transaction

Available options:
AUTHORIZENET,
BRAINTREE,
CHECKOUT,
CIRCLE,
NMI,
STRIPE
serviceTransactionId
string
required

The service provider's unique identifier for the original transaction

Minimum string length: 1
sourceAmount
number
required

Amount to be refunded. Can be a partial refund

Required range: x >= 0

Response

Payment successfully refunded

transaction
object

Payment transaction information