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": [],
  "application": "<string>",
  "amount": 49999950,
  "confirm": false,
  "customer_balance": {
    "apply": false,
    "description": "<string>"
  },
  "description": "<string>",
  "invoice": "<string>",
  "metadata": {},
  "off_session": false,
  "payment_method": "<string>",
  "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>",
  "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",
    "bacs_debit": {
      "timings": {
        "customer_debit_at": 123,
        "settlement_at": 123
      }
    }
  },
  "receipt_url": "<string>",
  "reporting_type": "<string>",
  "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>

Controls when the funds will be captured from the customer.

Available options:
automatic,
manual
confirm
boolean
default:false

Set to true to attempt to confirm this transaction immediately.

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

The ID of the invoice this transaction is intended to pay.

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.

off_session
boolean
default:false

Set to true to indicate the customer is not in the checkout flow.

payment_method
string | null

The ID of the payment method to use for this transaction.

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

Whether to send a receipt email to the customer after the transaction succeeds.

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

The workspace the transaction belongs to.

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

Adaptive pricing information, if enabled for this transaction.

amount
number
required

The amount of the transaction in the smallest currency unit (e.g. cents).

application
string | null
required

The ID of the application the transaction is associated with.

balance_transaction
required

The balance transaction associated with this transaction.

capture_method
enum<string> | null
required

Controls when the funds will be captured from the customer.

Available options:
automatic,
manual,
null
client_secret
string | null
required

The client secret used to complete the transaction on the client side.

confirmed_at
number | null
required

The time at which the transaction was confirmed.

cross_border
object
required

Cross-border payment information, if applicable.

currency
string
required

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

customer
required

The customer the transaction is for.

description
string | null
required

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

dispute
required

The dispute associated with the transaction, if any.

invoice
required

The invoice the transaction was created to pay, if any.

last_payment_error
object
required

The most recent payment error encountered when attempting the transaction.

next_action
object
required

The next action required to complete the transaction, if any.

paid_at
number | null
required

The time at which the transaction was paid.

payment_method
required

The payment method used or to be used to complete the transaction.

payment_method_types
string[]
required

The payment method types allowed for this transaction.

payment_session
required

The payment session associated with this transaction, if any.

presentment_details
object
required

Details of the amount and currency presented to the customer.

processing
object
required

Details about the processing state of the transaction.

receipt_url
string | null
required

The URL of the hosted receipt for this transaction.

reporting_type
string
required

The reporting type used to categorize this transaction.

status
enum<string>
required

The status of the transaction.

Available options:
requires_payment_method,
requires_confirmation,
requires_action,
processing,
canceled,
succeeded
transfer_group
string | null
required

A string identifier that groups together transactions for a single transfer.

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

The amount that has been refunded for this transaction.

disputed
boolean
default:false

Whether the transaction has been disputed by the customer.

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

Whether the transaction has been fully refunded.