Visa APIv1
Authentication
API keys, environments, rotation, and what to do if a key leaks.
Send your API key in the X-API-Key header on every request. Plusvisa issues keys to each partner: ask your Plusvisa contact for one.
curl "$PLUSVISA_API_URL/api/v1/countries" -H "X-API-Key: $PLUSVISA_API_KEY"Sandbox and production keys
| Environment | Host | Keys start with |
|---|---|---|
| Sandbox | https://sandbox-sdk.plusvisa.com | pvsdk_test_ |
| Production | https://sdk.plusvisa.com | pvsdk_live_ |
A key only works in its own environment. A sandbox key sent to production, or the reverse, is refused with 401 invalid_api_key before anything else happens.
Rotating a key
Ask us for an additional key and deploy it. The old key keeps working until you ask us to revoke it, so rotation needs no downtime.
- Ask your contact for an additional key.
- Deploy it everywhere your servers call the Visa API.
- Ask us to revoke the old key.
If a key leaks
Contact us straight away and we will revoke it. A revoked key stops working at once with 401 invalid_api_key, and we issue a replacement.
Authentication errors
| Status | code | Meaning |
|---|---|---|
| 401 | missing_api_key | No X-API-Key header was sent. |
| 401 | invalid_api_key | The key is unknown or revoked, belongs to the other environment, or the account is disabled. |