curl --request POST \
--url https://api.hyperline.co/v1/payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"type": "one_time",
"customer_id": "cus_Typ0px2W0aiEtl",
"items": [
{
"id": "itm_3kXODDF42QXtnL",
"name": "Product name",
"amount": 123
}
],
"products": [
{
"id": "itm_3kXODDF42QXtnL",
"name": "Product name",
"amount": 123
}
],
"purchase_order": "<string>",
"custom_note": "<string>",
"charging_method": "immediately",
"payment_method_type": "transfer",
"payment_method_id": "pm_1ryTrMj4TTAT1N"
}'
{
"invoice_id": "<string>",
"checkout": {
"id": "<string>",
"url": "<string>"
}
}
Initiate a new payment (limited to one-time): generate an invoice and charge it directly or with a checkout session
curl --request POST \
--url https://api.hyperline.co/v1/payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"type": "one_time",
"customer_id": "cus_Typ0px2W0aiEtl",
"items": [
{
"id": "itm_3kXODDF42QXtnL",
"name": "Product name",
"amount": 123
}
],
"products": [
{
"id": "itm_3kXODDF42QXtnL",
"name": "Product name",
"amount": 123
}
],
"purchase_order": "<string>",
"custom_note": "<string>",
"charging_method": "immediately",
"payment_method_type": "transfer",
"payment_method_id": "pm_1ryTrMj4TTAT1N"
}'
{
"invoice_id": "<string>",
"checkout": {
"id": "<string>",
"url": "<string>"
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Create payment payload
The body is of type object
.
The reference to the created invoice and optionally the checkout
The response is of type object
.
Was this page helpful?