Authorize invoice with PIN
JSON API v3
POST /api/v3/projects/{projectId}/invoices/{invoiceId}/authorize
Authorizes a created invoice using a PIN code (delivered to the customer via SMS).
The sandbox sends no SMS — the correct PIN is a fixed 1234. Other values return
422 INVOICE_NOT_AUTHORIZED with the number of attempts left; after three failed
attempts the invoice returns 422 INVOICE_AUTH_ATTEMPTS_EXCEEDED and stops accepting
authorization altogether, the correct PIN included. The correct PIN moves the invoice to
active and raises authorization.; the scheduled billing outcome still
applies as usual.
v4 signature payload: {invoice_id}{pin_code}{client_ip}
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
projectId | integer (int32) | yes | |
invoiceId | string (uuid) | yes |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
client_ip | string | — | |
pin_code | string | — | PIN code entered by the customer |
additional_parameters | object | — | Arbitrary invoice parameters stored with the invoice, the JSON counterpart of the XML <AdditionalParameters>/<Parameter name= value=/> block. Parameter names are case-insensitive and must be unique. On cancel/refund/authorize the given values are merged into the ones already stored: names that match are overwritten, the rest are kept. |
Request example
{
"pin_code": "1234"
}Response example
{
"success": true,
"data": {
"invoice_id": "0d0f3c58-9b1e-4a77-9a0c-000000000001",
"status": "Authorize"
}
}Response codes
| Code | Description |
|---|---|
200 | Invoice authorized |
400 | Validation or business request error |
401 | Authentication failed (missing/invalid signature or timestamp) |
403 | Project access denied or IP not whitelisted |
404 | Invoice not found |
422 | Business validation error |
500 | Unexpected platform error |
503 | Service temporarily unavailable |