Transactions
Use this API to create and get transactions for a customer and a quote. Requires the creation of a quote beforehand per transaction.
Create a transactionCreates a transaction using a given quoteID. QuoteID must be valid and not expired.
Authorizations
Header parameters
x-idempotency-keystringRequired
Body
Schema for creating a new transaction
quoteIdstring · uuidRequiredExample:
Identifier of the quote to initiate the transaction
c88ebfc2-3356-48b5-b2bb-6fca7b618c96
correlationIdstringOptionalExample:
Optional: You can add your own correlationId to match the transaction to your own internal records.
03b7030f-6da1-4e76-3352-3debd82112c8
Responses
201
Response schema for a transaction creation request
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
500
Internal Server Error
application/json
post
POST /transactions HTTP/1.1
Host: api.fernhq.com
Authorization: Bearer API Key
x-idempotency-key: text
Content-Type: application/json
Accept: */*
Content-Length: 105
{
"quoteId": "c88ebfc2-3356-48b5-b2bb-6fca7b618c96",
"correlationId": "03b7030f-6da1-4e76-3352-3debd82112c8"
}
{
"transactionId": "1d8beb26-b4d1-47ee-8e5d-0d3905f200c7",
"customerId": "0423300f-ae6d-4e82-8afb-a3b430e22e29",
"quoteId": "1d8beb26-b4d1-47ee-8e5d-0d3905f200c7",
"transactionStatus": "PROCESSING",
"correlationId": "03b7030f-6da1-4e76-3352-3debd82112c8",
"source": {
"sourcePaymentAccountId": "072a8b7b-38c7-429a-a6cf-35dae7f2fb77",
"sourceCurrency": "USD",
"sourcePaymentMethod": "ACH",
"sourceAmount": "100.00"
},
"destination": {
"destinationPaymentAccountId": "072a8b7b-38c7-429a-a6cf-35dae7f2fb77",
"destinationPaymentMethod": "ETHEREUM",
"destinationCurrency": "USDC",
"exchangeRate": "1.2",
"destinationAmount": "100"
},
"fees": {
"feeCurrency": "5.50",
"fernFee": {
"feeAmount": "5.45",
"feeUSDAmount": "5.45"
},
"developerFee": {
"feeAmount": "5.45",
"feeUSDAmount": "5.45"
}
},
"transferInstructions": {
"type": "fiat",
"transferPaymentMethod": "ACH",
"transferMessage": "Payment for order #12345",
"transferBankName": "First National Bank",
"transferBankAddress": "123 Bank St, Finance City",
"transferBankAccountNumber": "987654321",
"transferRoutingNumber": "123456789",
"transferBankBeneficiaryName": "John Doe",
"transferIban": "GB29NWBK60161331926819",
"transferBicSwift": "DEUTDEFF",
"transferIfscCode": "SBIN0005943",
"transferSortCode": "40-47-36",
"transferBsbNumber": "082-902",
"transferTransitNumber": "12345",
"transferBankCode": "001",
"transferClabeNumber": "002010077777777771",
"transferRoutingCode": "ROUT1234",
"transferBranchCode": "0001",
"transferClearingCode": "110000",
"transferCnapsCode": "102033003330",
"transferNubanCode": "1234567890",
"transferPixCode": "[email protected]",
"transferPaymentLink": "https://secure.payzen.lat/t/paxsz1d7"
},
"createdAt": "2023-08-01T12:00:00Z",
"updatedAt": "2023-08-01T12:00:00Z"
}
Get a transaction by ID
Authorizations
Path parameters
transactionIdstring · uuidRequiredExample:
Unique identifier of the transaction
1d8beb26-b4d1-47ee-8e5d-0d3905f200c7
Responses
200
Response schema for a transaction creation request
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
500
Internal Server Error
application/json
get
GET /transactions/{transactionId} HTTP/1.1
Host: api.fernhq.com
Authorization: Bearer API Key
Accept: */*
{
"transactionId": "1d8beb26-b4d1-47ee-8e5d-0d3905f200c7",
"customerId": "0423300f-ae6d-4e82-8afb-a3b430e22e29",
"quoteId": "1d8beb26-b4d1-47ee-8e5d-0d3905f200c7",
"transactionStatus": "PROCESSING",
"correlationId": "03b7030f-6da1-4e76-3352-3debd82112c8",
"source": {
"sourcePaymentAccountId": "072a8b7b-38c7-429a-a6cf-35dae7f2fb77",
"sourceCurrency": "USD",
"sourcePaymentMethod": "ACH",
"sourceAmount": "100.00"
},
"destination": {
"destinationPaymentAccountId": "072a8b7b-38c7-429a-a6cf-35dae7f2fb77",
"destinationPaymentMethod": "ETHEREUM",
"destinationCurrency": "USDC",
"exchangeRate": "1.2",
"destinationAmount": "100"
},
"fees": {
"feeCurrency": "5.50",
"fernFee": {
"feeAmount": "5.45",
"feeUSDAmount": "5.45"
},
"developerFee": {
"feeAmount": "5.45",
"feeUSDAmount": "5.45"
}
},
"transferInstructions": {
"type": "fiat",
"transferPaymentMethod": "ACH",
"transferMessage": "Payment for order #12345",
"transferBankName": "First National Bank",
"transferBankAddress": "123 Bank St, Finance City",
"transferBankAccountNumber": "987654321",
"transferRoutingNumber": "123456789",
"transferBankBeneficiaryName": "John Doe",
"transferIban": "GB29NWBK60161331926819",
"transferBicSwift": "DEUTDEFF",
"transferIfscCode": "SBIN0005943",
"transferSortCode": "40-47-36",
"transferBsbNumber": "082-902",
"transferTransitNumber": "12345",
"transferBankCode": "001",
"transferClabeNumber": "002010077777777771",
"transferRoutingCode": "ROUT1234",
"transferBranchCode": "0001",
"transferClearingCode": "110000",
"transferCnapsCode": "102033003330",
"transferNubanCode": "1234567890",
"transferPixCode": "[email protected]",
"transferPaymentLink": "https://secure.payzen.lat/t/paxsz1d7"
},
"createdAt": "2023-08-01T12:00:00Z",
"updatedAt": "2023-08-01T12:00:00Z"
}
List all transactions for a customer with pagination
Authorizations
Query parameters
pageTokenstringOptionalExample:
Token for forward pagination
ZDE4YmViMjYtYjRkMS00N2VlLThlNWQtMGQzOTA1ZjIwMGM3
pageSizeinteger · min: 1OptionalDefault:
Number of items per page (default: 10, max: 100)
10
Example: 10
customerIdstring · uuidOptionalExample:
Customer to list transaction for
072a8b7b-38c7-429a-a6cf-35dae7f2fb77
organizationIdstring · uuidOptionalExample:
Organization to list transactions for
c88ebfc2-3356-48b5-b2bb-6fca7b618c96
Responses
200
Response schema for listing transactions with pagination
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
500
Internal Server Error
application/json
get
GET /transactions HTTP/1.1
Host: api.fernhq.com
Authorization: Bearer API Key
Accept: */*
{
"transactions": [
{
"transactionId": "1d8beb26-b4d1-47ee-8e5d-0d3905f200c7",
"customerId": "0423300f-ae6d-4e82-8afb-a3b430e22e29",
"quoteId": "1d8beb26-b4d1-47ee-8e5d-0d3905f200c7",
"transactionStatus": "PROCESSING",
"correlationId": "03b7030f-6da1-4e76-3352-3debd82112c8",
"source": {
"sourcePaymentAccountId": "072a8b7b-38c7-429a-a6cf-35dae7f2fb77",
"sourceCurrency": "USD",
"sourcePaymentMethod": "ACH",
"sourceAmount": "100.00"
},
"destination": {
"destinationPaymentAccountId": "072a8b7b-38c7-429a-a6cf-35dae7f2fb77",
"destinationPaymentMethod": "ETHEREUM",
"destinationCurrency": "USDC",
"exchangeRate": "1.2",
"destinationAmount": "100"
},
"fees": {
"feeCurrency": "5.50",
"fernFee": {
"feeAmount": "5.45",
"feeUSDAmount": "5.45"
},
"developerFee": {
"feeAmount": "5.45",
"feeUSDAmount": "5.45"
}
},
"transferInstructions": {
"type": "fiat",
"transferPaymentMethod": "ACH",
"transferMessage": "Payment for order #12345",
"transferBankName": "First National Bank",
"transferBankAddress": "123 Bank St, Finance City",
"transferBankAccountNumber": "987654321",
"transferRoutingNumber": "123456789",
"transferBankBeneficiaryName": "John Doe",
"transferIban": "GB29NWBK60161331926819",
"transferBicSwift": "DEUTDEFF",
"transferIfscCode": "SBIN0005943",
"transferSortCode": "40-47-36",
"transferBsbNumber": "082-902",
"transferTransitNumber": "12345",
"transferBankCode": "001",
"transferClabeNumber": "002010077777777771",
"transferRoutingCode": "ROUT1234",
"transferBranchCode": "0001",
"transferClearingCode": "110000",
"transferCnapsCode": "102033003330",
"transferNubanCode": "1234567890",
"transferPixCode": "[email protected]",
"transferPaymentLink": "https://secure.payzen.lat/t/paxsz1d7"
},
"createdAt": "2023-08-01T12:00:00Z",
"updatedAt": "2023-08-01T12:00:00Z"
}
],
"nextPageToken": "ZDE4YmViMjYtYjRkMS00N2VlLThlNWQtMGQzOTA1ZjIwMGM3"
}
Last updated