Conekta.Charges (Conekta v1.2.0)

Copy Markdown View Source

Functions for listing and updating charges.

Charges are created through orders (see Conekta.Orders.create_charge/2). This module provides standalone listing and updating.

Endpoint: https://api.conekta.io/charges

Summary

Functions

Get a charge by ID

List all charges across all orders

Update a charge's reference ID

Functions

find(charge_id)

Get a charge by ID

Method: GET

Conekta.Charges.find(charge_id)
# => {:ok, %Conekta.ChargeResponse{}}

list()

List all charges across all orders

Method: GET

Conekta.Charges.list()
# => {:ok, %Conekta.ChargesResponse{}}

update(charge_id, charge)

Update a charge's reference ID

Method: PUT

Conekta.Charges.update(charge_id, %Conekta.ChargeUpdateRequest{reference_id: "ref_123"})
# => {:ok, %Conekta.ChargeResponse{}}