Attach a new Payment Method to the organization

POST /api/payment/intent

Attach (Create or Update if not created already) a new payment method to the Organization. The payment method must be already associated to the PaymentProvider (Stripe) customer, this method will just associate that payment method to the current Gatego subscription

Headers

  • Specify effective organization_id for Admin and Group Organization Admins. This is a global header for all endpoints only taken into consideration when it makes sense (it won't be used in Auth, for example)

application/json

Body

  • amount integer(int64)

    Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99)

  • currency string

    Three-letter ISO currency code, in lowercase. Must be a supported currency.

  • An arbitrary string attached to the object.

  • Set to true to fail the payment attempt if the PaymentIntent transitions into requires_action. This parameter is intended for simpler integrations that do not handle customer actions, like saving cards without authentication . This parameter can only be used with confirm=true

  • payment_method integer(int64)

    ID of the payment method (a PaymentMethod, Card, or compatible Source object) to attach to this PaymentIntent. If this parameter is omitted with confirm=true, customer.default_source will be attached as this PaymentIntent’s payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the payment_method going forward

  • Email address that the receipt for the resulting payment will be sent to. If receipt_email is specified for a payment in live mode, a receipt will be sent regardless of your email settings.

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • Secret needed to securely complete the payment process

  • Created

  • Unauthorized

  • Forbidden

  • Not Found

POST /api/payment/intent
curl \
 -X POST http://127.0.0.1:8080/api/payment/intent \
 -H "Content-Type: application/json" \
 -d '{"amount":42,"currency":"string","description":"string","error_on_requires_action":false,"payment_method":42,"receipt_email":"string"}'
Request examples
# Headers

# Payload
{
  "amount": 42,
  "currency": "string",
  "description": "string",
  "error_on_requires_action": false,
  "payment_method": 42,
  "receipt_email": "string"
}
Response examples (200)
{
  "client_secret": "string"
}