Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string
required

Unique key used to replay this mutation safely.

Required string length: 1 - 255
Ionic-Account
string

Connected Ionic account to operate when using an authorized platform credential. Omit when using the account's own credential.

Path Parameters

id
string
required

Subscription whose next automatic collection attempt will consume the scenario.

Pattern: ^sub_[0-9A-Za-z]{24}$

Body

application/json
outcome
enum<string>
required

Result the next automatic collection attempt for the subscription returns.

Available options:
succeeded,
declined
decline_code
enum<string>

Required for a declined outcome and omitted for a successful outcome.

Available options:
insufficient_funds,
card_velocity_exceeded,
withdrawal_count_limit,
do_not_honor,
generic_decline,
transaction_not_permitted,
expired_card,
incorrect_number,
incorrect_cvc,
duplicate_transaction,
stolen_card,
lost_card,
fraudulent,
pickup_card,
restricted_card,
security_violation,
processing_error,
issuer_not_available,
try_again_later,
processor_declined

Response

The armed one-shot collection scenario.

id
string<uuid>
required

Unique identifier for the collection scenario.

object
enum<string>
required
Available options:
subscription.collection_scenario
merchant_id
string
required

ID of the account that owns the scenario (mer_…).

Pattern: ^mer_[0-9A-Za-z]{14}$
subscription_id
string
required

ID of the subscription the scenario applies to (sub_…).

Pattern: ^sub_[0-9A-Za-z]{24}$
livemode
enum<boolean>
required
Available options:
false
outcome
enum<string>
required

Result the next automatic collection attempt for the subscription returns.

Available options:
succeeded,
declined
consumed
boolean
required

Whether a collection attempt has used the scenario. A scenario is used by one attempt only.

created_at
integer<int64>
required

Unix epoch seconds when the scenario was created.

decline_code
string

Decline code the attempt returns. Present only when outcome is declined.

consumed_at
integer<int64>

Unix epoch seconds when a collection attempt used the scenario. Present only when consumed is true.