Skip to main content
POST
/
formations
/
{id}
/
retry_payment
Typescript (SDK)
import { Crevio } from "@crevio/sdk";

const crevio = new Crevio({
  apiKey: process.env["CREVIO_API_KEY"] ?? "",
});

async function run() {
  const result = await crevio.formations.retryPayment({
    id: "<id>",
  });

  console.log(result);
}

run();
curl --request POST \
--url https://api.crevio.co/v1/formations/{id}/retry_payment \
--header 'Authorization: <api-key>'
import requests

url = "https://api.crevio.co/v1/formations/{id}/retry_payment"

headers = {"Authorization": "<api-key>"}

response = requests.post(url, headers=headers)

print(response.text)
const options = {method: 'POST', headers: {Authorization: '<api-key>'}};

fetch('https://api.crevio.co/v1/formations/{id}/retry_payment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.crevio.co/v1/formations/{id}/retry_payment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.crevio.co/v1/formations/{id}/retry_payment"

req, _ := http.NewRequest("POST", url, nil)

req.Header.Add("Authorization", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.crevio.co/v1/formations/{id}/retry_payment")
.header("Authorization", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.crevio.co/v1/formations/{id}/retry_payment")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "object": "<string>",
  "entity_type": "LLC",
  "state": "<string>",
  "naics_code": "<string>",
  "description": "<string>",
  "name_options": "<array>",
  "members": "<array>",
  "responsible_party": {},
  "mailing_address": {},
  "ein": "<string>",
  "formation_filing_date": "<string>",
  "admin_notes": "<array>",
  "doola_error": "<string>",
  "stripe_checkout_session_id": "<string>",
  "submitted_at": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "doola_company_id": "<string>",
  "verification_id": "<string>",
  "documents": [
    {
      "id": "<string>",
      "object": "<string>",
      "name": "<string>",
      "content_type": "<string>",
      "doola_created_at": "<string>",
      "doola_last_modified_at": "<string>",
      "doola_company_id": "<string>",
      "download_url": "<string>"
    }
  ],
  "checkout_url": "<string>",
  "charged_inline": true
}
{
"error": {
"type": "invalid_request_error",
"code": "bad_request",
"message": "The request was malformed or contained invalid parameters"
}
}
{
"error": {
"type": "invalid_request_error",
"code": "authentication_required",
"message": "You did not provide an API key."
}
}
{
"error": {
"type": "invalid_request_error",
"code": "forbidden",
"message": "You do not have permission to perform this action"
}
}
{
"error": {
"type": "invalid_request_error",
"code": "resource_missing",
"message": "The requested resource was not found"
}
}
{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "An unexpected error occurred"
}
}

Authorizations

Authorization
string
header
required

API key in the format: Bearer {api_token}

Path Parameters

id
string
required

The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")

Response

Formation with new checkout_url

id
string
required
object
string
required
status
enum<string>
required
Available options:
awaiting_payment,
pending,
submitted,
completed,
failed
entity_type
enum<string>
required
Available options:
LLC
state
string
required
naics_code
string
required
description
string
required
name_options
array
required
members
array
required
responsible_party
object
required
mailing_address
object
required
ein
string | null
required
formation_filing_date
string | null
required
admin_notes
array
required
doola_error
string | null
required
stripe_checkout_session_id
string | null
required
submitted_at
string | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
doola_company_id
string | null
required
verification_id
string | null
required
payment_status
enum<string>
required
Available options:
unpaid,
paid,
refunded
documents
object[]
required
checkout_url
string | null

Present when hosted checkout is needed

charged_inline
boolean

True when card-on-file charged inline without redirect