Skip to content
Coritan Docs

Add credit to your balance

Top up your credit balance with a card or another payment method, and see how Coritan spends that credit.

View as Markdown

Credit is money you pay in ahead of time. Coritan holds it in US dollars, it never expires, and Coritan spends it before it charges a payment method. Add credit to pay for hourly services, to cover renewals, or to pay an invoice without a card.

  • Sign in to the dashboard.
  • Decide how much to add. One top-up is between $1.00 and $10,000.00.
  • Have a way to pay: a saved method, a card, a PayPal account or cryptocurrency.
  1. In the sidebar, select Billing. The Add credit card is on the Overview tab. The Add credit button on the dashboard's home page opens the same card.
  2. Under Amount, choose $10, $25, $50, $100 or $250. To enter another amount, choose Other and type it in US dollars.
  3. Under Pay with, choose how to pay:
    • A saved card or PayPal account. Coritan charges it straight away.
    • Card (or New card) to enter a card.
    • PayPal to pay with a PayPal account. PayPal's buttons appear in the card.
    • Crypto to send cryptocurrency. Pay with cryptocurrency walks through it.
    • Any other provider, which opens its own checkout page.
  4. Select the button at the bottom of the card:
    • Add $25.00 (with your amount) for a saved method or a new card.
    • Continue to and the provider's name for a checkout page. Pay there, and the provider brings you back to Billing.
    • For PayPal, select PayPal's button and approve the payment in the window that opens. You stay on the page.
  5. For a new card, enter it in the Pay by card dialog and select Pay now. If your bank asks you to confirm a saved card, the dialog is called Confirm with your bank.

A message confirms the top-up, for example $25.00 added to your balance. Coritan emails you a receipt. The new balance shows on the Overview tab and in the sidebar, and the top-up appears on the Transactions tab (Transactions and payment attempts).

Once the credit you have added comes to $10.00 or more in total, hourly billing unlocks for your account.

Your bank charges the amount in your account's currency, converted from US dollars (Currencies and countries).

New orders
When you order a service, Coritan takes as much of the first invoice as your credit covers. If credit covers all of it, the service starts setting up at once.
Renewals
Coritan takes each renewal invoice from your credit first, and charges your saved method only for what credit does not cover.
Hourly services
Coritan takes each hour's charge from your credit (How hourly billing works).
Invoices you pay yourself
Choose Account credit in the Pay dialog (Pay an invoice).

To keep the balance from running out, set up automatic top-up.

Enter an amount between $1.00 and $10,000.00.
The amount is outside what one top-up can be. Choose another amount.
Could not add the credit
The payment did not start. The message under it gives the reason. Try again, or choose another way to pay.
The bank did not approve the payment.
Your bank refused the payment, or the check it asked for was not completed. Nothing was added. Try again or pay another way.
Top-up cancelled. You paid nothing.
You left the provider's checkout page before paying.
Back from checkout. Your balance updates once the payment clears.
The provider has not confirmed the payment yet. Check your balance again later; do not pay twice.
Your bank still needs to confirm this payment.
Your bank has not finished its check. Complete it in the card dialog, or wait for the bank and check your balance later.
Could not confirm the top-up
You paid, but Coritan could not confirm the payment when you came back. Wait a few minutes and check your balance. If the credit does not arrive, contact support with the date and amount.

Every top-up amount is in US dollars, from 1 to 10000; anything else answers 422. The payment is charged in currency when you send it, and otherwise in your account's currency.

POST /billing/topup/manual charges a saved method (its id from GET /payments/methods) and adds the credit when the charge succeeds:

Shell
curl -X POST https://api.coritan.com/api/v1/billing/topup/manual \
  -H "Authorization: Bearer $CORITAN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"amount": "25.00", "payment_method_id": 812}'
JSON
{
  "message": "Top-up successful",
  "new_balance": 37.01,
  "status": "succeeded",
  "base_amount": "25.00",
  "fx_rate": "1",
  "currency": "USD"
}

When the bank wants the cardholder to confirm, the answer has status requires_action and a client_secret for Stripe.js in a browser; nothing is credited until the confirmed payment reaches confirm-payment below. A declined charge answers 402 with the bank's reason, and a method that is not yours answers 404 with Payment method not found.

  1. Create the payment with POST /billing/topup/pay-intent. Send amount, and optionally gateway_name, currency and save_method (true keeps the card for later charges). The answer has status requires_payment_method, a client_secret for Stripe.js, gateway_reference (the payment's id), charge_amount in the charged currency's smallest unit, base_amount and fx_rate.
  2. The cardholder confirms the card in the browser with Stripe.js.
  3. Call POST /billing/topup/confirm-payment with the query parameters gateway_name and payment_intent_id. You can add amount to check it: the call answers 400 with amount does not match the completed payment when it differs from what was paid by more than two cents.
Shell
curl -X POST "https://api.coritan.com/api/v1/billing/topup/confirm-payment?gateway_name=stripe&payment_intent_id=pi_3Qexample&amount=25" \
  -H "Authorization: Bearer $CORITAN_TOKEN"
JSON
{
  "status": "succeeded",
  "gateway_name": "stripe",
  "gateway_reference": "pi_3Qexample",
  "client_secret": null,
  "requires_action_url": null,
  "new_balance": 37.01,
  "credited_usd": 25.0
}

It answers requires_action while the bank still wants a check, and 402 with Payment not completed when the payment failed. Coritan credits each payment once, so repeating the call is safe.

Pay with PayPal or a checkout page

Section titled Pay with PayPal or a checkout page

POST /billing/topup/checkout creates a checkout. Send amount, gateway_name, return_url and cancel_url. Both URLs must be absolute http or https URLs on a real host; placeholder hosts such as example.com answer 400.

Shell
curl -X POST https://api.coritan.com/api/v1/billing/topup/checkout \
  -H "Authorization: Bearer $CORITAN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"amount": "25.00", "gateway_name": "paypal", "return_url": "https://www.coritan.com/dashboard/billing", "cancel_url": "https://www.coritan.com/dashboard/billing"}'
JSON
{
  "checkout_url": "https://www.paypal.com/checkoutnow?token=5O190127TN364715T",
  "session_id": "5O190127TN364715T",
  "token": null,
  "gateway": "paypal",
  "currency": "USD",
  "charge_amount": 2500,
  "base_amount": "25.00",
  "fx_rate": "1"
}

Send the payer to checkout_url. For most providers, the credit arrives when the provider confirms the payment to Coritan. For PayPal, session_id is the PayPal order: once the payer approves it, call POST /billing/topup/paypal-capture with the query parameters order_id and gateway_name (and optionally amount). It answers like confirm-payment, or 402 with the reason when PayPal refuses the capture.

API operations on this page

MethodPathWhat it does
POST/api/v1/billing/topup/checkoutHosted checkout to buy USD account credit without a saved payment method
POST/api/v1/billing/topup/pay-intentCreate an in-page Stripe Payment Element intent for a credit top-up
POST/api/v1/billing/topup/confirm-paymentFinalize a top-up PaymentIntent after SCA and credit the user balance
POST/api/v1/billing/topup/paypal-captureCapture an approved PayPal order and credit the platform user balance
POST/api/v1/billing/topup/manualManually top up credit balance by charging a payment method