### Pagination Examples Source: https://docs.onvopay.com/reference/pagination Examples demonstrating how to fetch the first page, the next page, and the previous page using curl. ```APIDOC ## Pagination Examples ### First Page ```bash curl "https://api.onvopay.com/v1/customers?limit=10" \ -H "Authorization: Bearer onvo_test_secret_key_..." ``` ### Next Page ```bash curl "https://api.onvopay.com/v1/customers?limit=10&startingAfter=cl40muorw00493ndp0okzk2g3" \ -H "Authorization: Bearer onvo_test_secret_key_..." ``` ### Previous Page ```bash curl "https://api.onvopay.com/v1/customers?limit=10&endingBefore=cl40muorw00493ndp0okzk2g3" \ -H "Authorization: Bearer onvo_test_secret_key_..." ``` When the response includes `meta`, you can use the response cursors to construct the next request. ``` -------------------------------- ### GET /v1/products Source: https://docs.onvopay.com/api/listar-todos-los-productos Retrieves a list of all available products. Refer to ONVO documentation for integration details and examples. ```APIDOC ## GET /v1/products ### Description Retrieves a list of all available products. Refer to ONVO documentation for integration details and examples. ### Method GET ### Endpoint /v1/products ### Response #### Success Response (200) - **products** (array) - A list of products. ``` -------------------------------- ### GET /v1/customers Source: https://docs.onvopay.com/api/listar-todos-los-clientes Retrieves a list of all customers. Refer to ONVO documentation for integration details and examples. ```APIDOC ## GET /v1/customers ### Description Retrieves a list of all customers. Refer to ONVO documentation for integration details and examples. ### Method GET ### Endpoint /v1/customers ``` -------------------------------- ### GET /v1/products/{id} Source: https://docs.onvopay.com/api/obtener-un-producto Retrieves a specific product's details by its unique identifier. ```APIDOC ## GET /v1/products/{id} ### Description Retrieves a specific product's details by its unique identifier. ### Method GET ### Endpoint /v1/products/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the product to retrieve. ``` -------------------------------- ### GET /v1/prices Source: https://docs.onvopay.com/api/listar-todos-los-precios Retrieves a list of all available prices. ```APIDOC ## GET /v1/prices ### Description Retrieves a list of all available prices. ### Method GET ### Endpoint /v1/prices ### Parameters #### Query Parameters (No query parameters are explicitly documented in the source) #### Request Body (No request body is explicitly documented in the source) ### Response #### Success Response (200) (No specific response fields are documented in the source. Refer to the OpenAPI YAML for details.) #### Response Example (No response example is explicitly documented in the source. Refer to the OpenAPI YAML for details.) ``` -------------------------------- ### Get a Price Source: https://docs.onvopay.com/llms.txt Retrieves a specific price by its identifier. Use this to get detailed information about a particular pricing option. ```APIDOC ## GET /prices/{id} ### Description Retrieves a specific price. ### Method GET ### Endpoint /prices/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the price to retrieve. ### Response #### Success Response (200) - **id** (string) - The unique identifier for the price. - **product_id** (string) - The ID of the product this price applies to. - **unit_amount** (number) - The price per unit. - **currency** (string) - The currency of the price. #### Response Example { "id": "price_1", "product_id": "prod_abc", "unit_amount": 2000, "currency": "USD" } ``` -------------------------------- ### Fetch Next Page of Customers Source: https://docs.onvopay.com/reference/pagination To get the subsequent page of results, use the `startingAfter` parameter with the ID of the last item from the previous response. This allows for forward pagination. ```bash curl "https://api.onvopay.com/v1/customers?limit=10&startingAfter=cl40muorw00493ndp0okzk2g3" \ -H "Authorization: Bearer onvo_test_secret_key_..." ``` -------------------------------- ### GET /v1/checkout/sessions/link/{paymentLinkId} Source: https://docs.onvopay.com/api/crear-una-sesion-desde-un-link-de-pago Creates a Checkout session from an existing payment link. ```APIDOC ## GET /v1/checkout/sessions/link/{paymentLinkId) ### Description Creates a Checkout session from an existing payment link. ### Method GET ### Endpoint /v1/checkout/sessions/link/{paymentLinkId} ### Parameters #### Path Parameters - **paymentLinkId** (string) - Required - The ID of the payment link to use for creating the session. ``` -------------------------------- ### POST /v1/customers Source: https://docs.onvopay.com/api/crear-un-cliente Creates a new customer in the ONVO system. Refer to the ONVO documentation for integration details and examples. ```APIDOC ## POST /v1/customers ### Description Creates a new customer. ### Method POST ### Endpoint /v1/customers ### Request Body Refer to the ONVO documentation for request body details. ### Response Refer to the ONVO documentation for response details. ``` -------------------------------- ### Update a Customer Source: https://docs.onvopay.com/llms.txt Consult ONVO documentation for integration details and examples. ```APIDOC ## Update a Customer ### Description Consult ONVO documentation for integration details and examples. ### Method PUT ### Endpoint /v1/customers/{customer_id} ### Parameters #### Path Parameters - **customer_id** (string) - Required - The ID of the customer. #### Request Body - **email** (string) - Optional - The customer's email address. - **phone** (string) - Optional - The customer's phone number. - **firstName** (string) - Optional - The customer's first name. - **lastName** (string) - Optional - The customer's last name. ``` -------------------------------- ### GET /v1/coupons Source: https://docs.onvopay.com/api/listar-cupones Retrieves a list of coupons that have been created using an API key. ```APIDOC ## GET /v1/coupons ### Description Retrieves a list of coupons that have been created using an API key. ### Method GET ### Endpoint /v1/coupons ### Response #### Success Response (200) - **coupons** (array) - A list of coupon objects. - **id** (string) - The unique identifier for the coupon. - **code** (string) - The coupon code. - **discount_type** (string) - The type of discount (e.g., 'percentage', 'fixed'). - **discount_value** (number) - The value of the discount. - **expiration_date** (string) - The date when the coupon expires (ISO 8601 format). - **created_at** (string) - The date and time when the coupon was created (ISO 8601 format). - **updated_at** (string) - The date and time when the coupon was last updated (ISO 8601 format). ### Response Example ```json { "coupons": [ { "id": "coupon_123", "code": "SUMMER20", "discount_type": "percentage", "discount_value": 20, "expiration_date": "2024-12-31T23:59:59Z", "created_at": "2023-01-01T10:00:00Z", "updated_at": "2023-01-01T10:00:00Z" } ] } ``` ``` -------------------------------- ### GET /v1/checkout/sessions/one-time-link/account Source: https://docs.onvopay.com/api/listar-sesiones-de-checkout Retrieves a list of checkout sessions. ```APIDOC ## GET /v1/checkout/sessions/one-time-link/account ### Description Retrieves a list of checkout sessions. ### Method GET ### Endpoint /v1/checkout/sessions/one-time-link/account ``` -------------------------------- ### Create Payment Method with Card (Python) Source: https://docs.onvopay.com/openapi.yaml Use this snippet to create a payment method by providing card details. Ensure you have the 'requests' and 'json' libraries installed. ```Python import requests import json headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' } data = { 'type': 'card', 'card': { 'number': '4242424242424242', 'expMonth': 12, 'expYear': 2026, 'cvv': '123', 'holderName': 'John Doe' }, 'billing': { 'address': { 'country': 'CR', }, 'name': 'John Doe', 'phone': '+50688880000' } } response = requests.post('https://api.onvopay.com/v1/payment-methods', headers=headers, data=json.dumps(data)) print(response.json()) ``` -------------------------------- ### Publishable API Key Example Source: https://docs.onvopay.com/openapi.yaml Use Publishable API Keys for client-side code, such as creating new payment methods or authenticating the SDK. The Authorization header must include 'Bearer ' followed by the key. ```http 'Authorization': 'Bearer onvo_test_publishable_key_VL3ln7fwTC1DiJGvGE0H5A-XYPNJDmoGtwcduXYTRtsuKRc4d1PXEh33Ju9RZRXGJkX0KsRV5-F540ciRCQosQ' ``` -------------------------------- ### POST /v1/refunds Source: https://docs.onvopay.com/api/crear-un-reembolso Initiates the creation of a refund. Refer to ONVO documentation for integration details and examples. ```APIDOC ## POST /v1/refunds ### Description Initiates the creation of a refund. ### Method POST ### Endpoint /v1/refunds ### Parameters #### Request Body Refer to ONVO documentation for integration details and examples. ``` -------------------------------- ### Create Payment Method with Card (PHP) Source: https://docs.onvopay.com/openapi.yaml A PHP example for creating a payment method with card information using cURL. Ensure JSON encoding is handled correctly. ```PHP $headers = array( 'Content-Type' => 'application/json', 'Authorization' => 'Bearer ' ); $data = array( 'type' => 'card', 'card' => array( 'number' => '4242424242424242', 'expMonth' => 12, 'expYear' => 2026, 'cvv' => '123', 'holderName' => 'John Doe' ), 'billing' => array( 'address' => array( 'country' => 'CR', ), 'name' => 'John Doe', 'phone' => '+50688880000' ) ); $response = curl_init('https://api.onvopay.com/v1/payment-methods'); curl_setopt($response, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($response, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($response, CURLOPT_RETURNTRANSFER, true); curl_setopt($response, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($response); print_r(json_decode($response, true)); ``` -------------------------------- ### GET /v1/customers/{id}/payment-methods Source: https://docs.onvopay.com/api/obtener-los-metodos-de-pago-de-un-cliente Retrieves a list of payment methods for a given customer ID. ```APIDOC ## GET /v1/customers/{id}/payment-methods ### Description Retrieves the payment methods associated with a specific customer. ### Method GET ### Endpoint `/v1/customers/{id}/payment-methods` ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the customer. ``` -------------------------------- ### Get a Customer Source: https://docs.onvopay.com/llms.txt Retrieves a specific customer by their identifier. Use this to view detailed information about a customer. ```APIDOC ## GET /customers/{id} ### Description Retrieves a specific customer. ### Method GET ### Endpoint /customers/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the customer to retrieve. ### Response #### Success Response (200) - **id** (string) - The unique identifier for the customer. - **name** (string) - The name of the customer. - **email** (string) - The email address of the customer. #### Response Example { "id": "cust_1a2b3c", "name": "John Doe", "email": "john.doe@example.com" } ``` -------------------------------- ### GET /v1/prices/{id} Source: https://docs.onvopay.com/api/obtener-un-precio Obtiene los detalles de un precio específico a través de su ID. ```APIDOC ## GET /v1/prices/{id} ### Description Obtiene los detalles de un precio específico a través de su ID. ### Method GET ### Endpoint /v1/prices/{id} ### Parameters #### Path Parameters - **id** (string) - Required - El identificador único del precio a consultar. ``` -------------------------------- ### Create Shipping Rate Source: https://docs.onvopay.com/openapi.yaml Creates a shipping rate. Refer to ONVO documentation for integration details and examples. ```APIDOC ## POST /v1/shipping-rates ### Description Creates a shipping rate. ### Method POST ### Endpoint /v1/shipping-rates ### Request Body - $ref: "#/components/requestBodies/CreateShippingRate" ### Response #### Success Response (201) - $ref: "#/components/schemas/ShippingRate" #### Error Response (400) - $ref: "#/components/schemas/ValidationError" #### Error Response (401) - $ref: "#/components/schemas/UnauthorizedError" #### Error Response (403) - $ref: "#/components/schemas/ForbiddenError" ``` -------------------------------- ### GET /v1/refunds/{id} Source: https://docs.onvopay.com/api/obtener-un-reembolso Este endpoint permite consultar los detalles de un reembolso específico utilizando su ID. ```APIDOC ## GET /v1/refunds/{id} ### Description Consulta los detalles de un reembolso específico. ### Method GET ### Endpoint /v1/refunds/{id} ### Parameters #### Path Parameters - **id** (string) - Required - El identificador único del reembolso a consultar. ``` -------------------------------- ### Get a Coupon Source: https://docs.onvopay.com/llms.txt Retrieves a specific coupon by its identifier. This is useful for inspecting the details of a single coupon. ```APIDOC ## GET /coupons/{id} ### Description Retrieves a coupon by its identifier. ### Method GET ### Endpoint /coupons/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the coupon to retrieve. ### Response #### Success Response (200) - **id** (string) - The unique identifier for the coupon. - **name** (string) - The name of the coupon. - **discount_percentage** (number) - The discount percentage offered by the coupon. - **expiration_date** (string) - The date when the coupon expires. #### Response Example { "id": "coupon_123", "name": "SUMMER20", "discount_percentage": 20, "expiration_date": "2024-12-31" } ``` -------------------------------- ### List Shipping Rates Source: https://docs.onvopay.com/openapi.yaml Lists all available shipping rates. Refer to ONVO documentation for integration details and examples. ```APIDOC ## GET /v1/shipping-rates ### Description Lists all available shipping rates. ### Method GET ### Endpoint /v1/shipping-rates ``` -------------------------------- ### Confirm a Subscription Source: https://docs.onvopay.com/openapi.yaml Confirms a recurring charge for a subscription. Refer to ONVO documentation for integration details and examples. ```APIDOC ## POST /v1/subscriptions/{id}/confirm ### Description Confirms a recurring charge for a subscription. ### Method POST ### Endpoint /v1/subscriptions/{id}/confirm ### Parameters #### Path Parameters - **id** (string) - Required - Unique identifier of the object. ### Request Body - $ref: "#/components/requestBodies/ConfirmSubscription" ### Response #### Success Response (201) - $ref: "#/components/schemas/Subscription" ``` -------------------------------- ### Get a Payment Method Source: https://docs.onvopay.com/llms.txt Retrieves details of a specific payment method. Use this to inspect the configuration or status of a payment method. ```APIDOC ## GET /payment_methods/{id} ### Description Retrieves a specific payment method. ### Method GET ### Endpoint /payment_methods/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the payment method to retrieve. ### Response #### Success Response (200) - **id** (string) - The unique identifier for the payment method. - **type** (string) - The type of payment method. - **details** (object) - Additional details about the payment method. #### Response Example { "id": "pm_4d5e6f", "type": "card", "details": { "brand": "Visa", "last4": "4242" } } ``` -------------------------------- ### Add Item to Subscription Source: https://docs.onvopay.com/openapi.yaml Adds an item to a recurring charge for a subscription. Refer to ONVO documentation for integration details and examples. ```APIDOC ## POST /v1/subscriptions/{id}/items ### Description Adds an item to a recurring charge for a subscription. ### Method POST ### Endpoint /v1/subscriptions/{id}/items ### Parameters #### Path Parameters - **id** (string) - Required - Unique identifier of the recurring charge. ### Request Body - $ref: "#/components/requestBodies/AddItem" ### Response #### Success Response (201) - $ref: "#/components/schemas/SubscriptionAditionalItem" ``` -------------------------------- ### Delete Subscription Item Source: https://docs.onvopay.com/openapi.yaml Deletes an item from a recurring charge for a subscription. Refer to ONVO documentation for integration details and examples. ```APIDOC ## DELETE /v1/subscriptions/{id}/items/{itemId} ### Description Deletes an item from a recurring charge for a subscription. ### Method DELETE ### Endpoint /v1/subscriptions/{id}/items/{itemId} ### Parameters #### Path Parameters - **id** (string) - Required - Unique identifier of the recurring charge. - **itemId** (string) - Required - Unique identifier of the item. ### Response #### Success Response (200) - Description: "Success" ``` -------------------------------- ### Create Subscription with Immediate Payment Source: https://docs.onvopay.com/payments/subscriptions Use this snippet to create a subscription and charge the customer immediately for the first period. This is the default behavior if `paymentBehavior` is omitted and `paymentMethodId` is provided. ```bash curl https://api.onvopay.com/v1/subscriptions \ -X POST \ -H "Authorization: Bearer $ONVO_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "customerId": "$CUSTOMER_ID", "paymentMethodId": "$PAYMENT_METHOD_ID", "description": "Plan Pro mensual", "items": [ { "priceId": "$PRICE_ID", "quantity": 1 } ], "metadata": { "accountPlan": "pro", "internalSubscriptionId": "sub_123" } }' ``` -------------------------------- ### Listar todos los Métodos de pago Source: https://docs.onvopay.com/api/listar-todos-los-metodos-de-pago Este endpoint te permite obtener una lista de todos los métodos de pago que ONVO soporta para tu integración. ```APIDOC ## GET /v1/payment-methods ### Description Obtiene una lista de todos los métodos de pago disponibles. ### Method GET ### Endpoint /v1/payment-methods ### Parameters No se especifican parámetros de ruta, consulta o cuerpo para esta solicitud. ### Request Example No se requiere cuerpo de solicitud para esta solicitud GET. ### Response #### Success Response (200) La respuesta contendrá una lista de métodos de pago. Los detalles específicos de la estructura de la respuesta no se proporcionan en el texto fuente, pero típicamente incluirían identificadores y nombres de los métodos de pago. #### Response Example ```json { "example": "[Estructura de respuesta detallada no proporcionada en el texto fuente]" } ``` ``` -------------------------------- ### Set Up ONVO API Keys Source: https://docs.onvopay.com/getting-started Export your ONVO test secret and publishable keys as environment variables. These keys are used for testing and do not interact with real banking networks. ```bash export ONVO_SECRET_KEY="onvo_test_secret_key_..." export ONVO_PUBLISHABLE_KEY="onvo_test_publishable_key_..." ``` -------------------------------- ### Confirm Payment Intent with Credix Installments Source: https://docs.onvopay.com/payments/credix Confirms a payment intent using a Credix payment method. The `credixInstallmentMonths` field is mandatory and specifies the payment term (e.g., 1 for cash payment or a configured installment plan). ```bash curl https://api.onvopay.com/v1/payment-intents/$PAYMENT_INTENT_ID/confirm \ -X POST \ -H "Authorization: Bearer $ONVO_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ \ "paymentMethodId": "cl502zv0d0127ebdp3zt27651", \ "credixInstallmentMonths": 3 \ }' ``` -------------------------------- ### Create Payment Intent Source: https://docs.onvopay.com/payments/credix Initiates a payment transaction for a specific amount and currency. This is the first step in the payment flow. ```bash curl https://api.onvopay.com/v1/payment-intents \ -X POST \ -H "Authorization: Bearer $ONVO_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ \ "amount": 500000, \ "currency": "CRC", \ "description": "Pago Credix #1001" \ }' ``` -------------------------------- ### GET /v1/checkout/sessions/{id} Source: https://docs.onvopay.com/api/obtener-una-sesion-de-checkout Retrieves a Checkout session by its identifier. ```APIDOC ## GET /v1/checkout/sessions/{id} ### Description Returns a Checkout session by its identifier. ### Method GET ### Endpoint `/v1/checkout/sessions/{id}` ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the checkout session. ``` -------------------------------- ### Create Subscription with Immediate Payment Source: https://docs.onvopay.com/payments/subscriptions Creates a new subscription and immediately charges the first period using the provided payment method. If `paymentBehavior` is omitted, ONVO defaults to immediate confirmation. ```APIDOC ## POST /v1/subscriptions ### Description Creates a new subscription and immediately charges the first period using the provided payment method. If `paymentBehavior` is omitted, ONVO defaults to immediate confirmation. ### Method POST ### Endpoint https://api.onvopay.com/v1/subscriptions ### Parameters #### Request Body - **customerId** (string) - Required - The ID of the customer. - **paymentMethodId** (string) - Required - The ID of the payment method to use for the first charge. - **description** (string) - Required - A description for the subscription. - **items** (array) - Required - A list of items included in the subscription. - **priceId** (string) - Required - The ID of the price for the item. - **quantity** (integer) - Required - The quantity of the item. - **metadata** (object) - Optional - Additional metadata for the subscription. - **accountPlan** (string) - Optional - The account plan associated with the subscription. - **internalSubscriptionId** (string) - Optional - An internal ID for the subscription. ### Request Example ```json { "customerId": "$CUSTOMER_ID", "paymentMethodId": "$PAYMENT_METHOD_ID", "description": "Plan Pro mensual", "items": [ { "priceId": "$PRICE_ID", "quantity": 1 } ], "metadata": { "accountPlan": "pro", "internalSubscriptionId": "sub_123" } } ``` ### Response #### Success Response (200) - **subscriptionId** (string) - The ID of the created subscription. - **status** (string) - The status of the subscription. - **chargeId** (string) - The ID of the initial charge. - **paymentIntentId** (string) - The ID of the payment intention. #### Response Example ```json { "subscriptionId": "sub_abc123", "status": "active", "chargeId": "ch_xyz789", "paymentIntentId": "pi_def456" } ``` ``` -------------------------------- ### Listar todas las tarifas de envío Source: https://docs.onvopay.com/api/listar-todas-las-tarifas-de-envio Este endpoint permite obtener un listado completo de todas las tarifas de envío configuradas en el sistema. ```APIDOC ## GET /v1/shipping-rates ### Description Obtiene una lista de todas las tarifas de envío disponibles. ### Method GET ### Endpoint /v1/shipping-rates ``` -------------------------------- ### Update a Recurring Charge Source: https://docs.onvopay.com/llms.txt Consult ONVO documentation for integration details and examples. ```APIDOC ## Update a Recurring Charge ### Description Consult ONVO documentation for integration details and examples. ### Method PUT ### Endpoint /v1/recurring-charges/{charge_id} ### Parameters #### Path Parameters - **charge_id** (string) - Required - The ID of the recurring charge. #### Request Body - **description** (string) - Optional - A description for the recurring charge. - **next_charge_date** (string) - Optional - The date for the next charge (YYYY-MM-DD). ``` -------------------------------- ### POST /v1/prices Source: https://docs.onvopay.com/api/crear-un-precio Permite crear un nuevo precio en el sistema. Consulte la documentación de ONVO para obtener detalles de integración y ejemplos. ```APIDOC ## POST /v1/prices ### Description Permite crear un nuevo precio en el sistema. ### Method POST ### Endpoint /v1/prices ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ``` -------------------------------- ### Fetch First Page of Customers Source: https://docs.onvopay.com/reference/pagination Use this snippet to retrieve the initial set of customer records. The `limit` parameter controls the number of items per page, defaulting to 10 if not specified. ```bash curl "https://api.onvopay.com/v1/customers?limit=10" \ -H "Authorization: Bearer onvo_test_secret_key_..." ``` -------------------------------- ### GET /v1/invoices/{id} Source: https://docs.onvopay.com/api/obtener-una-renovacion Retrieves a specific renewal using its unique identifier. ```APIDOC ## GET /v1/invoices/{id} ### Description Returns a specific renewal. Renewals represent each billing period of a recurring charge. ONVO creates a renewal at the start of the subscription and on each successful renewal. Each renewal is associated with a payment intent and allows querying the charge corresponding to that period. ### Method GET ### Endpoint `/v1/invoices/{id}` ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the renewal to retrieve. ``` -------------------------------- ### Create Subscription with Deferred Payment Confirmation Source: https://docs.onvopay.com/payments/subscriptions Use this snippet to create a subscription without immediate payment. The payment will be confirmed in a separate request later. `paymentMethodId` can be omitted during creation in this mode. ```bash curl https://api.onvopay.com/v1/subscriptions \ -X POST \ -H "Authorization: Bearer $ONVO_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "customerId": "$CUSTOMER_ID", "paymentBehavior": "allow_incomplete", "description": "Plan Pro mensual", "items": [ { "priceId": "$PRICE_ID", "quantity": 1 } ], "metadata": { "accountPlan": "pro", "internalSubscriptionId": "sub_123" } }' ``` -------------------------------- ### Obtener un Método de Pago por ID Source: https://docs.onvopay.com/api/obtener-un-metodo-de-pago Este endpoint te permite obtener los detalles de un método de pago específico proporcionando su ID. ```APIDOC ## GET /v1/payment-methods/{id} ### Description Obtiene los detalles de un método de pago específico. ### Method GET ### Endpoint /v1/payment-methods/{id} ### Parameters #### Path Parameters - **id** (string) - Required - El identificador único del método de pago. ``` -------------------------------- ### Update Item of a Recurring Charge Source: https://docs.onvopay.com/llms.txt Consult ONVO documentation for integration details and examples. ```APIDOC ## Update Item of a Recurring Charge ### Description Consult ONVO documentation for integration details and examples. ### Method PUT ### Endpoint /v1/recurring-charges/{charge_id}/items/{item_id} ### Parameters #### Path Parameters - **charge_id** (string) - Required - The ID of the recurring charge. - **item_id** (string) - Required - The ID of the item to update. #### Request Body - **quantity** (integer) - Optional - The new quantity of the item. - **price** (string) - Optional - The new price of the item. ``` -------------------------------- ### Obtener un Producto Source: https://docs.onvopay.com/llms-full.txt Retrieves details about a specific product. ```APIDOC ## GET /v1/products/{id} ### Description Retrieves details about a specific product. Consult ONVO documentation for integration details and examples. ### Method GET ### Endpoint `/v1/products/{id}` ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the product to retrieve. ``` -------------------------------- ### Actualizar Producto Source: https://docs.onvopay.com/api/actualizar-un-producto Utiliza este endpoint para modificar los detalles de un producto existente. Debes proporcionar el ID del producto en la URL y la información actualizada en el cuerpo de la solicitud. ```APIDOC ## POST /v1/products/{id} ### Description Actualiza la información de un producto existente. ### Method POST ### Endpoint /v1/products/{id} ### Parameters #### Path Parameters - **id** (string) - Required - El identificador único del producto a actualizar. ### Request Body Se espera un objeto JSON con los campos del producto que deseas actualizar. Por ejemplo: ```json { "name": "string", "description": "string", "price": 0, "stock": 0 } ``` ### Request Example ```json { "name": "Producto Actualizado", "price": 25.50, "stock": 150 } ``` ### Response #### Success Response (200) La respuesta contendrá el objeto del producto actualizado. ```json { "id": "string", "name": "string", "description": "string", "price": 0, "stock": 0, "createdAt": "string", "updatedAt": "string" } ``` #### Response Example ```json { "id": "prod_12345", "name": "Producto Actualizado", "description": "Descripción actualizada del producto.", "price": 25.50, "stock": 150, "createdAt": "2023-10-27T10:00:00Z", "updatedAt": "2023-10-27T10:30:00Z" } ``` ``` -------------------------------- ### GET /v1/coupons/{id} Source: https://docs.onvopay.com/api/obtener-un-cupon Retrieves a specific coupon by its ID. This is a direct lookup operation. ```APIDOC ## GET /v1/coupons/{id} ### Description Retrieves a specific coupon by its ID. ### Method GET ### Endpoint /v1/coupons/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the coupon to retrieve. ``` -------------------------------- ### List Products Source: https://docs.onvopay.com/llms.txt Lists all available products. This endpoint provides an overview of the products offered. ```APIDOC ## GET /products ### Description Lists all products. ### Method GET ### Endpoint /products ### Response #### Success Response (200) - **products** (array) - A list of product objects. - **id** (string) - The unique identifier for the product. - **name** (string) - The name of the product. - **description** (string) - A description of the product. #### Response Example { "products": [ { "id": "prod_abc", "name": "Premium Subscription", "description": "Monthly access to premium features." } ] } ``` -------------------------------- ### Get Customer by ID Source: https://docs.onvopay.com/api/obtener-un-cliente Fetches the details of a specific customer using their unique ID. ```APIDOC ## GET /v1/customers/{id} ### Description Retrieves the details of a specific customer using their unique ID. ### Method GET ### Endpoint /v1/customers/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the customer. ``` -------------------------------- ### Listar todas las Intenciones de pago Source: https://docs.onvopay.com/api/listar-todas-las-intenciones-de-pago Este endpoint permite consultar todas las intenciones de pago asociadas a una cuenta. ```APIDOC ## GET /v1/payment-intents/account ### Description Consulta todas las intenciones de pago asociadas a una cuenta. ### Method GET ### Endpoint /v1/payment-intents/account ``` -------------------------------- ### Get a Refund Source: https://docs.onvopay.com/llms.txt Retrieves a specific refund by its identifier. This endpoint allows inspection of refund details. ```APIDOC ## GET /refunds/{id} ### Description Retrieves a specific refund. ### Method GET ### Endpoint /refunds/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the refund to retrieve. ### Response #### Success Response (200) - **id** (string) - The unique identifier for the refund. - **payment_intent_id** (string) - The ID of the original payment intent. - **amount** (number) - The amount refunded. - **status** (string) - The status of the refund. #### Response Example { "id": "ref_uvw", "payment_intent_id": "pi_abcde", "amount": 500, "status": "succeeded" } ``` -------------------------------- ### GET /v1/payment-methods/{id}/verification Source: https://docs.onvopay.com/api/obtener-verificacion-de-un-metodo-de-pago Retrieves the verification status for a given payment method ID. ```APIDOC ## GET /v1/payment-methods/{id}/verification ### Description Returns the verification status associated with a payment method. ### Method GET ### Endpoint `/v1/payment-methods/{id}/verification` ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the payment method. ``` -------------------------------- ### Apply Direct Coupon to One-Time Link Source: https://docs.onvopay.com/checkout/one-time-links To create a one-time link with a discount, add the `discounts` array to the session payload. Use the `coupon` field to specify the ID of the coupon. Ensure the coupon is active, in the correct mode, and has the appropriate scope and application. ```json { "discounts": [ { "coupon": "cpn_abc123" } ] } ``` -------------------------------- ### Get Shipping Rate by ID Source: https://docs.onvopay.com/api/obtener-una-tarifa-de-envio Fetches a specific shipping rate using its unique identifier. ```APIDOC ## GET /v1/shipping-rates/{id} ### Description Retrieves the details of a specific shipping rate using its ID. ### Method GET ### Endpoint /v1/shipping-rates/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the shipping rate. ``` -------------------------------- ### Create Payment Method with Card (C#) Source: https://docs.onvopay.com/openapi.yaml This C# code snippet shows how to create a payment method using HttpClient. It serializes the data to JSON and sends a POST request. ```C# using System; using System.Net.Http; using System.Net.Http.Headers; using System.Text; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System.Collections.Generic; using System.Threading.Tasks; namespace OnvopaySamples { public class PaymentMethods { public static async Task CreatePaymentMethod() { var client = new HttpClient(); client.DefaultRequestHeaders.Accept.Clear(); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); client.DefaultRequestHeaders.Add("Authorization", "Bearer "); var data = new Dictionary(); data.Add("type", "card"); data.Add("card", new Dictionary()); data["card"].Add("number", "4242424242424242"); data["card"].Add("expMonth", 12); data["card"].Add("expYear", 2026); data["card"].Add("cvv", "123"); data["card"].Add("holderName", "John Doe"); data.Add("billing", new Dictionary()); data["billing"].Add("address", new Dictionary()); data["billing"]["address"].Add("country", "CR"); data["billing"].Add("name", "John Doe"); data["billing"].Add("phone", "+50688880000"); var json = JsonConvert.SerializeObject(data); var content = new StringContent(json, Encoding.UTF8, "application/json"); var response = await client.PostAsync("https://api.onvopay.com/v1/payment-methods", content); var responseString = await response.Content.ReadAsStringAsync(); return responseString; } } } ``` -------------------------------- ### GET /v1/subscriptions Source: https://docs.onvopay.com/api/listar-todos-los-cargos-recurrentes Retrieves a list of all recurring charges. This endpoint is useful for managing and tracking subscription-based payments. ```APIDOC ## GET /v1/subscriptions ### Description Retrieves a list of all recurring charges. This endpoint is useful for managing and tracking subscription-based payments. ### Method GET ### Endpoint /v1/subscriptions ### Parameters ### Request Example ### Response #### Success Response (200) #### Response Example ``` -------------------------------- ### POST /v1/products Source: https://docs.onvopay.com/api/crear-un-producto Creates a new product in the ONVO system. This endpoint allows you to define product details that can be used for various services and offerings. ```APIDOC ## POST /v1/products ### Description Creates a new product in the ONVO system. This endpoint allows you to define product details that can be used for various services and offerings. ### Method POST ### Endpoint /v1/products ### Request Body Refer to the ONVO API integration documentation for detailed request body structure and examples. ``` -------------------------------- ### Actualizar Cliente Source: https://docs.onvopay.com/api/actualizar-un-cliente Permite modificar los detalles de un cliente existente utilizando su identificador único. ```APIDOC ## POST /v1/customers/{id} ### Description Actualiza la información de un cliente existente. ### Method POST ### Endpoint /v1/customers/{id} ### Parameters #### Path Parameters - **id** (string) - Required - El identificador único del cliente a actualizar. ``` -------------------------------- ### Create Payment Intent Source: https://docs.onvopay.com/payments/sinpe-pin Use this endpoint to create a payment intent for a specific amount and currency. Ensure the currency is set to 'CRC' for SINPE PIN. ```bash curl https://api.onvopay.com/v1/payment-intents \ -X POST \ -H "Authorization: Bearer $ONVO_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "amount": 500000, "currency": "CRC", "description": "Pago SINPE PIN #1001" }' ``` -------------------------------- ### Obtener las intenciones de pago de un Cliente Source: https://docs.onvopay.com/api/obtener-las-intenciones-de-pago-de-un-cliente Este endpoint recupera una lista de todas las intenciones de pago asociadas a un cliente específico. ```APIDOC ## GET /v1/customers/{id}/payment-intents ### Description Lista las intenciones de pago asociadas a un cliente. ### Method GET ### Endpoint /v1/customers/{id}/payment-intents ### Parameters #### Path Parameters - **id** (string) - Required - El identificador único del cliente. ``` -------------------------------- ### Obtener un Reembolso Source: https://docs.onvopay.com/llms-full.txt Retrieves a specific refund. Consult ONVO's integration documentation for details and examples. ```APIDOC ## GET /v1/refunds/{id} ### Description Retrieves a specific refund. ### Method GET ### Endpoint /v1/refunds/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the refund to retrieve. ``` -------------------------------- ### Create Payment Method with Card (Ruby) Source: https://docs.onvopay.com/openapi.yaml This Ruby code demonstrates how to create a payment method using card details. It utilizes the 'net/http' and 'json' libraries. ```Ruby require 'net/http' require 'json' headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' } data = { 'type': 'card', 'card': { 'number': '4242424242424242', 'expMonth': 12, 'expYear': 2026, 'cvv': '123', 'holderName': 'John Doe' }, 'billing': { 'address': { 'country': 'CR', }, 'name': 'John Doe', 'phone': '+50688880000' } } response = Net::HTTP.post_form(URI.parse('https://api.onvopay.com/v1/payment-methods'), data, headers) puts response.body ``` -------------------------------- ### Create Credix Payment Method Source: https://docs.onvopay.com/payments/credix Sets up a payment method of type 'credix' with the necessary card details. Ensure all required fields like number, expiry, CVV, and holder name are provided. ```bash curl https://api.onvopay.com/v1/payment-methods \ -X POST \ -H "Authorization: Bearer $ONVO_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ \ "type": "credix", \ "credix": { \ "number": "4111111111111111", \ "expMonth": 12, \ "expYear": 2026, \ "cvv": "123", \ "holderName": "María Rodríguez" \ }, \ "billing": { \ "name": "María Rodríguez", \ "email": "maria@example.com" \ } \ }' ``` -------------------------------- ### POST /v1/prices/{id} Source: https://docs.onvopay.com/api/actualizar-un-precio Updates an existing price by its ID. Refer to ONVO documentation for integration details and examples. ```APIDOC ## POST /v1/prices/{id} ### Description Updates an existing price using its unique identifier. ### Method POST ### Endpoint /v1/prices/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the price to update. ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Get a Recurring Charge Source: https://docs.onvopay.com/llms.txt Retrieves a specific recurring charge by its identifier. This is useful for inspecting the details of a particular subscription. ```APIDOC ## GET /recurring_charges/{id} ### Description Retrieves a specific recurring charge. ### Method GET ### Endpoint /recurring_charges/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the recurring charge to retrieve. ### Response #### Success Response (200) - **id** (string) - The unique identifier for the recurring charge. - **customer_id** (string) - The ID of the customer associated with the recurring charge. - **status** (string) - The status of the recurring charge. - **created_at** (string) - The timestamp when the recurring charge was created. #### Response Example { "id": "rc_fghij", "customer_id": "cust_1a2b3c", "status": "active", "created_at": "2023-10-27T10:00:00Z" } ``` -------------------------------- ### Create Payment Intent Source: https://docs.onvopay.com/payments/credix Initiates a payment intent for a specific amount and currency. This is the first step in the payment process. ```APIDOC ## POST /v1/payment-intents ### Description Creates a payment intent for the exact amount to be charged. ### Method POST ### Endpoint https://api.onvopay.com/v1/payment-intents ### Parameters #### Request Body - **amount** (integer) - Required - The amount to charge. - **currency** (string) - Required - The currency of the amount (e.g., "CRC"). - **description** (string) - Optional - A description for the payment intent. ### Request Example { "amount": 500000, "currency": "CRC", "description": "Pago Credix #1001" } ``` -------------------------------- ### Get a Payment Intent Source: https://docs.onvopay.com/llms.txt Retrieves a specific payment intent. Use this to check the status or details of a particular payment. ```APIDOC ## GET /payment_intents/{id} ### Description Retrieves a specific payment intent. ### Method GET ### Endpoint /payment_intents/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the payment intent to retrieve. ### Response #### Success Response (200) - **id** (string) - The unique identifier for the payment intent. - **amount** (number) - The amount of the payment. - **currency** (string) - The currency of the payment. - **status** (string) - The current status of the payment intent. #### Response Example { "id": "pi_abcde", "amount": 1000, "currency": "USD", "status": "succeeded" } ```