> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# dropoffPurchase

> Buy a dropoff for a customer's return. On a network Redo bills for, this creates a billable charge: the fee is resolved and charged at purchase time, in the shopper's local currency, and drawn from the account's prepaid balance when the account has one (a balance too low to cover it refuses the purchase with `INSUFFICIENT_BALANCE`, HTTP 402, before anything is issued). On a network that bills you directly, Redo raises no charge and `fee` stays null. Pass `locationId` to buy at a location from `dropoffLocations`, or omit it and pass `customer.address` to buy at the nearest location in one call (`NO_LOCATION_AVAILABLE`, HTTP 422, when none is available); the result carries the location that was chosen. Before calling, confirm the network, the location, the parcel details (customer and items) and the price from `dropoffRates` with the user. Retrying with the same `externalReferenceId` returns the original dropoff without charging again. A purchase is final: voiding the dropoff later refunds the fee only when the carrier refunds Redo for the label, which today is a UniUni label on Virtual; on every other network a voided dropoff's fee is kept.

**Required scopes:** [`dropoff_write`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-dropoff_write)

## Arguments

**input** `[DropoffPurchaseInput!](/docs/api-reference/v3/reference/dropoff/dropoff-purchase-input)` *required*

The dropoff to buy.

**fields**

**customer** `[DropoffPurchaseCustomerInput!](/docs/api-reference/v3/reference/dropoff/dropoff-purchase-customer-input)` *required*

The customer returning the parcel.

**fields**

**address** `[DropoffPurchaseAddressInput](/docs/api-reference/v3/reference/dropoff/dropoff-purchase-address-input)`

The customer's address.

**email** `String!` *required*

The customer's email. Providers validate it and reject placeholders.

**firstName** `String!` *required*

The customer's first name.

**lastName** `String!` *required*

The customer's last name.

**phone** `String`

The customer's phone number.

**externalReferenceId** `String!` *required*

Your own key for this purchase. Buying twice with the same reference returns the first dropoff and charges once.

**items** `[\[DropoffPurchaseItemInput!\]!](/docs/api-reference/v3/reference/dropoff/dropoff-purchase-item-input)` *required*

The goods in the parcel. At least one line is required.

**fields**

**description** `String!` *required*

What the item is. Shown to the provider and on customs forms.

**imageUrl** `String`

A product image URL, shown to Happy Returns staff.

**orderLineReference** `String`

Your own line id. Opaque to Redo, passed through to the provider.

**quantity** `Int!` *required*

How many of this item are in the parcel. Must be positive.

**reason** `String`

Why the item is being returned. Required for `HAPPY_RETURNS`, which checks eligibility per item.

**sku** `String`

Your SKU for the item.

**unitValue** `[MoneyInput!](/docs/api-reference/v3/reference/common/money-input)` *required*

The declared value of a single unit. Must be greater than zero.

**locationId** `String`

The location to drop off at, from `dropoffLocations`. Omit to buy at the location nearest `customer.address`; one of the two is required.

**orderReference** `String!` *required*

Your own order id for the parcel. Opaque to Redo.

**provider** `[DropoffProvider!](/docs/api-reference/v3/reference/dropoff/dropoff-provider)` *required*

The provider to buy from. With `locationId`, it is cross-checked against the location and a mismatch is rejected. Without it, the nearest location is chosen from this provider's locations.

**purchaseDate** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the dropoff record and the provider request are dated. Defaults to now. Billing always uses the time the purchase is processed, so this does not move the charge.

**returnAddressId** `ID`

Which of your configured return addresses the parcel goes to. Omitted, the return center is chosen from the customer's country.

## Returns

**dropoffPurchase** `[PublicDropoff!](/docs/api-reference/v3/reference/dropoff/public-dropoff)` *required*

A dropoff bought through the API: the customer takes the parcel to the location, no label required.

**fields**

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the record was created.

**events** `[PublicDropoffEventConnection!](/docs/api-reference/v3/pagination)` *required*

A paginated history of this dropoff's status changes.

**Requires:** [`dropoff_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-dropoff_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**Fields**

**edges** `[\[PublicDropoffEventEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**fields**

**cursor** `String!` *required*

Opaque cursor for this item; pass to `after`/`before` to page from here.

**node** `[PublicDropoffEvent!](/docs/api-reference/v3/reference/dropoff/public-dropoff-event)` *required*

The item at this edge.

**nodes** `[\[PublicDropoffEvent!\]!](/docs/api-reference/v3/reference/dropoff/public-dropoff-event)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**fields**

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the event was recorded.

**id** `ID!` *required*

The id of this event.

**source** `String`

What produced this event, e.g. the provider webhook.

**status** `[PublicDropoffStatus!](/docs/api-reference/v3/reference/dropoff/public-dropoff-status)` *required*

The status the dropoff moved to.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**fields**

**endCursor** `String`

Cursor of the last edge in this page; pass to `after` to page forward.

**hasNextPage** `Boolean!` *required*

Whether more items exist after this page (drives forward pagination with `first`/`after`).

**hasPreviousPage** `Boolean!` *required*

Whether more items exist before this page (drives backward pagination with `last`/`before`).

**startCursor** `String`

Cursor of the first edge in this page; pass to `before` to page backward.

**externalReferenceId** `String!` *required*

Your own key for this purchase, as supplied to `dropoffPurchase`. Unique within your account.

**fee** `[Money](/docs/api-reference/v3/reference/common/money)`

What you were charged for this dropoff, in the shopper's local currency. Null until the purchase completes, and on networks that bill you directly rather than through Redo.

**fields**

**amount** `[Decimal!](/docs/api-reference/v3/reference/common/decimal)` *required*

The exact amount as a decimal string (e.g. "19.99").

**currency** `String!` *required*

ISO 4217 currency code (e.g. USD).

**id** `ID!` *required*

The id of this dropoff.

**locationAddress** `[DropoffLocationAddress](/docs/api-reference/v3/reference/dropoff/dropoff-location-address)`

The location's address, snapshotted at purchase time.

**fields**

**address1** `String`

The first line of the address. Null for catalog entries whose network publishes no street line.

**address2** `String`

The second line of the address (apartment, suite, unit).

**city** `String!` *required*

The city, town, or village.

**country** `String!` *required*

The country.

**postalCode** `String!` *required*

The postal or ZIP code.

**province** `String!` *required*

The province, state, or region.

**locationId** `String!` *required*

The provider's identifier for the chosen location, as returned by `dropoffLocations`.

**locationName** `String`

The location's name, snapshotted at purchase time.

**provider** `[DropoffProvider!](/docs/api-reference/v3/reference/dropoff/dropoff-provider)` *required*

The provider that issued this dropoff.

**purchaseState** `[PublicDropoffPurchaseState!](/docs/api-reference/v3/reference/dropoff/public-dropoff-purchase-state)` *required*

Whether the purchase completed. Only `PURCHASED` dropoffs are usable.

**purchasedAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the dropoff was purchased.

**qrCode** `String`

The provider's raw barcode value for this dropoff. Null until the purchase completes.

**qrCodeUrl** `String`

A hosted PNG of the QR code the customer presents at the dropoff point. Null until the purchase completes.

**status** `[PublicDropoffStatus!](/docs/api-reference/v3/reference/dropoff/public-dropoff-status)` *required*

Where the parcel is in the provider's tracking lifecycle.

**trackingId** `String`

The provider's tracking identifier for the parcel, once it has one.

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the record was last updated.

## Example

```graphql theme={null}
mutation {
  dropoffPurchase(input: { ... }) {
    createdAt
    events {
      nodes {
        createdAt
        id
        source
        status
      }
      pageInfo { hasNextPage endCursor }
    }
    externalReferenceId
    id
    locationId
    locationName
    provider
    purchaseState
    # ...
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.