> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.sellercenter.pe/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.sellercenter.pe/_mcp/server.

# 3. Subir comprobante de pago

POST https://qa.api.sellercenter.pe/sellercenter/seller/seller-api-gateway/v1/payment-proof/upload/{orderId}
Content-Type: multipart/form-data

**Paso 3.** Adjunta el comprobante de pago electrónico (boleta o factura) emitido al cliente.

### Headers

| Header          | Valor                  |
| --------------- | ---------------------- |
| `Authorization` | `Bearer <accessToken>` |
| `apiKey`        | apiKey del ambiente    |

### Body (`multipart/form-data`)

| Campo          | Tipo    | Requerido | Descripción                                                            |
| -------------- | ------- | --------- | ---------------------------------------------------------------------- |
| `paymentproof` | archivo | Sí        | Comprobante en **pdf, jpg, jpeg, png, docx o xlsx**. Máximo **10 MB**. |

Ejemplo en cURL:

```bash
curl --location '<URL del gateway>/seller/seller-api-gateway/v1/payment-proof/upload/{orderId}' \
  --header 'apiKey: <apiKey>' \
  --header 'Authorization: Bearer <accessToken>' \
  --form 'paymentproof=@"/ruta/al/comprobante.pdf"'
```

### Respuestas

| Código | Body                                                                                        | Causa                    |
| ------ | ------------------------------------------------------------------------------------------- | ------------------------ |
| `200`  | `{"message": "Se realizo el registro correctamente.", "data": "<archivo>", "status": true}` | Comprobante registrado.  |
| `400`  | `El archivo no cumple con los formatos permitidos(...)`                                     | Extensión no permitida.  |
| `413`  | `{"fault": {... "errorcode": "protocol.http.TooBigBody"}}`                                  | El archivo supera 10 MB. |
| `500`  | `{"message": "La orden no existe", "status": false}`                                        | El `orderId` no existe.  |

Después de subirlo, el **Detalle de orden** muestra el archivo en `paymentProof`, renombrado como `<orderId>-<AAAAMMDDHHmm>.<extensión>`.

Si el comprobante es incorrecto, se puede generar una controversia `CPE` (*Comprobante de pago errado*).

Reference: https://developers.sellercenter.pe/referencia-de-la-api/ordenes/subir-comprobante-de-pago

## Authentication

- `Authorization` header (bearer token, required) — `accessToken` obtenido en **Login**. Dura 24 horas.
- `apiKey` header (required) — apiKey de tu ambiente (QA o PRD). La recibes por correo con tus credenciales.

## Servers

- `https://qa.api.sellercenter.pe/sellercenter` (QA, default)
- `https://prd.api.sellercenter.pe/sellercenter` (PRD)

## Request

### Path parameters

- `orderId` (string, required) — Número de orden.

### Body (multipart/form-data)

This endpoint expects a multipart form containing a file.

- `paymentproof` (file, required) — Comprobante: pdf, jpg, jpeg, png, docx o xlsx. Máximo 10 MB.

## Response

### 200

Comprobante registrado

- `message` (string, optional)
- `data` (string, optional)
- `status` (boolean, optional)

## Errors

### 400 Bad Request Error

Formato no permitido

- `message` (string, optional)
- `data` (SellerSellerApiGatewayV1PaymentProofUploadOrderIdPostResponsesContentApplicationJsonSchemaData, optional)
- `status` (boolean, optional)

### 413 Content Too Large Error

Archivo demasiado grande

- `fault` (SellerSellerApiGatewayV1PaymentProofUploadOrderIdPostResponsesContentApplicationJsonSchemaFault, optional)

### 500 Internal Server Error

Orden inexistente

- `message` (string, optional)
- `data` (any, optional)
- `status` (boolean, optional)

## Types

### SellerSellerApiGatewayV1PaymentProofUploadOrderIdPostResponsesContentApplicationJsonSchemaData

### SellerSellerApiGatewayV1PaymentProofUploadOrderIdPostResponsesContentApplicationJsonSchemaFault

- `faultstring` (string, optional)
- `detail` (SellerSellerApiGatewayV1PaymentProofUploadOrderIdPostResponsesContentApplicationJsonSchemaFaultDetail, optional)

### SellerSellerApiGatewayV1PaymentProofUploadOrderIdPostResponsesContentApplicationJsonSchemaFaultDetail

- `errorcode` (string, optional)

## Examples

**Request**

```json
{
  "paymentproof": "<file: string>"
}
```

**Response**

```json
{
  "message": "Se realizo el registro correctamente.",
  "data": "comprobante_prueba.pdf",
  "status": true
}
```

**SDK Code**

```python Ordenes_subirComprobanteDePago_example
import requests

url = "https://qa.api.sellercenter.pe/sellercenter/seller/seller-api-gateway/v1/payment-proof/upload/1673830516396-01"

files = { "paymentproof": "open('string', 'rb')" }
headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, files=files, headers=headers)

print(response.json())
```

```javascript Ordenes_subirComprobanteDePago_example
const url = 'https://qa.api.sellercenter.pe/sellercenter/seller/seller-api-gateway/v1/payment-proof/upload/1673830516396-01';
const form = new FormData();
form.append('paymentproof', 'string');

const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

options.body = form;

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Ordenes_subirComprobanteDePago_example
package main

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

func main() {

	url := "https://qa.api.sellercenter.pe/sellercenter/seller/seller-api-gateway/v1/payment-proof/upload/1673830516396-01"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"paymentproof\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n")

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

	req.Header.Add("Authorization", "Bearer <token>")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Ordenes_subirComprobanteDePago_example
require 'uri'
require 'net/http'

url = URI("https://qa.api.sellercenter.pe/sellercenter/seller/seller-api-gateway/v1/payment-proof/upload/1673830516396-01")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"paymentproof\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n"

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

```java Ordenes_subirComprobanteDePago_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://qa.api.sellercenter.pe/sellercenter/seller/seller-api-gateway/v1/payment-proof/upload/1673830516396-01")
  .header("Authorization", "Bearer <token>")
  .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"paymentproof\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n")
  .asString();
```

```php Ordenes_subirComprobanteDePago_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://qa.api.sellercenter.pe/sellercenter/seller/seller-api-gateway/v1/payment-proof/upload/1673830516396-01', [
  'multipart' => [
    [
        'name' => 'paymentproof',
        'filename' => 'string',
        'contents' => null
    ]
  ]
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Ordenes_subirComprobanteDePago_example
using RestSharp;

var client = new RestClient("https://qa.api.sellercenter.pe/sellercenter/seller/seller-api-gateway/v1/payment-proof/upload/1673830516396-01");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddParameter("undefined", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"paymentproof\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Ordenes_subirComprobanteDePago_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]
let parameters = [
  [
    "name": "paymentproof",
    "fileName": "string"
  ]
]

let boundary = "---011000010111000001101001"

var body = ""
var error: NSError? = nil
for param in parameters {
  let paramName = param["name"]!
  body += "--\(boundary)\r\n"
  body += "Content-Disposition:form-data; name=\"\(paramName)\""
  if let filename = param["fileName"] {
    let contentType = param["content-type"]!
    let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
    if (error != nil) {
      print(error as Any)
    }
    body += "; filename=\"\(filename)\"\r\n"
    body += "Content-Type: \(contentType)\r\n\r\n"
    body += fileContent
  } else if let paramValue = param["value"] {
    body += "\r\n\r\n\(paramValue)"
  }
}

let request = NSMutableURLRequest(url: NSURL(string: "https://qa.api.sellercenter.pe/sellercenter/seller/seller-api-gateway/v1/payment-proof/upload/1673830516396-01")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```