List disputes

get/v1/disputes

Parameters

statusneeds_response | under_review | won | lostin query
qstringin query

Search: the dispute's or payment's id, or part of the payment's reference, description or customer email.

up to 100 characters

Responses

  • 200OKobject
    Show the fields
    object"list"
    dataarray of Dispute
    Fields of data
    idstring (uuid)
    object"dispute"
    livemodeboolean
    merchant_idstring (uuid)
    payment_intentstring (uuid)
    amountinteger

    Minor units (kobo, cents).

    at least 0

    held_amountinteger

    Minor units (kobo, cents).

    at least 0

    currencyNGN | USD
    reasonfraudulent | product_not_received | duplicate | credit_not_processed | general
    statusneeds_response | under_review | won | lost
    respond_bystring (date-time)
    evidencestring | null
    evidence_submitted_atstring (date-time) | null
    created_atstring (date-time)
    resolved_atstring (date-time) | null
    feeinteger

    Chargeback fee, charged when the dispute is lost (0 otherwise).

    at least 0

    fee_vatinteger

    VAT on the chargeback fee.

    at least 0

    accepted_atstring (date-time) | null

    When you accepted the dispute instead of sending evidence.

    merchant_notestring | null

    Your note when accepting.

    has_moreboolean
bash
curl https://sandbox.api.biftpay.com/v1/disputes \
  -H "Authorization: Bearer bp_test_..."
response
{
  "object": "list",
  "data": [
    {
      "id": "…",
      "object": "dispute",
      "livemode": true,
      "merchant_id": "…",
      "payment_intent": "…",
      "amount": 0,
      "held_amount": 0,
      "currency": "NGN",
      "reason": "fraudulent",
      "status": "needs_response",
      "respond_by": "…",
      "created_at": "…",
      "fee": 0,
      "fee_vat": 0
    }
  ]
}

Retrieve a dispute

get/v1/disputes/{id}

Parameters

idstring (uuid)in pathrequired

Responses

  • 200OKDispute
    Show the fields
    idstring (uuid)
    object"dispute"
    livemodeboolean
    merchant_idstring (uuid)
    payment_intentstring (uuid)
    amountinteger

    Minor units (kobo, cents).

    at least 0

    held_amountinteger

    Minor units (kobo, cents).

    at least 0

    currencyNGN | USD
    reasonfraudulent | product_not_received | duplicate | credit_not_processed | general
    statusneeds_response | under_review | won | lost
    respond_bystring (date-time)
    evidencestring | null
    evidence_submitted_atstring (date-time) | null
    created_atstring (date-time)
    resolved_atstring (date-time) | null
    feeinteger

    Chargeback fee, charged when the dispute is lost (0 otherwise).

    at least 0

    fee_vatinteger

    VAT on the chargeback fee.

    at least 0

    accepted_atstring (date-time) | null

    When you accepted the dispute instead of sending evidence.

    merchant_notestring | null

    Your note when accepting.

  • 404Not found, or not visible to this key
bash
curl https://sandbox.api.biftpay.com/v1/disputes/{id} \
  -H "Authorization: Bearer bp_test_..."
response
{
  "id": "…",
  "object": "dispute",
  "livemode": true,
  "merchant_id": "…",
  "payment_intent": "…",
  "amount": 0,
  "held_amount": 0,
  "currency": "NGN",
  "reason": "fraudulent",
  "status": "needs_response",
  "respond_by": "…",
  "created_at": "…",
  "fee": 0,
  "fee_vat": 0
}

The dispute's evidence files

get/v1/disputes/{id}/files

Parameters

idstring (uuid)in pathrequired

Responses

  • 200OKFileList
    Show the fields
    object"list"
    dataarray of File
    Fields of data
    idstring (uuid)
    object"file"
    file_namestring
    content_typestring
    sizeinteger
    uploaded_bymerchant | biftpay
    messagestring (uuid) | null

    The case message it's attached to.

    created_atstring (date-time)
    has_moreboolean
  • 404Not found, or not visible to this key
bash
curl https://sandbox.api.biftpay.com/v1/disputes/{id}/files \
  -H "Authorization: Bearer bp_test_..."
response
{
  "object": "list",
  "data": [
    {
      "id": "…",
      "object": "file",
      "file_name": "…",
      "content_type": "…",
      "size": 1000,
      "uploaded_by": "merchant",
      "message": "…",
      "created_at": "…"
    }
  ],
  "has_more": true
}

Attach evidence (receipt, delivery proof, messages) before responding

post/v1/disputes/{id}/files

Up to 10 files, while the dispute needs a response and before the deadline (409 dispute_not_open, response_deadline_passed).

Parameters

idstring (uuid)in pathrequired
Idempotency-Keystringin headerrequired

A unique key per logical request, for example a UUID. Up to 255 characters.

up to 255 characters

Body

file_namestringrequired

up to 200 characters

content_typeapplication/pdf | image/jpeg | image/pngrequired
datastringrequired

Base64; up to 5 MB decoded

Responses

  • 201The fileFile
    Show the fields
    idstring (uuid)
    object"file"
    file_namestring
    content_typestring
    sizeinteger
    uploaded_bymerchant | biftpay
    messagestring (uuid) | null

    The case message it's attached to.

    created_atstring (date-time)
  • 400Invalid request
  • 404Not found, or not visible to this key
  • 409The object is in a state that doesn't allow this
bash
curl -X POST https://sandbox.api.biftpay.com/v1/disputes/{id}/files \
  -H "Authorization: Bearer bp_test_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "file_name": "…",
    "content_type": "application/pdf",
    "data": "…"
  }'
response
{
  "id": "…",
  "object": "file",
  "file_name": "…",
  "content_type": "…",
  "size": 1000,
  "uploaded_by": "merchant",
  "message": "…",
  "created_at": "…"
}

One evidence file's content

get/v1/disputes/{id}/files/{fileId}

Parameters

idstring (uuid)in pathrequired
fileIdstring (uuid)in pathrequired

Responses

  • 200The file, base64FileContent
    Show the fields
    object"file_content"
    file_namestring
    content_typestring
    datastring

    Base64

  • 404Not found, or not visible to this key
bash
curl https://sandbox.api.biftpay.com/v1/disputes/{id}/files/{fileId} \
  -H "Authorization: Bearer bp_test_..."
response
{
  "object": "file_content",
  "file_name": "…",
  "content_type": "…",
  "data": "…"
}

Remove an evidence file (before responding)

post/v1/disputes/{id}/files/{fileId}/remove

Parameters

idstring (uuid)in pathrequired
fileIdstring (uuid)in pathrequired
Idempotency-Keystringin headerrequired

A unique key per logical request, for example a UUID. Up to 255 characters.

up to 255 characters

Responses

  • 200The remaining filesFileList
    Show the fields
    object"list"
    dataarray of File
    Fields of data
    idstring (uuid)
    object"file"
    file_namestring
    content_typestring
    sizeinteger
    uploaded_bymerchant | biftpay
    messagestring (uuid) | null

    The case message it's attached to.

    created_atstring (date-time)
    has_moreboolean
  • 404Not found, or not visible to this key
  • 409The object is in a state that doesn't allow this
bash
curl -X POST https://sandbox.api.biftpay.com/v1/disputes/{id}/files/{fileId}/remove \
  -H "Authorization: Bearer bp_test_..." \
  -H "Idempotency-Key: $(uuidgen)"
response
{
  "object": "list",
  "data": [
    {
      "id": "…",
      "object": "file",
      "file_name": "…",
      "content_type": "…",
      "size": 1000,
      "uploaded_by": "merchant",
      "message": "…",
      "created_at": "…"
    }
  ],
  "has_more": true
}

Submit evidence (once, before respond_by)

post/v1/disputes/{id}/respond

Parameters

idstring (uuid)in pathrequired
Idempotency-Keystringin headerrequired

A unique key per logical request, for example a UUID. Up to 255 characters.

up to 255 characters

Body

evidencestringrequired

up to 10000 characters

Responses

  • 200OKDispute
    Show the fields
    idstring (uuid)
    object"dispute"
    livemodeboolean
    merchant_idstring (uuid)
    payment_intentstring (uuid)
    amountinteger

    Minor units (kobo, cents).

    at least 0

    held_amountinteger

    Minor units (kobo, cents).

    at least 0

    currencyNGN | USD
    reasonfraudulent | product_not_received | duplicate | credit_not_processed | general
    statusneeds_response | under_review | won | lost
    respond_bystring (date-time)
    evidencestring | null
    evidence_submitted_atstring (date-time) | null
    created_atstring (date-time)
    resolved_atstring (date-time) | null
    feeinteger

    Chargeback fee, charged when the dispute is lost (0 otherwise).

    at least 0

    fee_vatinteger

    VAT on the chargeback fee.

    at least 0

    accepted_atstring (date-time) | null

    When you accepted the dispute instead of sending evidence.

    merchant_notestring | null

    Your note when accepting.

  • 404Not found, or not visible to this key
  • 409The object is in a state that doesn't allow this
bash
curl -X POST https://sandbox.api.biftpay.com/v1/disputes/{id}/respond \
  -H "Authorization: Bearer bp_test_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "evidence": "…"
  }'
response
{
  "id": "…",
  "object": "dispute",
  "livemode": true,
  "merchant_id": "…",
  "payment_intent": "…",
  "amount": 0,
  "held_amount": 0,
  "currency": "NGN",
  "reason": "fraudulent",
  "status": "needs_response",
  "respond_by": "…",
  "created_at": "…",
  "fee": 0,
  "fee_vat": 0
}

Accept the dispute instead of sending evidence

post/v1/disputes/{id}/accept

The dispute is settled as lost straight away. The held amount goes back to the customer and the chargeback fee applies. You can't send evidence after this.

Parameters

idstring (uuid)in pathrequired
Idempotency-Keystringin headerrequired

A unique key per logical request, for example a UUID. Up to 255 characters.

up to 255 characters

Body

notestring

An optional note for Biftpay.

up to 1000 characters

Responses

  • 200OKDispute
    Show the fields
    idstring (uuid)
    object"dispute"
    livemodeboolean
    merchant_idstring (uuid)
    payment_intentstring (uuid)
    amountinteger

    Minor units (kobo, cents).

    at least 0

    held_amountinteger

    Minor units (kobo, cents).

    at least 0

    currencyNGN | USD
    reasonfraudulent | product_not_received | duplicate | credit_not_processed | general
    statusneeds_response | under_review | won | lost
    respond_bystring (date-time)
    evidencestring | null
    evidence_submitted_atstring (date-time) | null
    created_atstring (date-time)
    resolved_atstring (date-time) | null
    feeinteger

    Chargeback fee, charged when the dispute is lost (0 otherwise).

    at least 0

    fee_vatinteger

    VAT on the chargeback fee.

    at least 0

    accepted_atstring (date-time) | null

    When you accepted the dispute instead of sending evidence.

    merchant_notestring | null

    Your note when accepting.

  • 404Not found, or not visible to this key
  • 409The object is in a state that doesn't allow this
bash
curl -X POST https://sandbox.api.biftpay.com/v1/disputes/{id}/accept \
  -H "Authorization: Bearer bp_test_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
response
{
  "id": "…",
  "object": "dispute",
  "livemode": true,
  "merchant_id": "…",
  "payment_intent": "…",
  "amount": 0,
  "held_amount": 0,
  "currency": "NGN",
  "reason": "fraudulent",
  "status": "needs_response",
  "respond_by": "…",
  "created_at": "…",
  "fee": 0,
  "fee_vat": 0
}