Payments
Payments API
Documentación de la API de payments
Servidor base: https://services.leadconnectorhq.com
Endpoints
- POST /payments/integrations/provider/whitelabel — Crear White-label Integration Provider
- GET /payments/integrations/provider/whitelabel — Listar White-label Integration Providers
- GET /payments/orders — Listar pedidos
- GET /payments/orders/{orderId} — Obtener Order by Id
- POST /payments/orders/{orderId}/record-payment — Record Order Payment
- POST /payments/orders/{orderId}/fulfillments — Crear order fulfillment
- GET /payments/orders/{orderId}/fulfillments — Listar fulfillment
- GET /payments/orders/{orderId}/notes — Listar Order Notes
- GET /payments/transactions — Listar Transactions
- GET /payments/transactions/{transactionId} — Obtener Transaction by Id
- GET /payments/subscriptions — Listar suscripciones
- GET /payments/subscriptions/{subscriptionId} — Obtener Subscription by Id
- GET /payments/coupon/list — Listar Coupons
- POST /payments/coupon — Crear Coupon
- PUT /payments/coupon — Actualizar Coupon
- DELETE /payments/coupon — Eliminar Coupon
- GET /payments/coupon — Fetch Coupon
- POST /payments/custom-provider/provider — Crear new integration
- DELETE /payments/custom-provider/provider — Deleting an existing integration
- GET /payments/custom-provider/connect — Fetch given provider config
- POST /payments/custom-provider/connect — Crear new provider config
- POST /payments/custom-provider/disconnect — Disconnect existing provider config
- PUT /payments/custom-provider/capabilities — Custom-provider marketplace app update capabilities
POST /payments/integrations/provider/whitelabel
Crear White-label Integration Provider The "Create White-label Integration Provider" API allows adding a new payment provider integration to the system which is built on top of Authorize.net or NMI. Use this endpoint to create a integration provider with the specified details. Ensure that the required information is provided in the request payload. This endpoint can be only invoked using marketplace-app token
Scopes requeridos: payments/integration.write
Parametros:
- Versión (header, string) (requerido) — Versión de la API
Cuerpo de la peticion (application/json):
- altId (requerido) — string — location Id / company Id based on altType
- altType (requerido) — string — Alt Type
- uniqueName (requerido) — string — A unique name given to the integration provider, uniqueName must start and end with a character. Only lowercase characters and hyphens (-) are supported
- title (requerido) — string — The title or name of the integration provider.
- provider (requerido) — string — The type of payment provider associated with the integration provider.
- description (requerido) — string — A brief description providing additional information about the integration provider.
- imageUrl (requerido) — string — The URL to an image representing the integration provider. The imageUrl should start with "https://" and ensure that this URL is publicly accessible.
Respuestas:
- 200 — Respuesta exitosa
- 400 — Peticion invalida
- 401 — No autorizado
- 422 — Entidad no procesable
GET /payments/integrations/provider/whitelabel
Listar White-label Integration Providers The "List White-label Integration Providers" API allows to retrieve a paginated list of integration providers. Customize your results by filtering whitelabel integration providers(which are built directly on top of Authorize.net or NMI) based on name or paginate through the list using the provided query parameters. This endpoint provides a straightforward way to explore and retrieve integration provider information.
Scopes requeridos: payments/integration.readonly
Parametros:
- Versión (header, string) (requerido) — Versión de la API
- altId (query, string) (requerido) — Id de la sede o de la agencia, según altType
- altType (query, string) (requerido) — Tipo alterno (altType)
- limit (query, number) — Cantidad máxima de resultados por página
- offset (query, number) — Indice inicial de la página de resultados
Respuestas:
- 200 — Respuesta exitosa
- 400 — Peticion invalida
- 401 — No autorizado
- 422 — Entidad no procesable
GET /payments/orders
Listar pedidos The "List Orders" API allows to retrieve a paginated list of orders. Customize your results by filtering orders based on name, alt type, order status, payment mode, date range, type of source, contact, funnel products or paginate through the list using the provided query parameters. This endpoint provides a straightforward way to explore and retrieve order information.
Scopes requeridos: payments/orders.readonly
Parametros:
- Versión (header, string) (requerido) — Versión de la API
- locationId (query, string) — LocationId is the id of the sub-account.
- altId (query, string) (requerido) — AltId is the unique identifier e.g: location id.
- status (query, string) — Order status.
- paymentStatus (query, string) — Payment Status of the Order
- paymentMode (query, string) — Mode of payment.
- startAt (query, string) — Starting interval of orders.
- endAt (query, string) — Closing interval of orders.
- search (query, string) — The name of the order for searching.
- contactId (query, string) — Contact id for filtering of orders.
- funnelProductIds (query, string) — Funnel product ids separated by comma.
- sourceId (query, string) — Id de Source
- limit (query, number) — Cantidad máxima de resultados por página
- offset (query, number) — Indice inicial de la página de resultados
Respuestas:
- 200 — Respuesta exitosa
- 400 — Peticion invalida
- 401 — No autorizado
- 422 — Entidad no procesable
GET /payments/orders/{orderId}
Obtener Order by Id The "Get Order by Id" API allows to retrieve information for a specific order using its unique identifier. Use this endpoint to fetch details for a single order based on the provided order Id.
Scopes requeridos: payments/orders.readonly
Parametros:
- Versión (header, string) (requerido) — Versión de la API
- orderId (path, string) (requerido) — Id of the order that needs to be returned
- locationId (query, string) — LocationId is the id of the sub-account.
- altId (query, string) (requerido) — AltId is the unique identifier e.g: location id.
Respuestas:
- 200 — Respuesta exitosa
- 400 — Order not found
- 401 — No autorizado
- 422 — Entidad no procesable
POST /payments/orders/{orderId}/record-payment
Record Order Payment The "Record Order Payment" API allows to record a payment for an order. Use this endpoint to record payment for an order and update the order status to "Paid".
Scopes requeridos: payments/orders.collectPayment
Parametros:
- Versión (header, string) (requerido) — Versión de la API
- orderId (path, string) (requerido) — Id de pedido
Cuerpo de la peticion (application/json):
- altId (requerido) — string — location Id / company Id based on altType
- altType (requerido) — string — Alt Type
- mode (requerido) — string — manual payment method
- card — — Details of Card if used for payment
- cheque — — Details of the Cheque if used for payment
- notes — string — Any note to be recorded with the transaction
- amount — number — Amount to be paid against the invoice.
- meta — object — Meta data to be recorded with the transaction
- isPartialPayment — boolean — Indicates if the order is intended to be a partial payment.
Respuestas:
- 200 — Respuesta exitosa
- 400 — Order not found
- 401 — No autorizado
- 422 — Entidad no procesable
POST /payments/orders/{orderId}/fulfillments
Crear order fulfillment The "Order Fulfillment" API facilitates the process of fulfilling an order.
Scopes requeridos: payments/orders.write
Parametros:
- Versión (header, string) (requerido) — Versión de la API
- orderId (path, string) (requerido) — Id of the order that needs to be returned
Cuerpo de la peticion (application/json):
- altId (requerido) — string — Location Id or Agency Id
- altType (requerido) — string
- trackings (requerido) — array — Fulfillment tracking information
- trackingNumber — string — Tracking number provided by the shipping carrier
- shippingCarrier — string — Shipping carrier name
- trackingUrl — string — Tracking URL
- items (requerido) — array — Fulfilled items
- priceId (requerido) — string — The id of product price
- qty (requerido) — number — The no of quantity of the item
- notifyCustomer (requerido) — boolean — Need to send a notification to customer
Respuestas:
- 200 — Respuesta exitosa
- 400 — Peticion invalida
- 401 — No autorizado
- 422 — Entidad no procesable
GET /payments/orders/{orderId}/fulfillments
Listar fulfillment List all fulfillment history of an order
Scopes requeridos: payments/orders.readonly
Parametros:
- Versión (header, string) (requerido) — Versión de la API
- altId (query, string) (requerido) — Id de la sede o de la agencia
- altType (query, string) (requerido) —
- orderId (path, string) (requerido) — Id of the order that needs to be returned
Respuestas:
- 200 — Respuesta exitosa
- 400 — Peticion invalida
- 401 — No autorizado
- 422 — Entidad no procesable
GET /payments/orders/{orderId}/notes
Listar Order Notes List all notes of an order
Parametros:
- Versión (header, string) (requerido) — Versión de la API
- altId (query, string) (requerido) — Id de la sede o de la agencia
- altType (query, string) (requerido) —
- orderId (path, string) (requerido) — Id of the order that needs to be returned
Respuestas:
- 200 — Respuesta exitosa
- 400 — Peticion invalida
- 401 — No autorizado
- 422 — Entidad no procesable
GET /payments/transactions
Listar Transactions The "List Transactions" API allows to retrieve a paginated list of transactions. Customize your results by filtering transactions based on name, alt type, transaction status, payment mode, date range, type of source, contact, subscription id, entity id or paginate through the list using the provided query parameters. This endpoint provides a straightforward way to explore and retrieve transaction information.
Scopes requeridos: payments/transactions.readonly
Parametros:
- Versión (header, string) (requerido) — Versión de la API
- locationId (query, string) — LocationId is the id of the sub-account.
- altId (query, string) (requerido) — AltId is the unique identifier e.g: location id.
- altType (query, string) (requerido) — AltType is the type of identifier.
- paymentMode (query, string) — Mode of payment.
- startAt (query, string) — Starting interval of transactions.
- endAt (query, string) — Closing interval of transactions.
- entitySourceType (query, string) — Source of the transactions.
- entitySourceSubType (query, string) — Source sub-type of the transactions.
- search (query, string) — The name of the transaction for searching.
- subscriptionId (query, string) — Subscription id for filtering of transactions.
- entityId (query, string) — Entity id for filtering of transactions.
- contactId (query, string) — Contact id for filtering of transactions.
- limit (query, number) — Cantidad máxima de resultados por página
- offset (query, number) — Indice inicial de la página de resultados
Respuestas:
- 200 — Respuesta exitosa
- 400 — Peticion invalida
- 401 — No autorizado
- 422 — Entidad no procesable
GET /payments/transactions/{transactionId}
Obtener Transaction by Id The "Get Transaction by Id" API allows to retrieve information for a specific transaction using its unique identifier. Use this endpoint to fetch details for a single transaction based on the provided transaction Id.
Scopes requeridos: payments/transactions.readonly
Parametros:
- Versión (header, string) (requerido) — Versión de la API
- transactionId (path, string) (requerido) — Id of the transaction that needs to be returned
- locationId (query, string) — LocationId is the id of the sub-account.
- altId (query, string) (requerido) — AltId is the unique identifier e.g: location id.
- altType (query, string) (requerido) — AltType is the type of identifier.
Respuestas:
- 200 — Respuesta exitosa
- 400 — Transaction not found
- 401 — No autorizado
- 422 — Entidad no procesable
GET /payments/subscriptions
Listar suscripciones The "List Subscriptions" API allows to retrieve a paginated list of subscriptions. Customize your results by filtering subscriptions based on name, alt type, subscription status, payment mode, date range, type of source, contact, subscription id, entity id, contact or paginate through the list using the provided query parameters. This endpoint provides a straightforward way to explore and retrieve subscription information.
Scopes requeridos: payments/subscriptions.readonly
Parametros:
- Versión (header, string) (requerido) — Versión de la API
- altId (query, string) (requerido) — AltId is the unique identifier e.g: location id.
- altType (query, string) (requerido) — AltType is the type of identifier.
- entityId (query, string) — Entity id for filtering of subscriptions.
- paymentMode (query, string) — Mode of payment.
- startAt (query, string) — Starting interval of subscriptions.
- endAt (query, string) — Closing interval of subscriptions.
- entitySourceType (query, string) — Source of the subscriptions.
- search (query, string) — The name of the subscription for searching.
- contactId (query, string) — Contact Id for the subscription
- id (query, string) — Subscription id for filtering of subscriptions.
- limit (query, number) — Cantidad máxima de resultados por página
- offset (query, number) — Indice inicial de la página de resultados
- getPaymentsCollectedCount (query, boolean) — Get the total payments collected for the subscription.
Respuestas:
- 200 — Respuesta exitosa
- 400 — Peticion invalida
- 401 — No autorizado
- 422 — Entidad no procesable
GET /payments/subscriptions/{subscriptionId}
Obtener Subscription by Id The "Get Subscription by Id" API allows to retrieve information for a specific subscription using its unique identifier. Use this endpoint to fetch details for a single subscription based on the provided subscription Id.
Scopes requeridos: payments/subscriptions.readonly
Parametros:
- Versión (header, string) (requerido) — Versión de la API
- subscriptionId (path, string) (requerido) — Id of the subscription that needs to be returned
- altId (query, string) (requerido) — AltId is the unique identifier e.g: location id.
- altType (query, string) (requerido) — AltType is the type of identifier.
Respuestas:
- 200 — Respuesta exitosa
- 400 — Subscription not found
- 401 — No autorizado
- 422 — Entidad no procesable
GET /payments/coupon/list
Listar Coupons The "List Coupons" API allows you to retrieve a list of all coupons available in your location. Use this endpoint to view all promotional offers and special discounts for your customers.
Scopes requeridos: payments/coupons.readonly
Parametros:
- Versión (header, string) (requerido) — Versión de la API
- altId (query, string) (requerido) — Id de sede
- altType (query, string) (requerido) — Tipo alterno (altType)
- limit (query, number) — Maximum number of coupons to return
- offset (query, number) — Number of coupons to skip for pagination
- status (query, string) — Filter coupons by status
- search (query, string) — Search term to filter coupons by name or code
Respuestas:
- 200 — Respuesta exitosa
- 422 — Entidad no procesable
POST /payments/coupon
Crear Coupon The "Create Coupon" API allows you to create a new promotional coupon with customizable parameters such as discount amount, validity period, usage limits, and applicable products. Use this endpoint to set up promotional offers and special discounts for your customers.
Scopes requeridos: payments/coupons.write
Parametros:
- Versión (header, string) (requerido) — Versión de la API
Cuerpo de la peticion (application/json):
- altId (requerido) — string — Location Id
- altType (requerido) — string — Alt Type
- name (requerido) — string — Coupon Name
- code (requerido) — string — Coupon Code
- discountType (requerido) — string — Discount Type
- discountValue (requerido) — number — Discount Value
- startDate (requerido) — string — Start date in YYYY-MM-DDTHH:mm:ssZ format
- endDate — string — End date in YYYY-MM-DDTHH:mm:ssZ format
- usageLimit — number — Max number of times coupon can be used
- productIds — array — Product Ids
- priceIds — array — Price Ids
- variantIds — array — Variant Ids
- applyToFuturePayments — boolean — Is Coupon applicable on upcoming subscription transactions
- applyToFuturePaymentsConfig — — If coupon is applicable on upcoming subscription transactions, how many months should it be applicable for a subscription
- limitPerCustomer — boolean — Limits whether a coupon can be redeemed only once per customer.
Respuestas:
- 201 — Respuesta exitosa
- 422 — Entidad no procesable
PUT /payments/coupon
Actualizar Coupon The "Update Coupon" API enables you to modify existing coupon details such as discount values, validity periods, usage limits, and other promotional parameters. Use this endpoint to adjust or extend promotional offers for your customers.
Scopes requeridos: payments/coupons.write
Parametros:
- Versión (header, string) (requerido) — Versión de la API
Cuerpo de la peticion (application/json):
- altId (requerido) — string — Location Id
- altType (requerido) — string — Alt Type
- name (requerido) — string — Coupon Name
- code (requerido) — string — Coupon Code
- discountType (requerido) — string — Discount Type
- discountValue (requerido) — number — Discount Value
- startDate (requerido) — string — Start date in YYYY-MM-DDTHH:mm:ssZ format
- endDate — string — End date in YYYY-MM-DDTHH:mm:ssZ format
- usageLimit — number — Max number of times coupon can be used
- productIds — array — Product Ids
- priceIds — array — Price Ids
- variantIds — array — Variant Ids
- applyToFuturePayments — boolean — Is Coupon applicable on upcoming subscription transactions
- applyToFuturePaymentsConfig — — If coupon is applicable on upcoming subscription transactions, how many months should it be applicable for a subscription
- limitPerCustomer — boolean — Limits whether a coupon can be redeemed only once per customer.
- id (requerido) — string — Coupon Id
Respuestas:
- 200 — Respuesta exitosa
- 422 — Entidad no procesable
DELETE /payments/coupon
Eliminar Coupon The "Delete Coupon" API allows you to permanently remove a coupon from your system using its unique identifier. Use this endpoint to discontinue promotional offers or clean up unused coupons. Note that this action cannot be undone.
Scopes requeridos: payments/coupons.write
Parametros:
- Versión (header, string) (requerido) — Versión de la API
Cuerpo de la peticion (application/json):
- altId (requerido) — string — Location Id
- altType (requerido) — string — Alt Type
- id (requerido) — string — Coupon Id
Respuestas:
- 200 — Respuesta exitosa
- 422 — Entidad no procesable
GET /payments/coupon
Fetch Coupon The "Get Coupon Details" API enables you to retrieve comprehensive information about a specific coupon using either its unique identifier or promotional code. Use this endpoint to view coupon parameters, usage statistics, validity periods, and other promotional details.
Scopes requeridos: payments/coupons.readonly
Parametros:
- Versión (header, string) (requerido) — Versión de la API
- altId (query, string) (requerido) — Id de sede
- altType (query, string) (requerido) — Tipo alterno (altType)
- id (query, string) (requerido) — Id de Coupon
- code (query, string) (requerido) — Coupon code
Respuestas:
- 200 — Respuesta exitosa
- 422 — Entidad no procesable
POST /payments/custom-provider/provider
Crear new integration API to create a new association for an app and location
Scopes requeridos: payments/custom-provider.write
Parametros:
- Versión (header, string) (requerido) — Versión de la API
- locationId (query, string) (requerido) — Id de sede
Cuerpo de la peticion (application/json):
- name (requerido) — string — The name of the custom provider
- description (requerido) — string — Description of payment gateway. Shown on the payments integrations page as subtext
- paymentsUrl (requerido) — string — This url will be loaded in iFrame to start a payment session.
- queryUrl (requerido) — string — The url used for querying payments related events. Ex. verify, refund, subscription etc.
- imageUrl (requerido) — string — Public image url for logo of the payment gateway displayed on the payments integrations page.
- supportsSubscriptionSchedule (requerido) — boolean — Whether the config supports subscription schedule or not. true represents config supports subscription schedule
Respuestas:
- 200 — Respuesta exitosa
- 400 — Peticion invalida
- 401 — No autorizado
- 422 — Entidad no procesable
DELETE /payments/custom-provider/provider
Deleting an existing integration API to delete an association for an app and location
Scopes requeridos: payments/custom-provider.write
Parametros:
- Versión (header, string) (requerido) — Versión de la API
- locationId (query, string) (requerido) — Id de sede
Respuestas:
- 200 — Respuesta exitosa
- 400 — Peticion invalida
- 401 — No autorizado
- 422 — Entidad no procesable
GET /payments/custom-provider/connect
Fetch given provider config API for fetching an existing payment config for given location
Scopes requeridos: payments/custom-provider.readonly
Parametros:
- Versión (header, string) (requerido) — Versión de la API
- locationId (query, string) (requerido) — Id de sede
Respuestas:
- 200 — Respuesta exitosa
- 400 — No such config exists for given locationId and marketplaceAppId
- 401 — No autorizado
- 422 — Entidad no procesable
POST /payments/custom-provider/connect
Crear new provider config API to create a new payment config for given location
Scopes requeridos: payments/custom-provider.write
Parametros:
- Versión (header, string) (requerido) — Versión de la API
- locationId (query, string) (requerido) — Id de sede
Cuerpo de la peticion (application/json):
- live (requerido) — — Live config containing api-key and publishable key for live payments
- test (requerido) — — Test config containing api-key and publishable-key for test payments
Respuestas:
- 200 — Respuesta exitosa
- 400 — No such config exists for given locationId and marketplaceAppId
- 401 — No autorizado
- 422 — Entidad no procesable
POST /payments/custom-provider/disconnect
Disconnect existing provider config API to disconnect an existing payment config for given location
Scopes requeridos: payments/custom-provider.write
Parametros:
- Versión (header, string) (requerido) — Versión de la API
- locationId (query, string) (requerido) — Id de sede
Cuerpo de la peticion (application/json):
- liveMode (requerido) — boolean — Whether the config is for test mode or live mode. true represents config is for live payments
Respuestas:
- 200 — Respuesta exitosa
- 400 — No such config exists for given locationId and marketplaceAppId
- 401 — No autorizado
- 422 — Entidad no procesable
PUT /payments/custom-provider/capabilities
Custom-provider marketplace app update capabilities Toggle capabilities for the marketplace app tied to the OAuth client
Scopes requeridos: payments/custom-provider.write
Parametros:
- Versión (header, string) (requerido) — Versión de la API
Cuerpo de la peticion (application/json):
- supportsSubscriptionSchedules (requerido) — boolean — Whether the marketplace app supports subscription schedules or not
- companyId — string — Company id. Mandatory if locationId is not provided
- locationId — string — Location / Sub-account id. Mandatory if companyId is not provided
Respuestas:
- 200 — Respuesta exitosa
- 400 — Peticion invalida
- 401 — No autorizado
- 422 — Entidad no procesable
