Payments
ONVO payment flows are built around payment intents, payment methods, refunds, and asynchronous events.
Related API reference
Main resources
| Resource | Description |
|---|---|
| Payment intent | Represents the attempt to charge an order. |
| Payment method | Instrument used by the buyer. |
| Subscription | Charges a customer periodically using a recurring price. |
| Refund | Full or partial return of a payment. |
| Webhook | Event sent by ONVO when state changes. |
For most integrations, create one intent per order and listen to webhooks to confirm the final result.
Card verification declines
When you create or update a card payment method, ONVO tokenizes and verifies the card before storing its details. If verification fails, the response preserves the general cards.invalid_card_info error and can include details.card with structured information for the merchant.
details.card is optional. When present, it contains these fields:
reason: stable category for choosing the general treatment.declineCode: safe code from the gateway or issuer, or an ONVO fallback value.declineMessage: safe informational text for logging or support.
For example, a decline can return this response:
{
"statusCode": 400,
"type": "OnvoAPIError",
"code": "cards.invalid_card_info",
"message": "There was an error with the card information provided. Please review card number, expiration date and cvv",
"path": "/v1/payment-methods",
"details": {
"card": {
"reason": "issuer_declined",
"declineCode": "55",
"declineMessage": "Incorrect PIN"
}
},
"timestamp": "2026-04-29T17:36:28.477Z"
}
How to interpret reason
| Value | When it is used |
|---|---|
issuer_declined | The issuer declined verification, for example because of incorrect details or a card restriction. |
gateway_declined | The gateway or acquirer explicitly reported a non-technical acceptance, authentication, merchant, or risk rule. |
onvo_declined | ONVO applied an eligibility or security rule, such as a disallowed brand or BIN. |
processor_error | A technical, communication, or configuration problem prevented verification from completing. |
unknown | There was not enough information to attribute the decline safely. |
Use reason for general logic. declineCode is not part of a universal code namespace and can vary by provider; do not build global rules that assume the same code always has the same meaning. declineMessage is also informational: do not parse it for decisions or depend on it for localization.
When no specific decline information is available, ONVO returns the default values: unknown in reason, generic_decline in declineCode, and a generic message in declineMessage.
Recommended handling
- Check the top-level
codefirst to identifycards.invalid_card_info. - If
details.cardexists, usereasonto choose the general buyer experience. - Show your own safe guidance to the buyer; do not expose internal messages or promise that retrying will resolve the decline.
- Record
declineCodeanddeclineMessageonly as context for diagnostics and support.