Pay By Card - One-Time Payment

This guide walks through creating and capturing a one-time payment by card. For this example, we will charge the card an amount of $12.01.

Step 1: Tokenize Card

POSThttps://testapi.payarc.net/v1/tokens

We will use this API to create a token that represents the credit or debit card used to carry out this transaction.

We are assuming the card source is INTERNET, and will capture the card number 4012000098765439, expiration month 12and year 2025 and CVV 999.

The token we receive can be used only once, to either create a new transaction or attach a new card to an existing customer.

We'll use the token ID we receive, 8YmNlwY0qY0mwEq0, for the next step.

Step 2: Create a Charge with the token

POSThttps://testapi.payarc.net/v1/charges

Remember from previous steps, the ID of the card we tokenized is P19v20v519L10M5y.

We will charge the customer's card $12.01, which will be represented by the amount 1201.

You will need to set the capture flag to 1 which means authorize and charge the payment at the same time.

We will receive a Charge, in our case the charge ID is nBoLWODLMLLoOXyb

Congratulations on creating the payment!