Skip to content

Retrieve the certificate (PFX) — first time only

POST
/certificate_claim
curl --request POST \
--url https://dev-api.tsp.cl/firma_digital/dev/api/partners/v1/certificate_claim \
--header 'Content-Type: application/json' \
--header 'x-gw: <x-gw>' \
--data '{ "p_code": "example", "dni": "18925910-7", "pin": "example" }'

Generates and delivers the certificate for a purchase code that already went through certificate_request (B2C flow). It is one-time only: if the certificate was already claimed, it responds 201 without regenerating it. Does not apply to B2B partners, who receive the certificate automatically during certificate_request.

Media typeapplication/json
object
p_code
required
string
dni
required
string
Example
18925910-7
pin
required

The same PIN sent in certificate_request.

string
/^\d{4}$/

Certificate issued and delivered.

Media typeapplication/json
object
success
boolean
data
object
p_code
string
certificate

Base64-encoded PFX.

string format: byte
validFrom
string format: date-time
validTo
string format: date-time
serialNumber
string
Example
{
"success": true
}

The certificate was already claimed before — not regenerated. error: "ALREADY_ISSUED".

A validation is currently in progress for this purchase code — retry in a few seconds.

Invalid or missing API Key.

The purchase code does not exist, or exists but hasn’t gone through certificate_request yet (identity not validated).

RUT/PIN do not match what was set during certificate_request.