Documentation
Log In
Documentation

Create a transaction

Once authenticated, the client application can send a request to create a new transaction by providing relevant details such as the payment amount, sender and receiver. GrailPay will then return a UUID, which servers as the unique identifier for each transaction, to be used for get information and status of particular transaction. Please note that only one transaction can be created per request.

This request processes the transfer of money between two banks. To complete the transaction, both the payer (the person sending the money) and the payee (the person receiving the money) must have active bank accounts that are connected to GrailPay.

Bank Link provide the ability to retrieve the latest balance from a bank account, which helps us validate the transaction amount through ACH. GrailPay also checks the latest balance and returns an error if the balance is lower than the transaction amount.

We facilitate transactions across various domains:

  • Business To Business
  • Business To Person
  • Person To Business

Endpoint

   /3p/api/v1/transaction

 

Request Payload

{
    "payer_uuid": "aae3664b-db18-428c-9a2f-a876f259a7c3",
    "payee_uuid": "54f964d4-7ade-4cd1-a278-4f21cad18a2b",
    "amount": 12000
}
{
    "payer_uuid": "aae3664b-db18-428c-9a2f-a876f259a7c3",
    "payee_uuid": "54f964d4-7ade-4cd1-a278-4f21cad18a2b",
    "amount": 12000,
    "source_bank_account": {
        "uuid": "9b3ef193-5d7e-417c-b8af-5add4a2aadfd",
        "aggregator_type": "bank_link"
    }
}
{
    "payer_uuid": "aae3664b-db18-428c-9a2f-a876f259a7c3",
    "payee_uuid": "54f964d4-7ade-4cd1-a278-4f21cad18a2b",
    "amount": 12000,
    "source_bank_account": {
        "uuid": "9b3ef193-5d7e-417c-b8af-5add4a2aadfd",
        "aggregator_type": "bank_link"
    },
    "destination_bank_account": {
        "uuid": "9b3dd151-f50f-42c3-a082-553bddd5fd6e",
        "aggregator_type": "bank_link"
    }
}
{
    "payer_uuid": "aae3664b-db18-428c-9a2f-a876f259a7c3",
  	"processor_mid": "208202439880",
  	"amount": 12000,
  	"client_reference_id": ""
}
FieldsTypeIs RequiredDescription
payer_uuidstringYesIdentifier of entity sending funds.
payee_uuidstringIdentifier of entity receiving funds.
Required if processor_mid is null
processor_midstringRequired if payee_uuid is null
amountintYesAmount in cents only
client_reference_idstringClient refeorObjectrence or order id
transaction_feeintVendor fee in cents only
speedstringPossible values:
standard
sameday
company_namestring:16Company name field in the ACH transaction text.
Debit: if not specified, defaults to the payee name.
Credit: Will always appear as GrailPay
descriptionstring:10Description field in the ACH transaction text.
Credit: if not specified, defaults to the payer name.
addendastring:80Addenda field in the ACH transaction text.
Only supported on CCD transactions.
Debit: if payer is a person, will not appear.
Credit: If payee is a person, will not appear.
source_bank_account.uuidstring|uuidPayer bank account uuid
source_bank_account.aggregator_typestringPossible value:
plaid
manual
bank_link
destination_bank_account.uuidstring|uuidPayee bank account uuid
destination_bank_account.aggregator_typestringPossible value:
plaid
manual
bank_link
payout_delay_days_minint

Response Object

Note: Amounts and fees are expressed in cents.

{
    "status": true,
    "message": "",
    "data": {
      "uuid": "b5c337d8-d886-11ed-afa1-0242ac120002",
      "payer_uuid": "aae3664b-db18-428c-9a2f-a876f259a7c3",
      "payee_uuid": "54f964d4-7ade-4cd1-a278-4f21cad18a2b",
      "transaction_status": "CAPTURE_ACH_PENDING",
      "amount": 12000,
      "transaction_fee": 300,
      "currency": "USD",
      "client_reference_id": "",
      "payout_delay_days": 0,
      "company_name": null,
      "description": null,
      "addenda": null,
      "type": "api",
      "created_at": "2023-04-11 14:25:26",
      "updated_at": "2023-04-11 16:25:26"
    },
    "errors": []
}

Errors & Warnings

CodeMessage
401Unauthorize Request
403
404
422

Transaction Statuses

StatusDescription
CAPTURE_PENDINGACH payment can be canceled while they remain in the CAPTURE_PENDING status.
CAPTURE_ACH_PENDINGThe ACH payment is being processed and cannot be canceled at this time.
CAPTURE_ACH_FAILEDThe ACH payment failed due to an error.
CANCELEDThe ACH payment has been canceled.
PAYOUT_PENDING_ACHThe ACH payment have been processed successfully and is waiting to be initiated for payout to the payee.
IN_PAYOUTThe payout (crediting funds to the payee via ACH) has been initiated.
PAYOUT_ACH_PENDINGThe payout is being processed.
PAYOUT_ACH_FAILEDThe payout failed due to an error.
PAYOUT_COMPLETEThe payout have been processed successfully
FINANCINGThe ACH payment is currently being processed through the Financing widget
CLAWBACK_PENDINGA new ACH (Reverse Payout) will be created to return money from the payee to GrailPay when an ACH payment fails for any reason and the payout has already been processed.
CLAWBACK_ACH_PENDINGNew ACH (Reverse Payout) is being been processed
CLAWBACK_COMPLETENew ACH (Reverse Payout) has been processed successfully
CLAWBACK_ACH_FAILEDNew ACH (Reverse Payout) has been failed due to an error.