Skip to main content
POST
/
v1
/
returns
JavaScript
import Augustus from '@augustusbank/typescript-sdk';

const client = new Augustus({
  apiKey: process.env['AUGUSTUS_API_KEY'], // This is the default and can be omitted
});

const _return = await client.returns.create({ deposit_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });

console.log(_return.id);
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "type": "return",
  "deposit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "amount": "<string>",
  "failure": {
    "message": "<string>",
    "retry": true
  },
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer token for authentication with Augustus Banking API

Headers

Idempotency-Key
string

Idempotency key for safe retries. Reusing a key with an identical request body returns the cached response. Reusing a key with a different body returns 409.

Body

application/json

Deposit to return and optional payment rail.

deposit_id
string<uuid>
required

Deposit to return funds from.

rail
enum<string>

Payment rail when the deposit allows multiple schemes.

Available options:
sepa_instant,
sepa,
faster_payments

Response

200 - application/json

Success

id
string<uuid>
required

Unique identifier of the return.

type
enum<string>
required

Type of the resource.

Available options:
return
status
enum<string>
required

Current status of the return.

Available options:
pending,
paid,
failed,
returned
deposit_id
string<uuid>
required

ID of the parent deposit.

amount
string
required

Amount as a string decimal (e.g. "100.50").

currency
enum<string>
required

Currency code (ISO 4217 currency code or crypto currency code).

Available options:
EUR,
GBP,
USD,
USDC,
BTC
failure
object
required

Failure details when status is failed, otherwise null.

created_at
string<date-time>
required

ISO 8601 UTC timestamp when the return was created.

updated_at
string<date-time>
required

ISO 8601 UTC timestamp when the return was last updated.