Authorize.net Payments

Pay by token

POST https://api.moltin.com/v2/orders/:orderId/payments

Path Parameters

NameTypeDescription

orderId

string

The UUID of the order you want to pay for

Headers

NameTypeDescription

Authorization

string

The Bearer token to grant access to the API

Request Body

NameTypeDescription

payment

string

The Authorize.net customer profile ID

method

string

purchase, authorize, capture

gateway

string

You will use authorize_net in this case

options.customer_payment_profile_id

string

The Authorize.net customer payment profile ID

{
    "data": {
        "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "type": "transaction",
        "reference": "xxx",
        "gateway": "authorize_net",
        "amount": 100,
        "currency": "USD",
        "transaction-type": "purchase",
        "status": "complete",
        "relationships": {
            "order": {
                "data": {
                    "type": "order",
                    "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
                }
            }
        },
        "meta": {
            "display_price": {
                "amount": 100,
                "currency": "USD",
                "formatted": "$100.00"
            },
            "created_at": "2019-01-31T17:20:39.378Z"
        }
    }
}
curl -X POST https://api.moltin.com/v2/orders/:orderId/payments \
     -H "Authorization: Bearer XXXX" \
     -d $'{
        "data": {
          "gateway": "authorize_net",
          "method": "purchase",
          "payment": "xxx",
          "options": {
            "customer_payment_profile_id": "xxx"
          }
        }
      }'

Last updated