Skip to main content

APIs

Create a Wire Payment

Wire payments are fund transfers done electronically across a network of banks or transfer agencies. The direction of wire payment is always Credit, moving funds from the Unit account to the counterparty account.

Once you create a wire payment, Unit will process it immediately, and a Wire Transaction will be created.

Important Info

Wires are typically used to move large amounts of money. Wires are final and cannot be disputed - once the funds are sent, they cannot be recouped. For that reason, Unit highly recommends that you re-authenticate the customer before a wire is sent. The best practice includes:

  1. Re-authenticate using username and password
  2. Authenticate the customer using OTP
  3. Mobile: Authenticate the customer using Biometric Authentication
Note

Wire payments are not enabled by default, and are subject to a minimum payment amount that is determined by the partner bank. Please contact Unit if you would like to enable this functionality.

VerbPOST
URLhttps://api.s.unit.sh/payments
Required Scopepayments-write or wire-payments-write
Data TypewirePayment
Timeout (Seconds)5

Attributes

amount
integer
The amount (in cents).
description
string
Payment description (maximum of 50 characters), this will show up on statement of the counterparty.
counterparty
The party on the other side of the Wire payment.
idempotencyKeyOptional
string
Optional. See Idempotency.
tagsOptional
object
Optional. See Tags. Tags that will be copied to any transaction that this payment creates (see Tag Inheritance).

Relationships

account
JSON:API Relationship
The Deposit Account originating the payment.
Example Request:
curl -X POST 'https://api.s.unit.sh/payments'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "wirePayment",
"attributes": {
"amount": 200,
"direction": "Credit",
"description": "Wire payment",
"counterparty": {
"name": "April Oniel",
"routingNumber": "812345678",
"accountNumber": "1000000001",
"address": {
"street": "20 Ingram St",
"city": "Forest Hills",
"state": "CA",
"postalCode": "11375",
"country": "US"
}
}
},
"relationships": {
"account": {
"data": {
"type": "depositAccount",
"id": "10000"
}
}
}
}
}'

Response

Response is a JSON:API document.

Example Response:
{
"data": {
"type": "wirePayment",
"id": "1135",
"attributes": {
"createdAt": "2021-08-30T12:19:18.639Z",
"amount": 200,
"direction": "Credit",
"description": "Wire payment",
"counterparty": {
"name": "April Oniel",
"routingNumber": "812345678",
"accountNumber": "1000000001",
"address": {
"street": "20 Ingram St",
"city": "Forest Hills",
"state": "CA",
"postalCode": "11375",
"country": "US"
}
},
"status": "Pending"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "10000"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"customers": {
"data": [
{
"type": "customer",
"id": "10000"
}
]
},
"transaction": {
"data": {
"type": "transaction",
"id": "4"
}
}
}
}
}

Cancel Wire Payment

Allows cancellation of a Wire payment that has been posted but not yet sent to the Federal Reserve for processing and settlement. Only payments with a status of Pending or PendingReview are eligible for cancellation. Upon successful cancellation, a PaymentCanceledTransaction is created, crediting the end-customer for the funds initially debited during the wire's creation.

VerbPOST
URLhttps://api.s.unit.sh/payments/{paymentId}/cancel
Required Scopepayments-write
Timeout (Seconds)5
curl -X POST 'https://api.s.unit.sh/payments/1483/cancel'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'

Response

Response is a JSON:API document.

200 OK

data
The canceled payment.
Example Response:
{
"data": {
"type": "wirePayment",
"id": "1483",
"attributes": {
"createdAt": "2024-12-13T16:18:07.654Z",
"amount": 100,
"direction": "Credit",
"description": "Wire",
"counterparty": {
"name": "April Oniel",
"routingNumber": "812345678",
"accountNumber": "1000000001",
"address": {
"street": "20 Ingram St",
"city": "Forest Hills",
"state": "CA",
"postalCode": "11375",
"country": "US"
}
},
"status": "Canceled"
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "10000"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"customers": {
"data": [
{
"type": "customer",
"id": "10000"
}
]
},
"transaction": {
"data": {
"type": "transaction",
"id": "260"
}
},
"org": {
"data": {
"type": "org",
"id": "1"
}
},
"bank": {
"data": {
"type": "bank",
"id": "1"
}
}
}
}
}