Refunds

When you refund a payment, a refund object is created. You can retrieve information about the refunds you've issued.

Refund a Payment

Issue a refund for a payment. You may refund the full payment amount or just a portion. When refunding a portion, multiple refunds are supported up until the full payment amount has been refunded. Note: For platforms, if the seller account status is not enabled, 400 will be returned.

Request
path Parameters
id
required
string <uuid>
header Parameters
Idempotency-Key
required
string <uuid>

a string to identify your request (we recommend using a generated uuid, but you may use any unique string) see Idempotent Requests

Example: my-request-123abc
Authorization
required
string

the access_token value returned from the JustiFi oauth/token endpoint (be sure to append Bearer before the token)

Example: Bearer {access_token}
Request Body schema: application/json
amount
number

amount to refund; must be less than or equal to the amount_refundable on the payment

description
string

an optional note about this refund

reason
string

the reason this refund is being issued

Enum: "duplicate" "fraudulent" "customer_request"
metadata
object <json>

any useful information you'd like to store alongside this refund

Responses
201

Refund was created successfully

post/payments/{id}/refunds
Request samples
application/json
{
  • "amount": 10000,
  • "description": "string",
  • "reason": "duplicate",
  • "metadata": { }
}
Response samples
application/json
{
  • "id": 1,
  • "type": "refund",
  • "data": {
    },
  • "page_info": "string"
}

List Refunds

List the refunds for your account. This endpoint supports pagination.

Request
header Parameters
Authorization
required
string

the access_token value returned from the JustiFi oauth/token endpoint (be sure to append Bearer before the token)

Example: Bearer {access_token}
Sub-Account
string

for platforms, the id of the sub account that this request applies to

Example: acc_2IdMEOjIG6lJAncakgdBF2
Seller-Account
string
Deprecated

for platforms, the id of the seller account that this request applies to
Note: seller account is deprecated, please use sub account

Responses
200

Successfully list refunds

get/refunds
Request samples
Response samples
application/json
{
  • "id": 1,
  • "type": "array",
  • "data": [
    ],
  • "page_info": {
    }
}

Get a Refund

Get information about a refund.

Request
path Parameters
id
required
string <uuid>
header Parameters
Authorization
required
string

the access_token value returned from the JustiFi oauth/token endpoint (be sure to append Bearer before the token)

Example: Bearer {access_token}
Responses
200

Successfully get a refund

get/refunds/{id}
Request samples
Response samples
application/json
{
  • "id": 1,
  • "type": "refund",
  • "data": {
    },
  • "page_info": "string"
}

Update a Refund

Update the refund metadata.

Request
path Parameters
id
required
string <uuid>
header Parameters
Idempotency-Key
required
string <uuid>

a string to identify your request (we recommend using a generated uuid, but you may use any unique string) see Idempotent Requests

Example: my-request-123abc
Authorization
required
string

the access_token value returned from the JustiFi oauth/token endpoint (be sure to append Bearer before the token)

Example: Bearer {access_token}
Request Body schema: application/json
metadata
object <json>

any useful information you'd like to store alongside this refund; when you update metadata, any previous metadata will be overwritten

Responses
200

Refund update was successful

patch/refunds/{id}
Request samples
application/json
{
  • "metadata": { }
}
Response samples
application/json
{
  • "id": 1,
  • "type": "refund",
  • "data": {
    },
  • "page_info": "string"
}