# Payment Nonce

The payment nonce is a string returned by the client SDK to represent a payment method. This string is a reference to the payer payment information that was provided in your payment form and should be sent to your server where it can be used with the server SDKs to create a new payment request.

# Get a credit card nonce

Retrieves a credit card nonce from the credit card information.

TIP

Used by the client SDK to retrieve a credit card nonce. This should not be called on server

    Request example
    • Shell
    • JavaScript
    curl -X POST \
      https://api.ompay.com/v1/merchants/<merchant_id>/credit-card-nonce \
      -H 'authorization: Bearer <client_token>' \
      -H 'content-type: application/json' \
      -d '{
            "number": "4005520201264821",
            "expire_month": 12,
            "expire_year": 2020,
            "cvv2": "123"
        }'
    
    Response example
    {
        "data": {
            "brand_code": "VISA",
            "credit_card_nonce": "dd959bad-0943-4d2e-9baf-fa64656420b7",
            "last4": "4821",
            "type": "Visa",
            "expire_month": 12,
            "expire_year": 2020,
            "expires_on": "2018-11-03T14:20:53Z",
            "issued_on": "2018-11-02T14:20:53Z"
        }
    }