curl --request POST \
--url https://api.yorlet.com/v1/payment_sessions \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 50000000,
"currency": "gbp",
"customer": "<string>",
"mode": "payment",
"payment_method_types": [
"autogiro"
],
"description": "<string>",
"metadata": {},
"payment_method_options": {},
"reporting_type": "advance_rent",
"return_url": "<string>",
"send_email": true,
"statement_descriptor": "<string>",
"transaction_data": {
"transfer_data": {
"use_unit_ownership": true
},
"unit": "<string>"
}
}
'{
"id": "<string>",
"created": 123,
"object": "payment_session",
"amount": 123,
"currency": "<string>",
"customer": "<string>",
"description": "<string>",
"mode": "payment",
"payment_method_types": [
"<string>"
],
"reporting_type": "<string>",
"return_url": "<string>",
"status": "paid",
"transaction": "<string>",
"url": "<string>",
"account": "<string>",
"deleted": false,
"merchant": {
"business_name": "<string>",
"color": "<string>",
"country": "<string>",
"display_name": "<string>",
"icon": "<string>",
"id": "<string>",
"support_email": "<string>",
"support_phone": "<string>",
"support_website": "<string>"
},
"metadata": {}
}Creates a new payment session.
curl --request POST \
--url https://api.yorlet.com/v1/payment_sessions \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 50000000,
"currency": "gbp",
"customer": "<string>",
"mode": "payment",
"payment_method_types": [
"autogiro"
],
"description": "<string>",
"metadata": {},
"payment_method_options": {},
"reporting_type": "advance_rent",
"return_url": "<string>",
"send_email": true,
"statement_descriptor": "<string>",
"transaction_data": {
"transfer_data": {
"use_unit_ownership": true
},
"unit": "<string>"
}
}
'{
"id": "<string>",
"created": 123,
"object": "payment_session",
"amount": 123,
"currency": "<string>",
"customer": "<string>",
"description": "<string>",
"mode": "payment",
"payment_method_types": [
"<string>"
],
"reporting_type": "<string>",
"return_url": "<string>",
"status": "paid",
"transaction": "<string>",
"url": "<string>",
"account": "<string>",
"deleted": false,
"merchant": {
"business_name": "<string>",
"color": "<string>",
"country": "<string>",
"display_name": "<string>",
"icon": "<string>",
"id": "<string>",
"support_email": "<string>",
"support_phone": "<string>",
"support_website": "<string>"
},
"metadata": {}
}API Key authentication. Use "Bearer YOUR_API_KEY".
The amount to charge. Should be a positive integer in the smallest currency unit (e.g. 100 for £1.00).
100 <= x <= 99999900Three-letter ISO currency code, in lowercase. Must be a supported currency.
gbp, eur, usd The ID of the customer the transaction is for.
payment 1autogiro, bacs_debit, card, card_present, bank_transfer, direct_transfer, gbp_credit_transfer, pay_by_bank, sepa_debit An arbitrary string attached to the object. Often useful for displaying to users.
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.
Show child attributes
Payment method configuration options.
The reporting type of the transaction.
advance_rent, charge, deposit, holding_fee, rent, null The URL to redirect the user to after the transaction is complete.
Send the URL to the customer email address.
The statement descriptor that will appear on customers bank statement.
A subset of parameters to be passed to transaction creation.
Show child attributes
Returns the payment session object if the request succeeded.
Unique identifier for the object.
Time at which the object was created. Measured in seconds since the Unix epoch.
payment_session payment paid, unpaid, canceled The account that the object belongs to. Only returned if the request is made with a valid Yorlet-Context header.
Only returned if the object has been deleted.
Show child attributes
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.
Show child attributes
Was this page helpful?