create subscription
POST
/v1/subscriptions
const url = 'https://api.flowpayra.com/v1/subscriptions';const options = { method: 'POST', headers: { 'Idempotency-Key': 'example', 'X-Api-Key': '<X-Api-Key>', 'X-Signature': '<X-Signature>', 'X-Timestamp': '<X-Timestamp>', 'X-Nonce': '<X-Nonce>', 'Content-Type': 'application/json' }, body: '{"currency_id":"example","chain_id":"example","amount":"example","interval_secs":1,"splits":[{"type":"percentage","merchant_id":"example","bps":1}],"allowance_mode":"limited"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.flowpayra.com/v1/subscriptions \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: example' \ --header 'X-Api-Key: <X-Api-Key>' \ --header 'X-Nonce: <X-Nonce>' \ --header 'X-Signature: <X-Signature>' \ --header 'X-Timestamp: <X-Timestamp>' \ --data '{ "currency_id": "example", "chain_id": "example", "amount": "example", "interval_secs": 1, "splits": [ { "type": "percentage", "merchant_id": "example", "bps": 1 } ], "allowance_mode": "limited" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Idempotency-Key
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
currency_id
required
string
chain_id
required
string
amount
required
string
interval_secs
required
integer format: int64
splits
allowance_mode
string
Responses
Section titled “Responses”Successful response
Media typeapplication/json
object
Examplegenerated
{ "id": "example", "status": "example", "amount": "example", "interval_secs": 1, "currency_id": "example", "currency_chain_id": "example", "chain_id": "example", "next_bill_at": "2026-04-15T12:00:00Z", "authorize_url": "https://example.com"}Stable API error
Media typeapplication/json
object
code
required
string
message
required
string
details
Examplegenerated
{ "code": "example", "message": "example", "details": "example"}Stable API error
Media typeapplication/json
object
code
required
string
message
required
string
details
Examplegenerated
{ "code": "example", "message": "example", "details": "example"}Stable API error
Media typeapplication/json
object
code
required
string
message
required
string
details
Examplegenerated
{ "code": "example", "message": "example", "details": "example"}Stable API error
Media typeapplication/json
object
code
required
string
message
required
string
details
Examplegenerated
{ "code": "example", "message": "example", "details": "example"}Stable API error
Media typeapplication/json
object
code
required
string
message
required
string
details
Examplegenerated
{ "code": "example", "message": "example", "details": "example"}