All URIs are relative to https://api.conekta.io
Method | HTTP request | Description |
---|---|---|
cancel_checkout | PUT /checkouts/{id}/cancel | Cancel Payment Link |
create_checkout | POST /checkouts | Create Unique Payment Link |
email_checkout | POST /checkouts/{id}/email | Send an email |
get_checkout | GET /checkouts/{id} | Get a payment link by ID |
get_checkouts | GET /checkouts | Get a list of payment links |
sms_checkout | POST /checkouts/{id}/sms | Send an sms |
cancel_checkout(id, opts)
Cancel Payment Link
require 'time'
require 'conekta'
# setup authorization
Conekta.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Conekta::PaymentLinkApi.new
id = '6307a60c41de27127515a575' # String | Identifier of the resource
opts = {
accept_language: 'es', # String | Use for knowing which language to use
x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
}
begin
# Cancel Payment Link
result = api_instance.cancel_checkout(id, opts)
p result
rescue Conekta::ApiError => e
puts "Error when calling PaymentLinkApi->cancel_checkout: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> cancel_checkout_with_http_info(id, opts)
begin
# Cancel Payment Link
data, status_code, headers = api_instance.cancel_checkout_with_http_info(id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <CheckoutResponse>
rescue Conekta::ApiError => e
puts "Error when calling PaymentLinkApi->cancel_checkout_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
accept_language | String | Use for knowing which language to use | [optional][default to 'es'] |
x_child_company_id | String | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
- Content-Type: Not defined
- Accept: application/vnd.conekta-v2.1.0+json
create_checkout(checkout, opts)
Create Unique Payment Link
require 'time'
require 'conekta'
# setup authorization
Conekta.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Conekta::PaymentLinkApi.new
checkout = Conekta::Checkout.new({allowed_payment_methods: ["cash", "card", "bank_transfer"], expires_at: 1680397724, name: 'Payment Link Name 1594138857', order_template: Conekta::CheckoutOrderTemplate.new({currency: 'MXN', line_items: [Conekta::Product.new({name: 'Box of Cohiba S1s', quantity: 1, unit_price: 20000})]}), recurrent: false, type: 'PaymentLink'}) # Checkout | requested field for checkout
opts = {
accept_language: 'es', # String | Use for knowing which language to use
x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
}
begin
# Create Unique Payment Link
result = api_instance.create_checkout(checkout, opts)
p result
rescue Conekta::ApiError => e
puts "Error when calling PaymentLinkApi->create_checkout: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> create_checkout_with_http_info(checkout, opts)
begin
# Create Unique Payment Link
data, status_code, headers = api_instance.create_checkout_with_http_info(checkout, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <CheckoutResponse>
rescue Conekta::ApiError => e
puts "Error when calling PaymentLinkApi->create_checkout_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
checkout | Checkout | requested field for checkout | |
accept_language | String | Use for knowing which language to use | [optional][default to 'es'] |
x_child_company_id | String | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
- Content-Type: application/json
- Accept: application/vnd.conekta-v2.1.0+json
email_checkout(id, email_checkout_request, opts)
Send an email
require 'time'
require 'conekta'
# setup authorization
Conekta.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Conekta::PaymentLinkApi.new
id = '6307a60c41de27127515a575' # String | Identifier of the resource
email_checkout_request = Conekta::EmailCheckoutRequest.new({email: '[email protected]'}) # EmailCheckoutRequest | requested field for sms checkout
opts = {
accept_language: 'es', # String | Use for knowing which language to use
x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
}
begin
# Send an email
result = api_instance.email_checkout(id, email_checkout_request, opts)
p result
rescue Conekta::ApiError => e
puts "Error when calling PaymentLinkApi->email_checkout: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> email_checkout_with_http_info(id, email_checkout_request, opts)
begin
# Send an email
data, status_code, headers = api_instance.email_checkout_with_http_info(id, email_checkout_request, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <CheckoutResponse>
rescue Conekta::ApiError => e
puts "Error when calling PaymentLinkApi->email_checkout_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
email_checkout_request | EmailCheckoutRequest | requested field for sms checkout | |
accept_language | String | Use for knowing which language to use | [optional][default to 'es'] |
x_child_company_id | String | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
- Content-Type: application/json
- Accept: application/vnd.conekta-v2.1.0+json
get_checkout(id, opts)
Get a payment link by ID
require 'time'
require 'conekta'
# setup authorization
Conekta.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Conekta::PaymentLinkApi.new
id = '6307a60c41de27127515a575' # String | Identifier of the resource
opts = {
accept_language: 'es', # String | Use for knowing which language to use
x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
}
begin
# Get a payment link by ID
result = api_instance.get_checkout(id, opts)
p result
rescue Conekta::ApiError => e
puts "Error when calling PaymentLinkApi->get_checkout: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_checkout_with_http_info(id, opts)
begin
# Get a payment link by ID
data, status_code, headers = api_instance.get_checkout_with_http_info(id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <CheckoutResponse>
rescue Conekta::ApiError => e
puts "Error when calling PaymentLinkApi->get_checkout_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
accept_language | String | Use for knowing which language to use | [optional][default to 'es'] |
x_child_company_id | String | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
- Content-Type: Not defined
- Accept: application/vnd.conekta-v2.1.0+json
get_checkouts(opts)
Get a list of payment links
Returns a list of links generated by the merchant
require 'time'
require 'conekta'
# setup authorization
Conekta.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Conekta::PaymentLinkApi.new
opts = {
accept_language: 'es', # String | Use for knowing which language to use
x_child_company_id: '6441b6376b60c3a638da80af', # String | In the case of a holding company, the company id of the child company to which will process the request.
limit: 56, # Integer | The numbers of items to return, the maximum value is 250
search: 'search_example', # String | General order search, e.g. by mail, reference etc.
_next: '_next_example', # String | next page
previous: 'previous_example' # String | previous page
}
begin
# Get a list of payment links
result = api_instance.get_checkouts(opts)
p result
rescue Conekta::ApiError => e
puts "Error when calling PaymentLinkApi->get_checkouts: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_checkouts_with_http_info(opts)
begin
# Get a list of payment links
data, status_code, headers = api_instance.get_checkouts_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <CheckoutsResponse>
rescue Conekta::ApiError => e
puts "Error when calling PaymentLinkApi->get_checkouts_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
accept_language | String | Use for knowing which language to use | [optional][default to 'es'] |
x_child_company_id | String | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
limit | Integer | The numbers of items to return, the maximum value is 250 | [optional][default to 20] |
search | String | General order search, e.g. by mail, reference etc. | [optional] |
_next | String | next page | [optional] |
previous | String | previous page | [optional] |
- Content-Type: Not defined
- Accept: application/vnd.conekta-v2.1.0+json
sms_checkout(id, sms_checkout_request, opts)
Send an sms
require 'time'
require 'conekta'
# setup authorization
Conekta.configure do |config|
# Configure Bearer authorization: bearerAuth
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = Conekta::PaymentLinkApi.new
id = '6307a60c41de27127515a575' # String | Identifier of the resource
sms_checkout_request = Conekta::SmsCheckoutRequest.new({phonenumber: '5566982090'}) # SmsCheckoutRequest | requested field for sms checkout
opts = {
accept_language: 'es', # String | Use for knowing which language to use
x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
}
begin
# Send an sms
result = api_instance.sms_checkout(id, sms_checkout_request, opts)
p result
rescue Conekta::ApiError => e
puts "Error when calling PaymentLinkApi->sms_checkout: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> sms_checkout_with_http_info(id, sms_checkout_request, opts)
begin
# Send an sms
data, status_code, headers = api_instance.sms_checkout_with_http_info(id, sms_checkout_request, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <CheckoutResponse>
rescue Conekta::ApiError => e
puts "Error when calling PaymentLinkApi->sms_checkout_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | String | Identifier of the resource | |
sms_checkout_request | SmsCheckoutRequest | requested field for sms checkout | |
accept_language | String | Use for knowing which language to use | [optional][default to 'es'] |
x_child_company_id | String | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
- Content-Type: application/json
- Accept: application/vnd.conekta-v2.1.0+json