Payment Webhook Version 3 Structure

Introduction

Yaspa’s webhook notifications are standardized across US pay-ins and payouts as specified below for simplicity and so that related events can be traced back to their starting points. For example, required merchant-assigned parameters such as customerIdentifier and reference are echoed in every related webhook so that payment status updates can be mapped to the original payment request.

Payment webhook data also carry over to insights. If a first-time user submits a payment and the merchant is configured for insights webhooks, the insights webhooks will carry the same customer.Identifier and account.Identifier parameters so that the insights can be mapped back to the customer and the account they used for payment. Refer to the Intelligent Payments section for information about insights webhooks which follow a similar convention to the payment webhooks but use a different structure within the data object payload.

⚠️

Yaspa webhooks omit null values and empty nested blocks unless noted otherwise. For example, a successful payment's webhook has no error object, and description is omitted if none was sent in the request. Any webhook may also contain additional optional parameters that aren't listed here or shown in the examples. Do not use strict-mode parsing on the examples in the product webhook sections, or on samples from testing.

Refer to Webhook Configuration & Processing for more information.

📘

Yaspa is currently on webhook version 3. If you are integrated to version 2 ("version": "2" in the webhook data payload), please refer to the Webhook v2 Addendum or contact Yaspa to upgrade to version 3.


Headers

HeaderDescription
citizen-public-api-keyThe merchant's public API key
webhook-signatureSignature over the JSON serialization of the whole envelope
citizen-signatureSignature over the JSON serialization of data only
content-typeapplication/json
user-agentOnly when the webhook has a customUserAgent configured
IDUnique identifier for the webhook which may be used to detect duplicates

Envelope

FieldTypeDescription
typestringEvent that triggered the webhook:
dataobjectEvent payload, see Data

Data Object

FieldTypeDescription
idstringYaspa database identifier for the payment
transactionIdstringPrimary Yaspa transaction identifier, for merchants to trace
versionstringPayload schema version
transactionTypestringType of transaction, such as "PAYIN" or "PAYOUT"
transactionStatusstringStatus of the transaction when the webhook was sent
createdAtstringISO 8601 datetime of transaction creation
referencestringMerchant-assigned payment identifier
descriptionstringMerchant-assigned payment descriptor. Pay-in only.
languagestringTwo-character ISO 639-1 language code used by the customer
tagsobjectMerchant-assigned tags, as {string: string[]}
metadataobjectMerchant- and system-set key/values, as {string: string[]}. Pay-in only.
merchantobjectReceiving merchant and account information. See Merchant.
customerobjectUser information. See Customer.
accountobjectThe user's account information. See Account.
paymentobjectBasic payment information. See Payment.
journeyobjectJourney type and flags. See Journey.
errorobjectError data. See Error.
reviewobjectHeld payout information. Payout only. See Review.
refundobjectInformation about a refunded pay-in. See Refund.
cryptoobjectCrypto payment metadata. See Crypto.

Merchant Object

FieldTypeDescription
idstringYaspa-assigned merchant identifier
tradingNamestringThe merchant's trading or doing-business-as name
accountNumberstringAccount number of the merchant's virtual account
bankCodestringRouting number of the merchant's virtual account
dedicatedAccountNumberstringPer-customer receiving account number, for merchants that give each customer a dedicated account
dedicatedBankCodestringBank code of the dedicated account
bankstringYaspa banking partner holding the merchant's virtual account
withdrawalbooleantrue only when a payout is a merchant withdrawal

Customer Object

FieldTypeDescription
identifierstringUser identifier the merchant sent in the customerIdentifier request parameter
merchantCustomerIdstringYaspa-assigned identifier for the merchant and user in combination
emailAddressstringEmail address the user entered in the hosted journey
detailsobjectDetails about the user provided by the merchant. Typically excluded from US Product Suite webhooks for clarity. See Customer Details.
nameCheckobjectName match and scoring information at the time of the webhook. See Name Check.

Customer Details Object

All values are as provided by the merchant in the request.

FieldTypeDescription
firstNamestringFirst name
lastNamestringLast name
dobstringDate of birth
mobilestringMobile phone number
sexstringSex
nationalitystringNationality
streetstringAddress street
citystringAddress city
statestringAddress state
zipstringAddress zip code
countrystringAddress country
addressobjectAddress. See Address.
brandNamestringLobby URL identifier
affiliateIdstringAffiliate identifier
customerValuestringCustomer value
Address Object

All values are as provided by the merchant in the request.

FieldTypeDescription
address1stringAddress line one
address2stringAddress line two
citystringCity
countryCodestringCountry
stateCodestringState
zipCodestringZip code

Customer Name Check Object

FieldTypeDescription
nameCheckStatusstring"PENDING", "PASS" or "FAIL"
nameCheckScoreintegerName match score between 0 and 100
merchantThresholdintegerPass threshold configured for the merchant
nameCheckActionsarray of stringsConfigured actions: one or more of "MARK", "FLAG" and "ACT"
flaggedForReviewbooleantrue if the result was flagged for manual review
stagestringStage in the journey where the name check ran
nameCheckHistoryarrayPer-rule scores, as {score, ruleName}
nameCheckInputsobjectThe names compared, as {kycName, accountHolderName}

Account Object

FieldTypeDescription
identifierstringYaspa-assigned unique identifier for the account
financialInstitutionstringDisplay name of the bank holding the account
typestringType of account, such as CHECKING
holderNamestringFirst and last name of the account holder
numberLastFourstringLast four digits of the account number, for example "1234"
routingNumberstringABA routing number of the account
verificationTransactionIdstringTransaction ID of the account verification session, if applicable
counterPartyIdstringYaspa counterparty identifier
dataAccessStatusstring"CONNECTED" if the bank account connection is active, otherwise omitted
dataLastUpdatedstringISO 8601 datetime when data was last retrieved from the bank

Payment Object

FieldTypeDescription
amountstringPayment amount as a positive number to two decimal places
currencystringISO 4217 currency code, "USD"
girostringPayment rail used
providerStatusCodestringProvider-level ISO 20022-style status code
networkTransactionIdstringIdentifier for the payment assigned by the payment network
providerPaymentIdstringPayout provider's payment identifier. Payout only.

Journey Object

FieldTypeDescription
typestringJourney used for the transaction, typically "INTELLIGENT_PAYMENT"
authTypestringAuthorization type, nearly always "STANDARD"
verifiedbooleantrue if the journey included account verification
enhancedbooleantrue if this was an enhanced pay-in. Nearly always false.
physicalQRCodeIdstringIdentifier of the physical QR code used to start the journey from a QR code or terminal

Error Object

FieldTypeDescription
codestringError code
reasonstringHuman-readable error reason mapped to the error code
detailsobjectAdditional structured details about the error. Polymorphic.

Review Object

FieldTypeDescription
heldReasonstringReason the payout was held for review. Payout only.
rejectionReasonstringReason the payout was rejected. Payout only.

Refund Object

FieldTypeDescription
reasonstringReason for the refund
statusstringRefund status
createdAtstringISO 8601 datetime when the refund was created
payoutTransactionIdstringIdentifier of the refund transaction itself. Pay-in only.
cancelledByTerminalbooleanWhether a point-of-sale terminal cancelled the pay-in. Never null.
dueToCancellationbooleanWhether the refund was triggered by a cancellation
payInTransactionIdstringIdentifier of the transaction being refunded. Payout only.

Crypto Object

FieldTypeDescription
transactionHashstringOn-chain transaction hash
chainstringBlockchain network
tokenstringToken or asset symbol
amountReceivedstringAmount received on chain
wallet.senderAddressstringSending wallet address
wallet.recipientAddressstringReceiving wallet address

Did this page help you?