Create a Payment Intent
curl --request POST \
--url https://api.staging.blackbird.xyz/flynet/v1/payment_intentsconst options = {method: 'POST'};
fetch('https://api.staging.blackbird.xyz/flynet/v1/payment_intents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'POST'};
fetch('https://api.staging.blackbird.xyz/flynet/v1/payment_intents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Payments
Create a Payment Intent
POST
/
payment_intents
Create a Payment Intent
curl --request POST \
--url https://api.staging.blackbird.xyz/flynet/v1/payment_intentsconst options = {method: 'POST'};
fetch('https://api.staging.blackbird.xyz/flynet/v1/payment_intents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'POST'};
fetch('https://api.staging.blackbird.xyz/flynet/v1/payment_intents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Creates a new Payment Intent. The intent enters
Auth: OAuth access token.
Same
pending status until
you call /confirm. Requires the flynet_merchant_id issued during
onboarding.
Chef’s warning -
idempotency_key is required. Use the customer’s
order ID so retries dedupe naturally.Request body
{
"flynet_merchant_id": "{merchant_uuid}",
"customer_user_id": "{uuid}",
"amount": { "value": "1000000000000000000", "currency": "FLY" },
"description": "Event ticket",
"idempotency_key": "order-12345",
"expires_at": "2026-05-30T00:00:00Z",
"metadata": { "order_id": "12345" }
}
expires_at and metadata are optional. All other fields are required.
Response
HTTP 201 on first create:{
"id": "{uuid}",
"object": "payment_intent",
"payer_account_balance_id": "{uuid}",
"payee_account_balance_id": "{uuid}",
"amount": { "value": "1000000000000000000", "currency": "FLY" },
"description": "Event ticket",
"status": "pending",
"expires_at": "2026-05-30T00:00:00Z",
"canceled_at": null,
"paid_at": null,
"refunded_at": null,
"metadata": { "order_id": "12345" },
"created_at": "2026-05-11T20:00:00Z",
"updated_at": "2026-05-11T20:00:00Z"
}
idempotency_key plus same flynet_merchant_id returns HTTP 200
with the existing intent.
Errors
| Code | Meaning |
|---|---|
400 invalid_request_error | Request body is malformed. |
| 401 | Missing or invalid OAuth bearer. Empty body. |
404 resource_not_found | flynet_merchant_id is not visible to your app. |