Initiate Payment (Account Binding)
Same Init contract as Initiate a payment request, plus saved-card and off-session-reuse fields.
Content-Type: application/json. Init authentication is the apiKey field in the JSON body (not Token Charge headers).
initRequest parameters
country
number
yes
ISO 3166 numeric country code. See Country and Currency Codes.
payType
number
yes
Payment channel ID. Use your assigned card channel. 0 / 1 are channel-selection / DCB pages — not this flow.
apiKey
string
yes
API key from Coda (Getting started / Publisher Portal).
projectId
number
yes
v2.0 only. Project (title) ID from Coda.
orderId
string
yes
Your unique order id, 4–64 characters.
currency
number
yes
ISO 4217 numeric currency code.
isTaxInclusiveAmount
boolean
no
v2.0, US market when Coda is MoR. Whether items[].price already includes tax. Default false.
items
array
yes
Line items. US and Canada: one item.
items[].code
string
no
Your item code. Mandatory for some channels (e.g. Taiwan Line Pay).
items[].price
number
yes
Price in currency.
items[].name
string
yes
Item name. Latin characters.
items[].skuImageUrl
string
no
Public image URL for checkout.
profile
object
yes
Key/value profile.
profile.entry
array
yes
List of { key, value }.
enableSavePaymentMethod
boolean
yes for binding
Show save-card and persist the instrument.
displaySavedPaymentMethodList
boolean
optional
Show previously saved cards on HPP. Typical first save: true or omit per your UX.
userInitiated
boolean
yes for binding
Must be true (customer present).
offSessionReuse
boolean
yes for binding
Must be true so the card can be reused later via Token Charge. Omit or false for a one-off CIT that must not be reused as MIT.
offSessionType
string
yes for binding
Unscheduled,Subscriptions,Installments
shopper
object
yes for binding
Shopper identity for vaulting. See table below.
profile.entry keys (Init)
user_id
yes
Your user’s unique identifier.
in_frame_redirect
no
true / false — iframe close behavior.
return_url
no
Dynamic return URL. Placeholders {transactionId}, {orderId}.
need_mno_id
no
Any non-null value if you need selected channel id back.
email
no
Receipt email if Coda has enabled receipts for your title.
client_ip
no
Shopper IPv4 if the channel requires it.
lang_code
no
HPP language, e.g. en_US.
shopper.entry keys (Init)
id
no
If id is present, Coda looks up that shopper. If not, Coda creates a shopper linked to partnerShopperId.
partnerShopperId
yes
Your stable user id (case-sensitive). Same value on every later Init. Token Charge does not send shopper ids; Coda resolves the shopper from paymentMethodId.
email
conditional
Often required to create a shopper.
phoneNumber
no
billingFirstName
conditional
Required in some markets / shopper creation.
billingLastName
conditional
billingDocumentType
conditional
e.g. CPF.
billingDocumentId
conditional
Paired with document type.
billingAddress
no
billingCity
no
billingRegion
no
billingCountry
no
ISO alpha-2, e.g. US.
billingZipCode
no
If id is present, Coda looks up that shopper. If not, Coda creates a shopper linked to partnerShopperId.
Init response (initResult)
resultCode
integer
0 = Init succeeded. Other values: error catalog.
resultDesc
string
Present when resultCode is not 0.
txnId
integer
Coda transaction id. 0 if Init failed.
redirectUrl
string
Hosted Payment Page URL. Send the customer here.
Sample — first save (CIT-for-MIT)
Sample Init success
How you get paymentMethod.id
After a successful save, Coda sends a JSON webhook to your configured endpoint. Store paymentMethod.id — that is the paymentMethodId on Token Charge. Shopper identity is resolved by Coda from the payment method; you do not send shopper on Token Charge.
PAYMENT_METHOD_ADDED
eventType
PAYMENT_METHOD_ADDED
timestamp
When the method was saved
shopper.id
Coda shopper id (keep for HPP returning-shopper Init)
shopper.partner_shopper_id
Your partnerShopperId
paymentMethod.id
Saved card id — Token Charge paymentMethodId
paymentMethod.type
e.g. card
paymentMethod.card.lastFour
Last four digits
paymentMethod.card.expirationMonth
MM
paymentMethod.card.expirationYear
YYYY
Respond with HTTP 2xx. Non-2xx is retried. Verify the notification checksum as documented for saved-card notifications.
Related eventType values you should handle: PAYMENT_METHOD_ADDED, PAYMENT_METHOD_REMOVED. See Saving Card Details.
Payment Result Webhook Notifications
Same callback contract as Get notified of a transaction status change, plus PaymentMethodId field when it is a Account Binding process (Customer Initiated Transaction for future offSession payment)
Last updated
Was this helpful?