Refunds

Import Refund

This endpoint can be used to create or update (if externalId already exists) a refund.

It cannot be used when using a native integration as refunds are only created by the native integration in that case.

post/refunds

Request

  • Base URL
    https://api.upflow.io/v1
  • Auth
    API key in header X-Api-Key and API key in header X-Api-Secret

Request body

refNumberstring required

Refund reference number.

currency'EUR' | 'CHF' | 'USD' | 'CAD' | 'GBP' required

ISO 4217 Currency Code

amountinteger required

Refund amount (in cents).

instrument'WIRE_TRANSFER' | 'DIRECT_DEBIT' | 'CARD' | 'CASH' | 'CHECK' | 'UNKNOWN'

Instrument used for the payment.

validatedAtstring date-time required

The date when the refund is validated (ISO 8601 format).

externalIdstring

Refund external identifier.

Example request

{
  "refNumber": "REFUND123",
  "currency": "EUR",
  "amount": 1700,
  "validatedAt": "2015-05-05T12:30:00Z",
  "externalId": "92842AB37",
  "linkedPayments": [
    {
      "amountLinked": 3000,
      "payment": {
        "id": "00a70b35-2be3-4c43-aefb-397190134655",
        "externalId": "AEGaaZD"
      }
    }
  ],
  "linkedCreditNotes": [
    {
      "amountLinked": 3000,
      "creditNote": {
        "id": "00a70b35-2be3-4c43-aefb-397190134655",
        "externalId": "AEGaaZD",
        "customId": "AEGaaZD"
      }
    }
  ],
  "customer": {
    "id": "00a70b35-2be3-4c43-aefb-397190134655",
    "externalId": "1a2c3b"
  }
}

Response

Refund Created or Updated (Note: Apiary doc says 200, usually POST for create returns 201. Sticking to doc.)

refNumberstring required

Refund reference number.

currency'EUR' | 'CHF' | 'USD' | 'CAD' | 'GBP' required

ISO 4217 Currency Code

amountinteger required

Refund amount (in cents).

instrument'WIRE_TRANSFER' | 'DIRECT_DEBIT' | 'CARD' | 'CASH' | 'CHECK' | 'UNKNOWN'

Instrument used for the payment.

validatedAtstring date-time required

The date when the refund is validated (ISO 8601 format).

externalIdstring

Refund external identifier.

idstring uuid required

The Refund ID.

amountLinkedinteger required

Amount linked to the refund (in cents).

modifiedAtstring date-time required

The date when the refund was last updated (ISO 8601 format).

createdAtstring date-time

The date at which the refund was created (ISO 8601 format).

updatedAtstring date-time

The date at which the refund was last updated (ISO 8601 format).

Example response

{
  "refNumber": "REFUND123",
  "currency": "EUR",
  "amount": 1700,
  "validatedAt": "2015-05-05T12:30:00Z",
  "externalId": "92842AB37",
  "id": "00a70b35-2be3-4c43-aefb-397190134655",
  "amountLinked": 1700,
  "modifiedAt": "2015-05-05T12:30:00Z",
  "linkedTransactions": [
    {
      "linkedAmount": 3000,
      "payment": {
        "refNumber": "PYMT123",
        "currency": "EUR",
        "amount": 1700,
        "validatedAt": "2015-05-05T12:30:00Z",
        "externalId": "92842AB37",
        "customFields": [
          {
            "id": "00a70b35-2be3-4c43-aefb-397190134655",
            "externalId": "AEGaaZD"
          }
        ]
      }
    }
  ],
  "linkedPayments": [
    {
      "linkedAmount": 3000,
      "payment": {
        "refNumber": "PYMT123",
        "currency": "EUR",
        "amount": 1700,
        "validatedAt": "2015-05-05T12:30:00Z",
        "externalId": "92842AB37",
        "customFields": [
          {
            "id": "00a70b35-2be3-4c43-aefb-397190134655",
            "externalId": "AEGaaZD"
          }
        ]
      }
    }
  ],
  "linkedCreditNotes": [
    {
      "linkedAmount": 3000,
      "creditNote": {
        "customId": "CN123",
        "externalId": "92842AB37",
        "issuedAt": "2015-05-05T12:30:00Z",
        "dueDate": "2015-05-05T12:30:00Z",
        "name": "Credit Note for returned goods",
        "currency": "EUR",
        "grossAmount": 1700,
        "netAmount": 1500,
        "updatedAt": "2015-05-05T12:30:00Z"
      }
    }
  ],
  "customer": {
    "id": "00a70b35-2be3-4c43-aefb-397190134655",
    "externalId": "1a2c3b",
    "companyName": "Upflow SAS",
    "accountingRef": "UPFL-SAS"
  },
  "createdAt": "2015-05-05T12:30:00Z",
  "updatedAt": "2015-05-05T12:30:00Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.