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.
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:
- Re-authenticate using username and password
- Authenticate the customer using OTP
- Mobile: Authenticate the customer using Biometric Authentication
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.
| Verb | POST |
| URL | https://api.s.unit.sh/payments |
| Required Scope | payments-write or wire-payments-write |
| Data Type | wirePayment |
| Timeout (Seconds) | 5 |
Attributes
Relationships
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.
{
"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.
| Verb | POST |
| URL | https://api.s.unit.sh/payments/{paymentId}/cancel |
| Required Scope | payments-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
{
"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"
}
}
}
}
}