Skip to main content
POST
/
v1
/
{account_id}
/
disputes
cURL
curl --request POST \
  --url https://api.sandbox.nest.pagosapi.com/v1/{account_id}/disputes \
  --header 'Content-Type: application/json' \
  --data '
{
  "dispute_id": "<string>",
  "amount": 1,
  "currency": "<string>",
  "created": "<string>",
  "transaction_id": "<string>",
  "payment_method_details": {
    "payment_method_type": "<string>",
    "card": {
      "attributes": {
        "network": "<string>",
        "type": "<string>",
        "bin": "<string>",
        "issuer_bank": "<string>",
        "issuer_country": "<string>"
      }
    }
  },
  "pagos_codes": {},
  "amount_refunded": 1,
  "transaction_order_id": "<string>",
  "dispute_response": {
    "status": "<string>",
    "reason_code": "<string>",
    "reason": "<string>"
  },
  "additional_data": {
    "merchant_account_id": "<string>",
    "order_id": "<string>",
    "acquirer_reference_number": "<string>",
    "metadata": {}
  }
}
'
import requests

url = "https://api.sandbox.nest.pagosapi.com/v1/{account_id}/disputes"

payload = {
"dispute_id": "<string>",
"amount": 1,
"currency": "<string>",
"created": "<string>",
"transaction_id": "<string>",
"payment_method_details": {
"payment_method_type": "<string>",
"card": { "attributes": {
"network": "<string>",
"type": "<string>",
"bin": "<string>",
"issuer_bank": "<string>",
"issuer_country": "<string>"
} }
},
"pagos_codes": {},
"amount_refunded": 1,
"transaction_order_id": "<string>",
"dispute_response": {
"status": "<string>",
"reason_code": "<string>",
"reason": "<string>"
},
"additional_data": {
"merchant_account_id": "<string>",
"order_id": "<string>",
"acquirer_reference_number": "<string>",
"metadata": {}
}
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
dispute_id: '<string>',
amount: 1,
currency: '<string>',
created: '<string>',
transaction_id: '<string>',
payment_method_details: {
payment_method_type: '<string>',
card: {
attributes: {
network: '<string>',
type: '<string>',
bin: '<string>',
issuer_bank: '<string>',
issuer_country: '<string>'
}
}
},
pagos_codes: {},
amount_refunded: 1,
transaction_order_id: '<string>',
dispute_response: {status: '<string>', reason_code: '<string>', reason: '<string>'},
additional_data: {
merchant_account_id: '<string>',
order_id: '<string>',
acquirer_reference_number: '<string>',
metadata: {}
}
})
};

fetch('https://api.sandbox.nest.pagosapi.com/v1/{account_id}/disputes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.nest.pagosapi.com/v1/{account_id}/disputes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dispute_id' => '<string>',
'amount' => 1,
'currency' => '<string>',
'created' => '<string>',
'transaction_id' => '<string>',
'payment_method_details' => [
'payment_method_type' => '<string>',
'card' => [
'attributes' => [
'network' => '<string>',
'type' => '<string>',
'bin' => '<string>',
'issuer_bank' => '<string>',
'issuer_country' => '<string>'
]
]
],
'pagos_codes' => [

],
'amount_refunded' => 1,
'transaction_order_id' => '<string>',
'dispute_response' => [
'status' => '<string>',
'reason_code' => '<string>',
'reason' => '<string>'
],
'additional_data' => [
'merchant_account_id' => '<string>',
'order_id' => '<string>',
'acquirer_reference_number' => '<string>',
'metadata' => [

]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.sandbox.nest.pagosapi.com/v1/{account_id}/disputes"

payload := strings.NewReader("{\n \"dispute_id\": \"<string>\",\n \"amount\": 1,\n \"currency\": \"<string>\",\n \"created\": \"<string>\",\n \"transaction_id\": \"<string>\",\n \"payment_method_details\": {\n \"payment_method_type\": \"<string>\",\n \"card\": {\n \"attributes\": {\n \"network\": \"<string>\",\n \"type\": \"<string>\",\n \"bin\": \"<string>\",\n \"issuer_bank\": \"<string>\",\n \"issuer_country\": \"<string>\"\n }\n }\n },\n \"pagos_codes\": {},\n \"amount_refunded\": 1,\n \"transaction_order_id\": \"<string>\",\n \"dispute_response\": {\n \"status\": \"<string>\",\n \"reason_code\": \"<string>\",\n \"reason\": \"<string>\"\n },\n \"additional_data\": {\n \"merchant_account_id\": \"<string>\",\n \"order_id\": \"<string>\",\n \"acquirer_reference_number\": \"<string>\",\n \"metadata\": {}\n }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.sandbox.nest.pagosapi.com/v1/{account_id}/disputes")
.header("Content-Type", "application/json")
.body("{\n \"dispute_id\": \"<string>\",\n \"amount\": 1,\n \"currency\": \"<string>\",\n \"created\": \"<string>\",\n \"transaction_id\": \"<string>\",\n \"payment_method_details\": {\n \"payment_method_type\": \"<string>\",\n \"card\": {\n \"attributes\": {\n \"network\": \"<string>\",\n \"type\": \"<string>\",\n \"bin\": \"<string>\",\n \"issuer_bank\": \"<string>\",\n \"issuer_country\": \"<string>\"\n }\n }\n },\n \"pagos_codes\": {},\n \"amount_refunded\": 1,\n \"transaction_order_id\": \"<string>\",\n \"dispute_response\": {\n \"status\": \"<string>\",\n \"reason_code\": \"<string>\",\n \"reason\": \"<string>\"\n },\n \"additional_data\": {\n \"merchant_account_id\": \"<string>\",\n \"order_id\": \"<string>\",\n \"acquirer_reference_number\": \"<string>\",\n \"metadata\": {}\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.nest.pagosapi.com/v1/{account_id}/disputes")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"dispute_id\": \"<string>\",\n \"amount\": 1,\n \"currency\": \"<string>\",\n \"created\": \"<string>\",\n \"transaction_id\": \"<string>\",\n \"payment_method_details\": {\n \"payment_method_type\": \"<string>\",\n \"card\": {\n \"attributes\": {\n \"network\": \"<string>\",\n \"type\": \"<string>\",\n \"bin\": \"<string>\",\n \"issuer_bank\": \"<string>\",\n \"issuer_country\": \"<string>\"\n }\n }\n },\n \"pagos_codes\": {},\n \"amount_refunded\": 1,\n \"transaction_order_id\": \"<string>\",\n \"dispute_response\": {\n \"status\": \"<string>\",\n \"reason_code\": \"<string>\",\n \"reason\": \"<string>\"\n },\n \"additional_data\": {\n \"merchant_account_id\": \"<string>\",\n \"order_id\": \"<string>\",\n \"acquirer_reference_number\": \"<string>\",\n \"metadata\": {}\n }\n}"

response = http.request(request)
puts response.read_body

Path Parameters

account_id
string
required

Body

application/json
dispute_id
string
required

A unique value that identifies the dispute and will be used as the key when making updates to disputes. Maximum 255 characters.

Required string length: 1 - 255
amount
integer
required

The dispute amount, represented as a positive integer in the smallest currency unit (e.g. two-decimal currency such as $101.50 is represented as 10150, zero-decimal currency such as ¥1095 is represented as 1095). Refer to the ISO 4217 currency page for guidance.

Required range: x >= 0
currency
string
required

The currency of the dispute, represented by the 3-letter ISO-4217 currency code. Must be three characters.

Required string length: 3
created
string
required

The date when the dispute was created, represented in ISO 8601 format (e.g. 2023-09-04T16:13:05Z).

transaction_id
string
required

The transaction ID of the original transaction associated with the dispute. Maximum 255 characters.

Maximum string length: 255
payment_method_details
object
required
pagos_codes
object
required
amount_refunded
integer | null

The amount refunded to the customer, represented as a positive integer in the smallest currency unit (e.g. two-decimal currency such as $101.50 is represented as 10150, zero-decimal currency such as ¥1095 is represented as 1095). The value is unsigned. Refer to the ISO 4217 currency page for guidance.

Required range: x >= 0
transaction_order_id
string | null

The merchant order reference of the original transaction associated with the dispute. Maximum 255 characters.

Maximum string length: 255
dispute_response
object | null
additional_data
object | null

Response

201 - undefined