Skip to main content

Create a Payment Method

POST 

/v1/payment-methods

See the ONVO documentation for integration details and examples.

To avoid 400 validation errors when sending card, validate that card.holderName is non-empty text, card.number is a digits-only string without spaces or separators and passes Luhn, card.expMonth is an integer between 1 and 12, card.expYear is an integer between 2023 and 2100, and card.cvv is a string with 3 or 4 digits when you send it.

For merchant accounts created in Peru, the customer attached to the payment method must have an email address when creating payment methods. You can send customer.email in the payload to create and attach the customer in the same request, or send the customerId of a customer previously created with the email attribute.

When you create a card payment method, ONVO tokenizes and verifies the card before creating the object. If tokenization fails because the card details are invalid, the endpoint responds with 400 and code: "cards.invalid_card_info", and no payment method is created.

Request

Responses

Success