Skip to main content

Payment Methods

Fetch existing payment method​

Retrieves the existing payment method saved under the current partner account.

GET /payment-methods

warning

i-screen does not send payment method expiry notifications. It is the partner's responsibility to manage and replace payment methods before they expire.

curl "https://partner-staging.i-screen.com.au/v1/payment-methods" \
-H "Authorization: Bearer f3ee05b1e3d140a3b17456fb69d28cd9-5f6a46513aa48d0bf80a04c7d52c9805633070a7803d3bd4"

Response (Credit Card)

{
"method": "CreditCard",
"name": "411111******1111",
"expirationDate": "12/2034"
}

Response (PayPal)

{
"method": "PayPalAccount",
"name": "sb-i2u4u11304698@personal.example.com"
}

Response (no payment method)

{
"name": "GeneralError",
"message": "Payment method not found.",
"code": 500,
"className": "general-error",
"data": {},
"errors": {}
}

Generates a new payment authorisation link to enter a new payment method.

POST /payment-methods

warning

The payment authorisation link expires in 10 minutes.

warning

You can only have one payment method at a time. Remove the existing payment method before adding a new one.

Testing on staging​

Use the following test payment methods on the staging environment:

Credit Cards

  • 2223000048400011 (Mastercard)
  • 4111111111111111 (Visa)
  • 4012000077777777 (Visa)

PayPal — a PayPal sandbox account is required. See PayPal sandbox accounts.

curl -X POST https://partner-staging.i-screen.com.au/v1/payment-methods \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer f3ee05b1e3d140a3b17456fb69d28cd9-5f6a46513aa48d0bf80a04c7d52c9805633070a7803d3bd4"

Response

{
"url": "https://partner-staging.i-screen.com.au/api-payments/authorize/..."
}

Remove existing payment method​

Removes the existing payment method.

DELETE /payment-methods

curl -X DELETE https://partner-staging.i-screen.com.au/v1/payment-methods \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer f3ee05b1e3d140a3b17456fb69d28cd9-5f6a46513aa48d0bf80a04c7d52c9805633070a7803d3bd4"

Response

{
"success": true
}
note

To confirm the payment method has been deleted, call the fetch payment method endpoint again.