Oneinfinite v1
  • API Integration
    • Getting started
      • Environments
      • Security
    • API reference
      • Payment Methods
      • Checkout Preferences
        • Create a one-time payment
        • Create a Subscription
        • Get a Checkout Preference
      • Payment Orders
        • Get a Payment Order
      • Recurrent Payments
        • Get a Recurrent Payment
    • Webhooks
      • Configure
      • Notifications
    • Supported entities
      • Currencies
  • WooCommerce
    • WooCommerce Plugin
Powered by GitBook
On this page
  1. API Integration
  2. API reference
  3. Checkout Preferences

Create a one-time payment

Create a one-time payment

POST /v1/checkout_preferences

Headers

Name
Value

x-api-key

<your api key>

x-api-secret

<your api secret>

Body

Name
Type
Required
Description

type

string

required

PAYMENT

amount

float

required

The amount must be between 0.1 and 3000 USD

currency

string

required

title

string

required

Description of checkout_preference ie. "Introductory course to Blockchain"

origin

string

required

if use api integration use "API"

external_id

string

optional

Your ID

expiration_date

string

optional

Date with format RFC3339: yyyy-MM-dd'T'HH:mm:ss'Z' Ex: 2016-11-01T20:44:39Z, The expiration_date must be at most one week from the current date. If you don’t send any the expiration_date will be in 15 min.

payer

Object

optional

If you provide the payer's details, we won't request them during the checkout process.

payer.email

string

optional

Payer email ie. johndou@gmail.com

payer.name

string

optional

Payer name ie. John

payer.last_name

string

optional

Payer last_name ie. Doe

payer.phone

string

optional

Payer phone ie. +542615985699

payment_method_types

string[]

optional

List of available payment methods you want to use in your checkout preference. If you don’t send any, all payment methods will be used.

selected_payment_method_id

string

optional

If you provide the ID of a specific payment method, we won't ask to select a payment method during the checkout process

Example

curl 'https://api.oneinfinite.la/v1/checkout_preferences' \
--header 'x-api-key: MY_API_KEY' \
--header 'x-api-secret: MY_API_SECRET' \
--header 'Content-Type: application/json' \
--data-raw '{
    "amount": 85807.04,
    "currency": "COP",
    "origin": "API",
    "external_id": "external_id_1234",
    "title": "Mastering Junior-Level Programming Languages",
    "type: "PAYMENT",
    "custom_urls": {
        "status_changes_webhook": "https://api.mycompany.io/webhook",
	"success_payment_redirect": "https://mycompany.io/success.html",
	"error_payment_redirect": "https://mycompany.io/error.html"
    },
    "payer": {
        "email": "luca@test.com",
	"phone_number": "+521142567689",
        "first_name": "Luca",
        "last_name": "Dorain"
    },
}'

PreviousCheckout PreferencesNextCreate a Subscription

Last updated 6 months ago

of the payment

The currency