Customer Deposit / Customer Payment
{
"mapping": {
"fields": [
{
"generate": "undepfunds",
"hardCodedValue": "T",
"fieldtype": "",
"discardIfEmpty": false
},
{
"generate": "paymentmethod",
"hardCodedValue": 10,
"fieldtype": "",
"discardIfEmpty": false
},
{
"generate": "location",
"lookupName": "locationlookup"
}
]
},
"lookups": {
"locationlookup": {
"resultFieldId": "location",
"recordType": "parent"
}
}
}Currency Account Lookup
The JSON example below uses Stripe's API response currency value to select a NetSuite bank account based on USD or CAD.
Note: If multiple mapping field groups are utilized, always add the account lookup to the bottom of the JSON.
{
"lookups": {
"accountlookup": {
"map": {
"usd": "1001 Stripe USD Bank Account",
"cad": "2001 Stripe CAD Bank Account"
}
}
},
"mapping": {
"fields": [
{
"generate": "account",
"extract": "currency",
"discardIfEmpty": true,
"fieldType": "text",
"lookupName": "accountlookup"
}
]
}
}Default Dynamic Lookup Value
To handle Customer Payments involving multiple invoice locations, the parent lookup may be bypassed. Use the default dynamic lookup configuration to set a fixed, static location value instead.
{
"mapping": {
"fields": [
{
"generate": "location",
"lookupName": "locationlookup"
}
]
},
"lookups": {
"locationlookup": {
"resultFieldId": "location",
"recordType": "parent",
"default": 15
}
}
}Payment Created Date
In Stripe, the difference between the created date and the succeeded date reflects the distinction between a customer starting a payment and finishing it.
To use the succeeded date, simply remove the trandate field mapping. PayPack will automatically use NetSuite's default system date when the script executes, whether it's running manually or on a schedule.
It is common for these two dates to differ by minutes, hours, or even days based on the transaction payment method (i.e. Card vs ACH Direct Debit)
Core Differences
| Feature | Created Date | Succeeded Date |
|---|---|---|
| What it represents | When the intent to pay was first logged in Stripe. | When the funds were successfully authorized (and usually captured). |
| Typical Timing | Triggered when the customer enters the payment page. | Triggered when the customer completes authentication and the bank approves. |
| Business Use | Used to track checkout abandonment and top-of-funnel conversion. | Used for accounting, revenue recognition, and triggering order fulfillment. |
{
"mapping": {
"fields": [
{
"generate": "trandate",
"extract": "created"
}
]
}
}