# Checkout.com

> Take payments with payment links and hosted pages, manage payments, customers and disputes.

App · 18 actions. Web page: https://docs.lodol.com/docs/integrations/checkout-com

## Actions

### Accept dispute

Accept a dispute you won't challenge. This closes it and the customer keeps the money; it can't be undone.

**Inputs**

- Dispute (`dispute_id`, text, required): The dispute. Pick a recent one or paste its ID, which starts with dsp_.

**Outputs**

- `data` (object): The response from Checkout.com.

**Example output**

```json
{
  "data": {}
}
```

### Capture payment

Collect the money from an approved card payment. Leave the amount empty to collect all of it.

**Inputs**

- Payment (`payment_id`, text, required): The payment. Pick a recent one or paste its ID, which starts with pay_.
- Amount (`amount`, number): How much to collect, in the currency's smallest unit, such as cents: 1050 is 10.50 USD. For a currency without decimals, such as JPY, 1050 is 1,050. Leave empty for the full amount. At least 0.
- Capture type (`capture_type`, text): Whether more captures may follow, or this is the last one and the rest is released. One of: `NonFinal` (Partial (more captures may follow)), `Final` (Final (release whatever is left)).
- Reference (`reference`, text): Your own reference for this capture.

**Outputs**

- `data` (object): The response from Checkout.com.

**Example output**

```json
{
  "data": {
    "_links": {
      "payment": {
        "href": "example"
      }
    },
    "action_id": "example",
    "reference": "example"
  }
}
```

### Create customer

Save a customer's details in Checkout.com for later payments.

**Inputs**

- Email (`email`, text, required): The customer's email address.
- Name (`name`, text): The customer's name.
- Phone country code (`phone_country_code`, text): The phone number's country calling code, such as +1 or +44.
- Phone number (`phone_number`, text): The phone number, without the country calling code.

**Outputs**

- `data` (object): The response from Checkout.com.

**Example output**

```json
{
  "data": {
    "id": "example"
  }
}
```

### Create hosted payment page

Create a Checkout.com payment page for one customer, with pages of yours to send them back to afterwards. Returns the page's address.

**Inputs**

- Amount (`amount`, number): The amount to charge, in the currency's smallest unit, such as cents: 1050 is 10.50 USD. For a currency without decimals, such as JPY, 1050 is 1,050. At least 0.
- Currency (`currency`, text, required): The currency to charge in. One of: `AED`, `AFN`, `ALL`, `AMD`, `AOA`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, and 135 more.
- Billing country (`country`, text, required): The customer's billing country. With the currency, it decides which ways to pay are offered. One of: `AD` (Andorra), `AE` (United Arab Emirates), `AF` (Afghanistan), `AG` (Antigua & Barbuda), `AI` (Anguilla), `AL` (Albania), `AM` (Armenia), `AO` (Angola), `AQ` (Antarctica), `AR` (Argentina), and 240 more.
- Success URL (`success_url`, text, required): Where to send the customer after they pay.
- Cancel URL (`cancel_url`, text, required): Where to send the customer if they cancel.
- Failure URL (`failure_url`, text, required): Where to send the customer if the payment fails.
- Reference (`reference`, text): Your own reference for the payment, such as an order number. Up to 50 characters.
- Description (`description`, text): A description of the payment.
- Customer email (`customer_email`, text): The customer's email address.
- Customer name (`customer_name`, text): The customer's name.
- Business name shown (`display_name`, text): The business name customers see on the payment page.
- Language (`locale`, text): The language of the payment page. One of: `ar` (Arabic), `da-DK` (Danish), `de-DE` (German), `el` (Greek), `en-GB` (English), `es-ES` (Spanish), `fi-FI` (Finnish), `fil-PH` (Filipino), `fr-FR` (French), `hi-IN` (Hindi), and 13 more.
- Capture at once (`capture`, true/false): Whether to collect the money as soon as the payment is approved. Leave empty to follow the account's settings.
- Processing channel ID (`processing_channel_id`, text): Only needed when your secret key can use more than one processing channel: the channel's ID, which starts with pc_.

**Outputs**

- `data` (object): The response from Checkout.com.

**Example output**

```json
{
  "data": {
    "_links": {
      "redirect": {
        "href": "example"
      },
      "self": {
        "href": "example"
      }
    },
    "expires_on": "example",
    "id": "example",
    "reference": "example"
  }
}
```

### Create payment link

Create a link to a Checkout.com payment page that you can send to a customer. Returns the link to share.

**Inputs**

- Amount (`amount`, number, required): The amount to charge, in the currency's smallest unit, such as cents: 1050 is 10.50 USD. For a currency without decimals, such as JPY, 1050 is 1,050. At least 1.
- Currency (`currency`, text, required): The currency to charge in. One of: `AED`, `AFN`, `ALL`, `AMD`, `AOA`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, and 135 more.
- Billing country (`country`, text, required): The customer's billing country. With the currency, it decides which ways to pay are offered. One of: `AD` (Andorra), `AE` (United Arab Emirates), `AF` (Afghanistan), `AG` (Antigua & Barbuda), `AI` (Anguilla), `AL` (Albania), `AM` (Armenia), `AO` (Angola), `AQ` (Antarctica), `AR` (Argentina), and 240 more.
- Reference (`reference`, text): Your own reference for the payment, such as an order number. Up to 50 characters.
- Description (`description`, text): A description of the payment.
- Customer email (`customer_email`, text): The customer's email address.
- Customer name (`customer_name`, text): The customer's name.
- Business name shown (`display_name`, text): The business name customers see on the payment page.
- Language (`locale`, text): The language of the payment page. One of: `ar` (Arabic), `da-DK` (Danish), `de-DE` (German), `el` (Greek), `en-GB` (English), `es-ES` (Spanish), `fi-FI` (Finnish), `fil-PH` (Filipino), `fr-FR` (French), `hi-IN` (Hindi), and 13 more.
- Capture at once (`capture`, true/false): Whether to collect the money as soon as the payment is approved. Leave empty to follow the account's settings.
- Processing channel ID (`processing_channel_id`, text): Only needed when your secret key can use more than one processing channel: the channel's ID, which starts with pc_.
- Return URL (`return_url`, text): A page of yours that the success page links back to.
- Expires after (hours) (`expires_in`, number): How many hours the link works for. Leave empty for 24 hours. From 1 to 1440.

**Outputs**

- `data` (object): The response from Checkout.com.

**Example output**

```json
{
  "data": {
    "_links": {
      "redirect": {
        "href": "example"
      },
      "self": {
        "href": "example"
      }
    },
    "expires_on": "example",
    "id": "example",
    "reference": "example"
  }
}
```

### Delete customer

Delete a saved customer and every card or account saved for them.

**Inputs**

- Customer ID (`customer_id`, text, required): The customer's ID, which starts with cus_.

**Outputs**

- `data` (object): The response from Checkout.com.

**Example output**

```json
{
  "data": {}
}
```

### Find payments by reference

List the payments that carry your reference, such as an order number, newest first.

**Inputs**

- Reference (`reference`, text, required): The reference to look for.
- Limit (`limit`, number): How many payments to return, up to 100. Leave empty for 10. From 1 to 100.
- Skip (`skip`, number): How many matching payments to skip, to read further pages. At least 0.

**Outputs**

- `data` (object): The response from Checkout.com.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "amount": 1,
        "approved": true,
        "balances": {},
        "currency": "example",
        "customer": {},
        "description": "example",
        "id": "example",
        "metadata": {},
        "payment_type": "example",
        "reference": "example",
        "requested_on": "example",
        "source": {},
        "status": "example"
      }
    ],
    "limit": 1,
    "skip": 1,
    "total_count": 1
  }
}
```

### Get customer

Get a saved customer and their saved cards and accounts, by ID or email address.

**Inputs**

- Customer ID or email (`customer`, text, required): The customer's ID (starts with cus_) or email address.

**Outputs**

- `data` (object): The response from Checkout.com.

**Example output**

```json
{
  "data": {
    "default": "example",
    "email": "example",
    "id": "example",
    "instruments": [
      {}
    ],
    "metadata": {},
    "name": "example",
    "phone": {
      "country_code": "example",
      "number": "example"
    }
  }
}
```

### Get dispute

Get a dispute with its reason, deadline, payment and the evidence sent so far.

**Inputs**

- Dispute (`dispute_id`, text, required): The dispute. Pick a recent one or paste its ID, which starts with dsp_.

**Outputs**

- `data` (object): The response from Checkout.com.

**Example output**

```json
{
  "data": {
    "amount": 1,
    "category": "example",
    "currency": "example",
    "evidence_list": [
      {}
    ],
    "evidence_required_by": "example",
    "id": "example",
    "last_update": "example",
    "payment": {},
    "reason_code": "example",
    "received_on": "example",
    "relevant_evidence": [
      "example"
    ],
    "status": "example"
  }
}
```

### Get hosted payment page

Get a hosted payment page and whether it has been paid.

**Inputs**

- Hosted payment page ID (`hosted_payment_id`, text, required): The hosted payment page's ID, which starts with hpp_.

**Outputs**

- `data` (object): The response from Checkout.com.

**Example output**

```json
{
  "data": {
    "_links": {
      "redirect": {
        "href": "example"
      },
      "self": {
        "href": "example"
      }
    },
    "amount": 1,
    "billing": {
      "address": {
        "country": "example"
      }
    },
    "currency": "example",
    "customer": {
      "email": "example",
      "name": "example"
    },
    "description": "example",
    "id": "example",
    "payment_id": "example",
    "products": [
      {}
    ],
    "reference": "example",
    "status": "example"
  }
}
```

### Get payment

Get a payment's amount, status, customer and balances.

**Inputs**

- Payment (`payment_id`, text, required): The payment. Pick a recent one or paste its ID, which starts with pay_.

**Outputs**

- `data` (object): The response from Checkout.com.

**Example output**

```json
{
  "data": {
    "amount": 1,
    "approved": true,
    "balances": {},
    "currency": "example",
    "customer": {},
    "description": "example",
    "id": "example",
    "metadata": {},
    "payment_type": "example",
    "reference": "example",
    "requested_on": "example",
    "source": {},
    "status": "example"
  }
}
```

### Get payment link

Get a payment link and whether it has been paid or has expired.

**Inputs**

- Payment link ID (`payment_link_id`, text, required): The payment link's ID, which starts with pl_.

**Outputs**

- `data` (object): The response from Checkout.com.

**Example output**

```json
{
  "data": {
    "_links": {
      "redirect": {
        "href": "example"
      },
      "self": {
        "href": "example"
      }
    },
    "amount": 1,
    "billing": {
      "address": {
        "country": "example"
      }
    },
    "currency": "example",
    "customer": {
      "email": "example",
      "name": "example"
    },
    "description": "example",
    "id": "example",
    "payment_id": "example",
    "products": [
      {}
    ],
    "reference": "example",
    "status": "example"
  }
}
```

### List disputes

List disputes (chargebacks) against your business, most recently updated first.

**Inputs**

- Statuses (`statuses`, list): Only disputes in any of these statuses. One or more of: `evidence_required` (Evidence required), `evidence_under_review` (Evidence under review), `resolved`, `won`, `lost`, `canceled`, `expired`, `accepted`, `arbitration_under_review` (Arbitration under review), `arbitration_won` (Arbitration won), `arbitration_lost` (Arbitration lost).
- Updated from (`updated_from`, date and time): Only disputes updated at or after this time.
- Updated until (`updated_until`, date and time): Only disputes updated at or before this time.
- Payment (`payment_id`, text): Only disputes about this payment.
- Payment reference (`payment_reference`, text): Only disputes about payments with this reference.
- Limit (`limit`, number): How many disputes to return, up to 250. Leave empty for 50. From 1 to 250.
- Skip (`skip`, number): How many disputes to skip, to read further pages. At least 0.

**Outputs**

- `data` (object): The response from Checkout.com.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "amount": 1,
        "category": "example",
        "currency": "example",
        "evidence_required_by": "example",
        "id": "example",
        "last_update": "example",
        "payment_id": "example",
        "payment_reference": "example",
        "reason_code": "example",
        "received_on": "example",
        "status": "example"
      }
    ],
    "limit": 1,
    "skip": 1,
    "total_count": 1
  }
}
```

### List payment actions

List everything that happened to a payment (approval, captures, refunds, voids), newest first.

**Inputs**

- Payment (`payment_id`, text, required): The payment. Pick a recent one or paste its ID, which starts with pay_.

**Outputs**

- `data` (list): The response from Checkout.com.

**Example output**

```json
{
  "data": [
    {
      "amount": 1,
      "approved": true,
      "id": "example",
      "processed_on": "example",
      "reference": "example",
      "response_code": "example",
      "response_summary": "example",
      "type": "example"
    }
  ]
}
```

### Refund payment

Give money back to the customer for a captured payment. Leave the amount empty to refund all of it.

**Inputs**

- Payment (`payment_id`, text, required): The payment. Pick a recent one or paste its ID, which starts with pay_.
- Amount (`amount`, number): How much to refund, in the currency's smallest unit, such as cents: 1050 is 10.50 USD. For a currency without decimals, such as JPY, 1050 is 1,050. Leave empty for the full amount. At least 0.
- Reference (`reference`, text): Your own reference for this refund.

**Outputs**

- `data` (object): The response from Checkout.com.

**Example output**

```json
{
  "data": {
    "_links": {
      "payment": {
        "href": "example"
      }
    },
    "action_id": "example",
    "reference": "example"
  }
}
```

### Search payments

Search the last 90 days of payments, or the dates you choose, by status, reference, customer email or currency.

**Inputs**

- Statuses (`statuses`, list): Only payments in any of these statuses. One or more of: `Pending`, `Authorized`, `Card Verified`, `Voided`, `Partially Captured`, `Captured`, `Partially Refunded`, `Refunded`, `Declined`, `Canceled`, and 3 more.
- Reference (`reference`, text): Only payments with this reference.
- Customer email (`customer_email`, text): Only payments by the customer with this email address.
- Currency (`currency`, text): Only payments in this currency. One of: `AED`, `AFN`, `ALL`, `AMD`, `AOA`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, and 135 more.
- Payments from (`payments_from`, date and time): Only payments made at or after this time. Fill in both dates or neither.
- Payments until (`payments_until`, date and time): Only payments made at or before this time.
- Limit (`limit`, number): How many payments to return, up to 1000. Leave empty for 10. From 1 to 1000.

**Outputs**

- `data` (object): The response from Checkout.com.

**Example output**

```json
{
  "data": {
    "_links": {
      "next": {
        "href": "example"
      }
    },
    "data": [
      {
        "amount": 1,
        "approved": true,
        "balances": {},
        "currency": "example",
        "customer": {},
        "description": "example",
        "id": "example",
        "metadata": {},
        "payment_type": "example",
        "reference": "example",
        "requested_on": "example",
        "source": {},
        "status": "example"
      }
    ]
  }
}
```

### Update customer

Change a saved customer's email address, name or phone number. Details left empty stay as they are.

**Inputs**

- Customer ID (`customer_id`, text, required): The customer's ID, which starts with cus_.
- Email (`email`, text): The new email address.
- Name (`name`, text): The new name.
- Phone country code (`phone_country_code`, text): The phone number's country calling code, such as +1 or +44.
- Phone number (`phone_number`, text): The phone number, without the country calling code.

**Outputs**

- `data` (object): The response from Checkout.com.

**Example output**

```json
{
  "data": {}
}
```

### Void payment

Cancel an approved payment before its money is collected, so the customer is never charged.

**Inputs**

- Payment (`payment_id`, text, required): The payment. Pick a recent one or paste its ID, which starts with pay_.
- Reference (`reference`, text): Your own reference for this void.

**Outputs**

- `data` (object): The response from Checkout.com.

**Example output**

```json
{
  "data": {
    "_links": {
      "payment": {
        "href": "example"
      }
    },
    "action_id": "example",
    "reference": "example"
  }
}
```
