Skip to content
NimbusNexus

Payment methods

Payment methods are the cards your workspace has saved. One of them is the default for top-ups, which add funds to the workspace's prepaid balance.

  • POST /api/v1/payment/payment_methods/setup-intent starts saving a card. It returns a Stripe SetupIntent client_secret, and the card is confirmed with Stripe, 3-D Secure included.
  • GET /api/v1/payment/payment_methods/ lists the saved cards, with brand, last four digits, expiry, and which one is the default.
  • POST /api/v1/payment/payment_methods/{payment_method_id}/set_default makes a card the default for top-ups, and DELETE /api/v1/payment/payment_methods/{payment_method_id} removes one.
  • POST /api/v1/payment/payment_methods/{payment_method_id}/add_funds charges a card to top up the balance. When the bank asks for confirmation, the result is requires_action with a client_secret to confirm; POST /api/v1/payment/payment_methods/topups/{attempt_id}/sync then picks up the outcome.

Card data never touches NimbusNexus directly — payment-method creation routes through our PCI-compliant payment processor (Stripe today), and we store only the tokenized reference + display metadata (brand, last four, expiration). You don't need to worry about PCI scope on your end as long as you're using the API; raw card numbers never appear in any request to NimbusNexus.

These calls take a signed-in session, sent as Authorization: Bearer or the session cookie. An API key can't make them.

What's next

  • Billing — the balances these cards top up, and your billing details.
  • Pricing data — the per-resource prices behind the charges.

Reference

GET/api/v1/payment/payment_methods/

List Payment Methods

List the customer's vaulted payment methods.

Responses

  • 200Successful Response

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/payment/payment_methods/" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/payment/payment_methods/setup-intent

Create Setup Intent

Begin card vaulting: returns a Stripe SetupIntent client_secret for the frontend to confirm (3DS/SCA happens at Stripe).

Responses

  • 200Successful Response

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/payment/payment_methods/setup-intent" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/payment/payment_methods/topups/{attempt_id}/sync

Sync Topup

Re-sync a pending/3DS top-up after the frontend completes card confirmation.

Parameters

NameInTypeDescription
attempt_id*pathstring—

Responses

  • 200Successful Response
  • 422Validation Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/payment/payment_methods/topups/<attempt_id>/sync" \
  -H "Authorization: Bearer $NIMBUS_KEY"
DELETE/api/v1/payment/payment_methods/{payment_method_id}

Delete Payment Method

Detach a vaulted card.

Parameters

NameInTypeDescription
payment_method_id*pathstring—

Responses

  • 200Successful Response
  • 422Validation Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/payment/payment_methods/<payment_method_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/payment/payment_methods/{payment_method_id}/add_funds

Add Funds

Charge a vaulted card to add wallet funds (top-up): $10.00 to $1,000.00, through Stripe (1) or PayPal (3). A 'requires_action' result carries a client_secret the frontend 3DS-confirms, then re-syncs.

Parameters

NameInTypeDescription
payment_method_id*pathstring—
Idempotency-Key*headerstring—

Request body

FieldTypeDescription
amount_cents*integer—
provider*PrepaymentProvider—

Responses

  • 200Successful Response
  • 422Validation Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/payment/payment_methods/<payment_method_id>/add_funds" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount_cents": 1,
    "provider": 0
  }'
POST/api/v1/payment/payment_methods/{payment_method_id}/set_default

Set Default Payment Method

Set a vaulted card as the account default for top-ups.

Parameters

NameInTypeDescription
payment_method_id*pathstring—

Responses

  • 200Successful Response
  • 422Validation Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/payment/payment_methods/<payment_method_id>/set_default" \
  -H "Authorization: Bearer $NIMBUS_KEY"

Need to make a real call? Try these endpoints in the live Swagger UI →