Skip to main content
POST
/
v1
/
transactions
Create a transaction
curl --request POST \
  --url https://api.yorlet.com/v1/transactions \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer": "<string>",
  "payment_method_types": [
    "autogiro"
  ],
  "application": "<string>",
  "application_payment_type": "advance_rent",
  "amount": 49999950,
  "capture_method": "automatic",
  "confirm": false,
  "currency": "gbp",
  "customer_balance": {
    "apply": false,
    "description": "<string>"
  },
  "description": "<string>",
  "invoice": "<string>",
  "metadata": {},
  "off_session": false,
  "payment_method": "<string>",
  "reporting_type": "advance_rent",
  "return_url": "<string>",
  "send_receipt_email": true,
  "statement_descriptor": "<string>",
  "unit": "<string>",
  "workspace": "<string>"
}
'
{
  "id": "<string>",
  "created": 123,
  "object": "transaction",
  "adaptive_pricing": {
    "localized_prices": [
      {
        "amount": 123,
        "currency": "<string>",
        "presentment_exchange_rate": {
          "currency": "<string>",
          "exchange_rate": 123
        }
      }
    ]
  },
  "amount": 123,
  "application": "<string>",
  "balance_transaction": "<string>",
  "capture_method": "automatic",
  "client_secret": "<string>",
  "confirmed_at": 123,
  "cross_border": {
    "amount": 123,
    "enabled": true
  },
  "currency": "<string>",
  "customer": "<string>",
  "description": "<string>",
  "dispute": "<string>",
  "invoice": "<string>",
  "last_payment_error": {
    "code": "<string>",
    "failed_at": 123,
    "message": "<string>"
  },
  "next_action": {
    "type": "redirect_to_url",
    "redirect_to_url": {
      "url": "<string>"
    }
  },
  "paid_at": 123,
  "payment_method": "<string>",
  "payment_method_types": [
    "<string>"
  ],
  "payment_session": "<string>",
  "presentment_details": {
    "amount": 123,
    "currency": "<string>"
  },
  "processing": {
    "type": "bacs_debit"
  },
  "receipt_url": "<string>",
  "reporting_type": "<string>",
  "status": "requires_payment_method",
  "transfer_group": "<string>",
  "account": "<string>",
  "deleted": false,
  "amount_refunded": 0,
  "disputed": false,
  "metadata": {},
  "refunded": false
}

Authorizations

Authorization
string
header
required

API Key authentication. Use "Bearer YOUR_API_KEY".

Body

application/json
customer
string
required

The ID of the customer the transaction is for.

payment_method_types
enum<string>[]
required

The payment method types allowed for this transaction.

Minimum array length: 1
Available options:
autogiro,
bacs_debit,
card,
card_present,
bank_transfer,
direct_transfer,
gbp_credit_transfer,
pay_by_bank,
sepa_debit
application
string | null

The ID of the application the transaction is for.

application_payment_type
enum<string> | null

The application payment type. Only allowed if the supplied application is open.

Available options:
advance_rent,
deposit,
holding_fee,
partial_payment,
null
amount
integer | null

The amount to charge. Should be a positive integer in the smallest currency unit (e.g. 100 for £1.00). The amount is required if you do not supply an application and application_payment_type.

Required range: 1 <= x <= 99999900
capture_method
enum<string>
Available options:
automatic,
manual
confirm
boolean
default:false
currency
enum<string> | null

Three-letter ISO currency code, in lowercase. Must be a supported currency.

Available options:
gbp,
eur,
usd,
null
customer_balance
object

A hash containing information about the customer balance options.

description
string

An arbitrary string attached to the object. Often useful for displaying to users.

invoice
string | null
metadata
object
off_session
boolean
default:false
payment_method
string | null
reporting_type
enum<string> | null

The reporting type of the transaction. Only allowed if you don't supply an application ID.

Available options:
advance_rent,
charge,
deposit,
holding_fee,
rent,
null
return_url
string<uri>

The URL to redirect the user to if the transaction requires additional action to complete.

send_receipt_email
boolean
default:true
statement_descriptor
string | null

The statement descriptor that will appear on customers bank statement. Only allowed if you don't supply an application payment type.

unit
string | null

The ID of the unit. Only allowed if you don't supply an application ID.

workspace
string

Response

200 - application/json

Returns the created transaction.

id
string
required

Unique identifier for the object.

created
number
required

Time at which the object was created. Measured in seconds since the Unix epoch.

object
enum<string>
required
Available options:
transaction
adaptive_pricing
object
required
amount
number
required
application
string | null
required
balance_transaction
required
capture_method
enum<string> | null
required
Available options:
automatic,
manual,
null
client_secret
string | null
required
confirmed_at
number | null
required
cross_border
object
required
currency
string
required
customer
required
description
string | null
required
dispute
required
invoice
required
last_payment_error
object
required
next_action
object
required
paid_at
number | null
required
payment_method
required
payment_method_types
string[]
required
payment_session
required
presentment_details
object
required
processing
object
required
receipt_url
string | null
required
reporting_type
string
required
status
enum<string>
required
Available options:
requires_payment_method,
requires_confirmation,
requires_action,
processing,
canceled,
succeeded
transfer_group
string | null
required
account
string

The account that the object belongs to. Only returned if the request is made with a valid Yorlet-Context header.

deleted
boolean
default:false

Only returned if the object has been deleted.

amount_refunded
number
default:0
disputed
boolean
default:false
metadata
object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

refunded
boolean
default:false