CoF
POST {{base_path_test}}{{endpoint_cof}}
A stored credential (CoF) is information that is stored by a Merchant or its agent, a payment facilitator, or a staged digital wallet operator to process future transactions. A card-absent transaction is initiated by the Customer where the Customer does not need to enter his/hers card details as the Merchant uses the payment credential previously stored by the Customer to perform the transaction. CoF transaction require four conditional fields (i.e. cof, transactionId, rpnumber, and initiatedby) as displayed below but it’s important to take note that the first transaction must always be initiated by the Customer.
NOTE! This endpoint illustrates how to transactions using stored credentials. For details on how to store credentials refer to Store Credentials
CoF Transaction Types
Three transaction types using stored credentials are supported, i.e. recurring payments initiated by the Merchant (MIT), ad-hoc payments using credentials initiated by the Merchant (MIT) or the Customer (CIT), and finally Merchant initiated (MIT) recurring payments where the duration of the contract is known:
Recurring CoF Transaction
Customer purchased a subscription, and stored his credentials successfully when he/she subscribed. Now the Merchant wants to charge for the next months subscription where he wants to charge the Customer using the credentials on file the Customer provided when he/she signed up. In this scenario, it is the Merchant that initiates the transaction on behalf of the Customer. The Merchant's system sends sale request to the payment gateway containing the previously stored credentials.
Unscheduled CoF Transaction
Customer has previously stored credentials successfully in the Merchant's system. The Customer is logged into the Merchant's system and has again selected a number of items to purchase. Now the Customer goes to checkout and when he/she presses buy, the Merchant's system provides CoF reference for the Customer with the sale request to the payment gateway. If the issuer approves, the sale process has ended.
Installment CoF Transaction
Customer has purchased product or services, and his card shall be charged every month for 10 months straight for the same amount each time. The first payment was done at the same time the Customer's card credentials were stored by the Merchant, and now the second Installment payment will be conducted using the Customer's stored credentials. The transaction is automatically initiated by the Merchant (MIT) without any intervention by the Customer.
Request Body
[{"name"=>"d2", "value"=>"{{pan}}", "datatype"=>"string"}, {"name"=>"daskm", "value"=>"{{merchant_card_token_credentials}}", "datatype"=>"string"}, {"name"=>"dask", "value"=>"{{system_card_token_credentials}}", "datatype"=>"string"}, {"name"=>"d3", "value"=>"{{processing_code_sale}}", "datatype"=>"string"}, {"name"=>"d4", "value"=>"{{amount_sale}}", "datatype"=>"string"}, {"name"=>"de4", "value"=>"{{currency_exponent}}", "datatype"=>"string"}, {"name"=>"d12", "value"=>"{{date_current}}", "datatype"=>"string"}, {"name"=>"d14", "value"=>"{{expiry_date}}", "datatype"=>"string"}, {"name"=>"d22cp", "value"=>"{{pos_env_recurring}}", "datatype"=>"string"}, {"name"=>"d31", "value"=>"{{transaction_reference_credentials_cof}}", "datatype"=>"string"}, {"name"=>"d49", "value"=>"{{currency_id_number}}", "datatype"=>"string"}, {"name"=>"capture", "value"=>"{{capture_true}}", "datatype"=>"string"}, {"name"=>"cip", "value"=>"{{client_ip_address}}", "datatype"=>"string"}, {"name"=>"cof", "value"=>"{{cof_recurring}}", "datatype"=>"string"}, {"name"=>"rpnumber", "value"=>"{{cof_installments_rpnumber}}", "datatype"=>"string"}, {"name"=>"initiatedby", "value"=>"{{cof_initiatedby_merchant}}", "datatype"=>"string"}, {"name"=>"transactionId", "value"=>"{{transactionId_credentials}}", "datatype"=>"string"}, {"name"=>"d2name", "value"=>"{{cardholder_name}}", "datatype"=>"string"}, {"name"=>"mlang", "value"=>"{{language_errors}}", "datatype"=>"string"}, {"name"=>"clang", "value"=>"{{language_response}}", "datatype"=>"string"}, {"name"=>"user", "value"=>"{{user_name}}", "datatype"=>"string"}, {"name"=>"pwd", "value"=>"{{pass_word}}", "datatype"=>"string"}, {"name"=>"terminalId", "value"=>"{{terminalID}}", "datatype"=>"string"}, {"name"=>"d41", "value"=>"{{terminalNumber}}", "datatype"=>"string"}, {"name"=>"d42", "value"=>"{{merchantID}}", "datatype"=>"string"}, {"name"=>"separator", "value"=>"{{separator}}", "datatype"=>"string"}, {"name"=>"d39", "value"=>"000", "datatype"=>"string"}, {"name"=>"d39text", "value"=>"Approved", "datatype"=>"string"}, {"name"=>"error", "value"=>"10000", "datatype"=>"number"}, {"name"=>"errortext", "value"=>"Approved", "datatype"=>"string"}, {"name"=>"d38", "value"=>"165806", "datatype"=>"number"}, {"name"=>"d37", "value"=>"84000002", "datatype"=>"number"}, {"name"=>"d2brand", "value"=>"VISA", "datatype"=>"string"}, {"name"=>"d56", "value"=>"165343201", "datatype"=>"number"}, {"name"=>"transactionId", "value"=>"165343201", "datatype"=>"number"}, {"name"=>"correlationId", "value"=>"941172fb-8b6e-4088-9fd6-51ffcd8acf0f", "datatype"=>"string"}]
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
"d39=000\nuser=Rapyd\ndask=0000020046067405802\ndaskm=crt_4XPh2BTPJaaUUa03\nd3=000000\nd4=1999\nde4=2\nd12=201203180015\nd14=2306\nd31=trf_7mqh5swV4SV\nd37=84000002\nd38=180015\nterminalId=54321\nd41=90000360\nd42=8180001\nd49=840\nd56=165343901\ntransactionId=165343901\nd2brand=VISA\nd2dsp=xxxxxxxxxxxx7492\nerror=10000\nerrortext=Approved\nd39text=Approved\ncorrelationId=62324b97-109b-4c4b-98e8-16ffaebf4ad6"