Skip to content

Make a saved card the one invoices charge

PUT
https://billing.ezghcloud.com/v1/organizations/{orgId}/payment-methods/{paymentMethodId}/default

Authorization

  • apiKeyoptionalHTTP
  • oauthoptionalHTTP
  • sessionCookieoptionalAPI key in cookie

Path parameters

  • orgIdstringrequired
    format: uuid
  • paymentMethodIdstringrequired

    pm_…

Returns

204

Done

401

unauthenticated: no valid credential.

JSON
  • errorobjectrequired
    3 properties
    • codestringrequired

      What went wrong, for programs: branch on this, never on message.

    • messagestringrequired

      What went wrong, for people.

    • issuesoptionalarray ofobject

      With invalid_request: each invalid field.

      2 properties
      • pathstringrequired
      • messagestringrequired

403

access_denied: the caller isn't allowed to (the message names the action); forbidden_origin: a cookie-authenticated write from another site.

JSON
  • errorobjectrequired
    3 properties
    • codestringrequired

      What went wrong, for programs: branch on this, never on message.

    • messagestringrequired

      What went wrong, for people.

    • issuesoptionalarray ofobject

      With invalid_request: each invalid field.

      2 properties
      • pathstringrequired
      • messagestringrequired

404

not_found: the organization (or one the caller doesn't belong to), or the resource, doesn't exist.

JSON
  • errorobjectrequired
    3 properties
    • codestringrequired

      What went wrong, for programs: branch on this, never on message.

    • messagestringrequired

      What went wrong, for people.

    • issuesoptionalarray ofobject

      With invalid_request: each invalid field.

      2 properties
      • pathstringrequired
      • messagestringrequired

429

too_many_requests: slow down.

JSON
  • errorobjectrequired
    3 properties
    • codestringrequired

      What went wrong, for programs: branch on this, never on message.

    • messagestringrequired

      What went wrong, for people.

    • issuesoptionalarray ofobject

      With invalid_request: each invalid field.

      2 properties
      • pathstringrequired
      • messagestringrequired

500

internal_error: a bug; the details are in the logs, under the request ID.

JSON
  • errorobjectrequired
    3 properties
    • codestringrequired

      What went wrong, for programs: branch on this, never on message.

    • messagestringrequired

      What went wrong, for people.

    • issuesoptionalarray ofobject

      With invalid_request: each invalid field.

      2 properties
      • pathstringrequired
      • messagestringrequired

502

payment_provider_error: the payment provider request failed.

JSON
  • errorobjectrequired
    3 properties
    • codestringrequired

      What went wrong, for programs: branch on this, never on message.

    • messagestringrequired

      What went wrong, for people.

    • issuesoptionalarray ofobject

      With invalid_request: each invalid field.

      2 properties
      • pathstringrequired
      • messagestringrequired

503

unavailable, ledger_unavailable or payments_unavailable: retry later.

JSON
  • errorobjectrequired
    3 properties
    • codestringrequired

      What went wrong, for programs: branch on this, never on message.

    • messagestringrequired

      What went wrong, for people.

    • issuesoptionalarray ofobject

      With invalid_request: each invalid field.

      2 properties
      • pathstringrequired
      • messagestringrequired
Navigation

Type to search…

↑↓ navigate↵ selectEsc close