# Add Payment Card v2.0Beta

The Add Payment Card endpoint adds a new payment card to a customers profile at our payment processor. Adding the card is essentially submitting a payment with an amount of R 1.00 that is reversed once the payment is authorised.

The request will submit a pre-configured payment scenario to our payment processor. Once the payment is authorised, the card is linked to the customers profile.

The request object itself currently does not allow for card details to be provided. The card details will be captured via a form provided by the payment processor. The URL for the form will be provided in the payment status updates we receive from the payment processor.

The Payment Status endpoint can be used to track the status of the payment as it is processed by the payment processor.

# Request

POST /v2.0/customers/{profileKey}/payments/cards

# Authorization

An OAuth 2.0 Bearer token with the Payment.Write scope is required. For more information, see Authentication.

# Path Parameters

A list of the supported path parameters is described below.

Name Required Type Description
profileKey true guid The profile key for the customer. This value can be retrieved from the profileKey claim in the token returned from our SSO solution.

# Request Body

The request body takes an AddCard object which is described below.

# AddCard

Name Required Type Description
partnerKey true string(4) The partner key assigned to you.
platform true string(50) An identifier for the platform the card is is being added from.

# Sample

{
	"partnerKey": "0087",
	"platform": "Branded App"
}

# Response

200
OK
Returns an ApiResponse envelope.

# Response Body

The endpoint returns our ApiResponse envelope. The data property of the response will contain a paymentId that can be used to check the status of the payment using the Payment Status endpoint.

Name Required Type Description
paymentId true string The unique identifier for the payment that was created to add the card.

# Sample

{
    "message": "The operation succeeded!",
    "notifications": [
        {
            "severity": "Success",
            "text": "The card payment was created.",
            "code": null,
            "additionalData": null
        }
    ],
     "data": {
        "paymentId": "6566e104-94ac-4fb6-a4f2-6d81bb7d93bd"
    }
}

# Errors

The standard error responses apply.

400
Bad Request
When the request fails validation.
401
Unauthorized
When authentication fails.
403
Forbidden
When authorisation fails.
404
Not Found
When the customer profile cannot be found.