PayButton Configuration

The Pay Buttons are a the easiest way of getting paid through PayCertify gateway and the processors we do support. Besides reduced implementation time, you don’t need to go through any PCI compliance scans or deal with its complexity since the sensitive data never touches your servers. In order to start using it, you just need to assign a few data attributes to your checkout page and then know the format that we’ll submit the transaction data to your website whenever the purchase is complete on the gateway to either approve or decline the transaction.

There are two methods the Pay Button uses to run transactions:

  1. For internal processors: the card data is extracted your form and you are required to use card inputs to pass this data to the gateway directly; the transaction never touches your server as we intercept the event before letting your form being submitted;
  2. For external processors, which happens offsite, being opened through a popup modal; in that case, the card data is input on an external environment, without taking the user off from your website.

All of our processors are internal, except Skrill.

ATTENTION: Never use a value property on card number or card cvv input. This would make the card be sent to your system's back end which brings compliance issues to your infrastucture and customers.

Required checkout fields

Below is a list of the fields that this product uses:

Data attribute Presence Description Type
[data-paycertify="processor-id"] Mandatory The processor ID you would like to use on this transaction. uuid, e.g.: 41f00869-d7b3-413e-9476-9ef1a8bc2f28
[data-paycertify="amount"] Mandatory The amount of the transaction a 2-decimal places number. e.g.: 0.01
[data-paycertify="first-name"] Mandatory The first name of the customer string, max 255 digits. e.g.: John
[data-paycertify="last-name"] Mandatory The last name of the customer string, max 255 digits. e.g.: Doe
[data-paycertify="card-number"] Conditional[1] The credit card number string, 12-19 digits. e.g.: 4111111111111111
[data-paycertify="card-expiry-month"] Conditional[1] Card expiration month, in two digits string, 2 digits. e.g.: 01
[data-paycertify="card-expiry-year"] Conditional[1] Card expiration year, in four digits string, 4 digits: e.g.: 2025
[data-paycertify="card-cvv"] Conditional[1] Card’s security code, 3 or 4 digits string, 3-4 digits: e.g.: 123
[data-paycertify="email"] Conditional[2] The email of the customer string, max 255 digits. e.g.: [email protected]
[data-paycertify="phone"] Conditional[2] The phone number of the customer string, max 255 digits, on international format or US format.
e.g.: +11231231234 or 1231231234
[data-paycertify="address-l1"] Optional[3] The first line of the billing address of the customer string, e.g.: 59 North Santa Cruz Ave
[data-paycertify="address-l2"] Optional The second line of the billing address of the customer string, e.g.: Suite M
[data-paycertify="city"] Optional[3] The billing city of the customer string, e.g.: Los Gatos
[data-paycertify="state"] Optional[3] The billing state of the customer string, ISO 3166-2 format. e.g.: CA
[data-paycertify="country"] Optional[3] The billing country of the customer string, ISO 3166-1 alpha-2 format. e.g.: US
[data-paycertify="zip"] Optional[3] The billing zip of the customer string, 5-6 alphanumeric digits
[data-paycertify="shipping-address-l1"] Optional[4] The first line of the shipping address of the customer string
[data-paycertify="shipping-address-l2"] Optional[4] The second line of the shipping address of the customer string
[data-paycertify="shipping-city"] Optional[4] The shipping city of the customer string
[data-paycertify="shipping-state"] Optional[4] The shipping state of the customer string
[data-paycertify="shipping-country"] Optional[4] The shipping country of the customer string
[data-paycertify="shipping-zip"] Optional[4] The shipping zip of the customer string, 5-6 alphanumeric digits

[1] If the processor being used is external type, you should not use have these fields on your checkout page, otherwise they’re required.
[2] Some processors may require this information. Heavily recommended to use for high risk merchants.
[3] Fundamental for shipped goods and processor MojoPay requires it.
[4] Defaults to the billing address.

Form submission process

Whenever the checkout form is submitted and all the fraud tools rules pass, if you are using an external processor, you should see a black screen, with a modal be open, and the user should use the safe environment to finish the transaction. Otherwise, the entire process will happen on the background, directly from the data entered to your form.

Regardless of the processor integration method, after the payment is done by the customer, your customer will be redirected to your form’s action property through a POST request, regardless of the outcome (approval or decline).

Considering hypothetically that your form action is, this is how your the POST request would look like:

Content-Type: application/x-www-form-urlencoded

transaction[id]: b50772b6-cb55-4514-b2bd-5201f971825c
transaction[merchant_id]: c68b45c4-0f9a-3758-ba2d-444819f564c7
transaction[user_id]: 939f14ec-26a2-4128-98c2-c55417defaf2
transaction[processor_id]: 38512ec8-3d17-45b5-a321-bf401f55e20a
transaction[merchant_transaction_id]: 123321312
transaction[transaction_type]: external
transaction[first_name]: Customer
transaction[last_name]: Last Name
transaction[street_address_1]: 123 Street
transaction[street_address_2]: Suite F
transaction[city]: Los Gatos
transaction[state]: CA
transaction[country]: US
transaction[zip]: 54321
transaction[email]: [email protected]
transaction[mobile_phone]: +11231231234
transaction[updated_at]: 2018-07-22T17:45:08+00:00
transaction[created_at]: 2018-07-22T17:39:27+00:00
transaction[events][0][id]: d48f5687-b79f-4251-bd1a-db10de997d91
transaction[events][0][success]: true
transaction[events][0][status]: pending_settlement
transaction[events][0][threeds_response]: null
transaction[events][0][avs_response]: null
transaction[events][0][event_type]: sale
transaction[events][0][amount]: 21.00
transaction[events][0][processor_code]: 2
transaction[events][0][processor_message]: Processed
transaction[events][0][processor_transaction_id]: 2442738841
transaction[events][0][processor_threeds_response]: null
transaction[events][0][processor_avs_response]: null
transaction[events][0][updated_at]: 2018-07-22T17:45:09+00:00
transaction[events][0][created_at]: 2018-07-22T17:45:08+00:00

In order to know if a transaction was approved or not, use the transaction[events][0][success] attribute. Whenever that returns true, you should be approving the transaction on your side. Everything else should be considered a decline.

Refunding a transaction

A refund can either be done from your PayCertify account on GATEWAY > CARD TRANSACTIONS > DETAILS > ACTIONS, or through our API.

Setup Kount